DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. SAP Integration in Mule ESB

SAP Integration in Mule ESB

Learn how to set up data integration between SAP NetWeaver and your organization's systems with the Mule ESB SAP connector.

Rajesh Kumar user avatar by
Rajesh Kumar
·
Dec. 26, 17 · Tutorial
Like (6)
Save
Tweet
Share
11.93K Views

Join the DZone community and get the full member experience.

Join For Free

Currently, SAP is at the core of most enterprises and needs to connect various systems. Mule ESB provides a connector that enables integration of data with SAP NetWeaver and external systems.

Requirements:

  • Mule ESB 3.8

  • Anypoint Studio 6.0

  • SAP Connector 2.2.6

The SAP Connector needs to download from the Anypoint Exchange, once its downloaded, install and restart the Anypoint Studio to effect the changes.

You will find the SAP connector in the design palette


Image title

Here MULE allows to connect SAP Systems through Anypoint SAP connector which is certified connector (well tested one so we can use happily with out bothering exception handling and connection issues .. ) leverages the SAP Jco (java connector lib ) which enables mule applications to do the different operations 

Excecute the BAPI functions using RFC protocal and those are SynchronousRFC, TransactionalRFC and QueuedRFC

SAP allows to define the exchange pattern (one-way / Two-way : request - response )

Below picture shows where you configure the exchagne pattern and SAP connector configuration which allows to define Type of operation plus RFC type which I have mentioned above.


Image title

Click on Plus symbol to add the connector configuration and provide the SAP system details for integration.

Image title

After providing the details, check the connection using 'Test Connection' to make sure details are accurate.

Perform the library checks which are showing red color in the above image, follow the below points..

JavaConnector library depends on your hardware platform and operating system. Therefore, you need to download the proper version for the local drive running Anypoint Studio.


Three files are required for both libraries:


  • Two multi-platform Java libraries:
    • sapjco3.jar
    • sapidoc3.jar
  • One of the JCo platform-specific native libraries:
    • sapjco3.dll (Windows)
    • libsapjco3.jnilib (Mac OS X)
    • libsapjco3.so (Linux)

Click on Advanced Tab to configure the extended properties for SAP connector.


SAP Connector configuration in XML syntax -

<sap:connector name="Sap Connector" jcoClient="${SAPClient}" jcoUser="${SAPUser}"
jcoPasswd="${Passwd}" jcoLang="${SAPLang}" jcoAsHost="${SAPHost}"
jcoSysnr="${SAPRFCSysnr}" 
jcoPoolCapacity="${POOLCAP}" jcoPeakLimit="${SAPLIM}"/>


Below is Connector and advanced configuration using BAPI and IDOc configuration deatils 

<sap:connector name="Sap Connector" jcoClient="${SAPClient}" jcoUser="${SAPUser}"
jcoPasswd="${Passwd}" jcoLang="${SAPLang}" jcoAsHost="${SAPHost}"
jcoSysnr="${SAPRFCSysnr}" 
jcoPoolCapacity="${POOLCAP}" jcoPeakLimit="${SAPLIM}"/>


<flow name="idocServer">
<sap:inbound-endpoint exchange-pattern="request-response" connector-ref="SapConnector" type="idoc" functionName="MATMAS05" rfcType="trfc" xmlVersion="2" outputXml="true" jcoGwHost="${sap.jcoGwHost}" jcoGwService="${sap.jcoGwService}" jcoProgramId="${sap.jcoProgramId}" jcoConnectionCount="${sap.jcoConnectionCount}" responseTimeout="10000" doc:name="SAP"/>
<logger level="INFO" doc:name="Logger" message="#[payload]"/>
</flow>


<flow name="bapiServer">
<sap:inbound-endpoint connector-ref="SapConnector" type="function" functionName="STFC_CONNECTION" rfcType="trfc" xmlVersion="2" outputXml="true" jcoGwHost="${sap.jcoGwHost}" jcoGwService="${sap.jcoGwService}" jcoProgramId="${sap.jcoProgramId}" jcoConnectionCount="${sap.jcoConnectionCount}" responseTimeout="10000" doc:name="SAP" exchange-pattern="request-response"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>


This is the way it allows you to connecto SAP System and enables SAP operations to do easy without writting much code.

Happy Integration !!!



Enterprise service bus Integration Connector (mathematics)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Key Considerations When Implementing Virtual Kubernetes Clusters
  • The Future of Cloud Engineering Evolves
  • Distributed SQL: An Alternative to Database Sharding
  • How To Use Terraform to Provision an AWS EC2 Instance

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: