+
+

MuleSoft SAP Workshop for Mule 4.x

Overview

Welcome to the MuleSoft SAP Workshop for Mule 4.x. This workshop consists of a set of modules that will provide you hands-on experience with connecting with SAP using a variety of methods provided through the Anypoint Platform. We’ll walk you through connecting to SAP HANA Database, SAP S/4 HANA Cloud, and SAP ECC R/3 using our various connectivity solutions.

Prerequisites

  • Anypoint Studio (Download)

  • SAP Connector 5.0

  • SAP ECC R3 and/or S/4 HANA Cloud Instance

  • SAP HANA Database

In order to complete these guides, you’ll need a copy of Anypoint Studio 7.4.x which is free to download and install on your Windows, Mac, or Linux machine.

SAP R/3 ECC / S/4 HANA On-Premises

SAP S/4 Cloud

HANA Database

SAPConnector2

Odata

DBConnectorImage

This module will walk you through connecting with SAP using the SAP Connector which leverages the SAP JCo Library. The JCo library works with both R/3 ECC and S/4 HANA on-premises.

This module provides a overview on how to connect SAP S/4 Cloud using the SAP S/4 Cloud connector.

This module will walk you through the process of connecting with an SAP HANA Database.

The SAP Connector module requires the use of your own SAP ECC R/3 or SAP S/4 HANA On-Premises instance. If you don’t have one, you can leverage a hosted SAP service. For the purposes of this guide, we utilized Sandbox SAP.

SAP Integration & API Strategy

SAP is one of the most popular enterprise resource planning (ERP) solutions available on the market today. Businesses looking to fully harness the power of SAP often wish to integrate it with other applications such as client relationship management (CRM) applications, creating end-to-end processes across the applications, on-premise or in the cloud.

With MuleSoft, customers can deliver integrations quickly, easily, and cost effectively in order to integrate SAP solutions with other systems in the enterprise using our library of connectors.

There are a number of different design patterns that can be leveraged to integrate with SAP, the decision criteria for choosing one pattern over another include SAP development time, MuleSoft development time, NetWeaver Gateway risk assessment, and account maintenance/visibility.

The most common technologies are IDoc, BAPI/RFM, file extracts, SAP Netweaver Gateway, and SOAP Web Services to integrate with SAP

Table 1. Web Services

Method

Description

Approach

Web Services

SAP Netweaver Gateway exposes data as REST or OData APIs.

* Use HTTP or OData Connector
* XML or JSON Data
* Mule can either connect from Anypoint VPC in CloudHub or be co-located near SAP instance.
* In the case where SAP exposes APIs to unlock the data, consuming the APIs from Mule flows would involve simply configuring a HTTP connector.
* No SAP jars/libraries are required
* In this scenario Mule serves as a simple HTTP proxy for the APIs, enforces authentication, policies (rate limiting/throttling etc..) and captures analytics.
* This approach is better fit for realtime and singular data.

Table 2. BAPI

Method

Description

Approach

BAPI / Remote Function Module

Call SAP native API functions directly. Supports execution of BAPI functions over the RFC protocol (synchronous RFC, transactional RFC, queued RFC)

* Use SAP Connector, a SAP-certified Java connector that leverages the SAP Java Connector (JCo) and IDoc libraries
* Works with both SAP ERP and S/4HANA
* XML Data
* Mule can either connect from Anypoint VPC in CloudHub or be co-located near SAP instance.

Table 3. IDOC Send

Method

Description

Approach

Send IDoc to SAP

Intermediate documents in either standard or extended formats exchanged through SAP framework.

* Use SAP Connector, a SAP-certified Java connector that leverages the SAP Java Connector (JCo) and IDoc libraries
* Works with both SAP ERP and S/4HANA
* XML Data
* Mule can either connect from Anypoint VPC in CloudHub or be co-located near SAP instance.

Table 4. IDOC Receipt

Method

Description

Approach

IDoc from SAP

Intermediate documents in either standard or extended formats exchanged through SAP framework.

* Use SAP Connector, a SAP-certified Java connector that leverages the SAP Java Connector (JCo) and IDoc libraries
* Works with both SAP ERP and S/4HANA
* XML Data
* Real time / event based
* Mule can either connect from Anypoint VPC in CloudHub or be co-located near SAP instance.

Table 5. S/4HANA Database

Method

Description

Approach

Database / S/4HANA Database

Direct calls to SAP database.

* Use Database Connector
* Not recommended
* Mule can either connect from Anypoint VPC in CloudHub or be co-located near SAP instance.
* MuleSoft can easily interact with data in SAP DB / S/4HANA DB using the Database Connector
* All that is required is the S/4HANA JDBC driver
* Standard database operations are exposed from the connector (select, insert, update, delete, etc…​

Table 6. File Extracts

Method

Description

Approach

File Extracts

*Scheduled SAP jobs import/export files.
* Files are in IDoc format.

* Scheduled SAP jobs import/export files.
* Files are in IDoc format.
* Use File Connector or S/FTP Connector
* Mule can either connect from Anypoint VPC in CloudHub or be co-located near SAP instance.

Other SAP Project Considerations

  • The company’s current investment in BAPI and IDoc integrations

  • NetWeaver Gateway direction driven by SAP

  • Managed system APIs in SAP

  • The performance characteristics of these integration methods are not fully understood with respect to the responsiveness of SAP and require testing.

  • Development lead time for changes / additions on SAP - i.e. custom BAPI development ( generally this is outside the scope of MuleSoft resources)

Submit your feedback!
Share your thoughts to help us build the best workshop experience for you!
Take our latest survey!