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
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

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

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • MuleSoft Integration With RabbitMQ
  • How to Use Mulesoft VM Connector
  • Publishing MuleSoft Common Assets or Libraries to Anypoint Exchange and Nexus
  • Deep Dive Into JMS Integration Patterns With MuleSoft and JMS Behavior With Anypoint Clustering and Server Groups

Trending

  • The Modern Data Stack Is Overrated — Here’s What Works
  • Scalable System Design: Core Concepts for Building Reliable Software
  • Unlocking AI Coding Assistants Part 3: Generating Diagrams, Open API Specs, And Test Data
  • DGS GraphQL and Spring Boot
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. Connecting SAP Application Server Using MuleSoft SAP Connector

Connecting SAP Application Server Using MuleSoft SAP Connector

MuleSoft SAP Connector enables Mule runtime engines to support SAP integration, as a certified SAP Java connector.

By 
Jitendra Bafna user avatar
Jitendra Bafna
DZone Core CORE ·
Feb. 11, 20 · Tutorial
Likes (5)
Comment
Save
Tweet
Share
31.8K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

MuleSoft SAP Connector enables Mule runtime engines to support SAP integration, as a certified SAP Java connector that leverages SAP Java Connector (JCo) libraries.

Usage of SAP Connector

  • Execute the BAPI functions over the following type of RFCs (Remote Function Calls).
    • Synchronous Remote Function Call (sRFC).
    • Asynchronous Remote Function Call (aRFC).
  • Sends and Receive IDocs over Transactional Remote Function Call (tRFC) and Queued Remote Function Call (qRFC).
  • Transform SAP Object from and to XML.
  • Act as a JCo server to be called a BAPI over sRFC and aRFC.

Setting Up SAP Connector With AnyPoint Studio

By default, SAP connector is not available in the AnyPoint Studio palette. You need to search and download SAP connector from an exchange.

mulesoft

Click Finish. It will install the SAP connector with all available operations in AnyPoint palette.

AnyPoint palette

Establishing the Connection With SAP Application Server

SAP connector provided two ways for connecting SAP system, Application Server and Message Server. In this tutorial, we will see how we can connect the SAP Application server using SAP connector.

For establishing the connection, you will be requiring below JCo libraries that you can get it from the SAP marketplace.

Two Multi-Platform Libraries

  • sapjco3.jar
  • sapidoc3.jar

One JCO native library

  • sapjco3.dll (Windows)
  • libsapjco3.jnilib (Mac OS X)
  • libsapjco3.so (Linux)

We will be using SAP Synchronous Remote Function Call operation to retrieve data from SAP system.

Synchronous Remote Function Call

Now, you can start connector configuration and first make sure that you provide all three JCO libraries in connector configuration.

First, we will configure IDoc Library by clicking on Configure -> Use local file. Browse sapidoc3.jar.

Click OK.

"Choose local file"Similarly, configure the JCo library and JCo native library.

You can get all these libraries from SAP Marketplace.

simple connection provider

To connect SAP Application Server, you need to provide Username, Password, SAP system number (e.g. 00, 01), SAP client ID (e.g. 500, 800), Application server host.

After doing all this configuration, you can simply click on Test connection to check whether all configuration is correct and we are able to connect SAP.

test connection

Click OK. This completes the SAP connector configuration. Now you need to provide Key (i.e. Function that you have to call from SAP to retrieve data) and Metadata in Key will be populated automatically. Click on the search icon and select the Function that you need to execute.

providing a key

You will see request and response metadata is generated automatically in the transform message required to execute the SAP function that we have configured above.

SAP

Similarly, you can use other SAP connector operations to send and retrieve IDocs and other operations.

Considerations While Deploying To CloudHub

When you are deploying your application to CloudHub Runtime Manager, you need to make sure that JCo native library is libsapjco3.so added at build path and in pom.xml because Cloudhub workers are running on Linux operating system otherwise it will give error  java.lang.ExceptionInInitializerError: JCo initialization failed with java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path.

Conclusion

MuleSoft SAP Connector is very powerful and provides many operations to retrieve data from SAP. in form IDoc, BAPI and Remote Function call.SAP Connector is one of the most used connectors.

This is how you can use SAP connector to send and retrieve IDocs, execute BAPI functions synchronously and asynchronously.

Connecting SAP System With MuleSoft SAP Connector Application Server Configuration [Video]


Further Reading

SAP Integration With MuleSoft

Connector (mathematics) Application server application MuleSoft operating system Library

Opinions expressed by DZone contributors are their own.

Related

  • MuleSoft Integration With RabbitMQ
  • How to Use Mulesoft VM Connector
  • Publishing MuleSoft Common Assets or Libraries to Anypoint Exchange and Nexus
  • Deep Dive Into JMS Integration Patterns With MuleSoft and JMS Behavior With Anypoint Clustering and Server Groups

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!