Skip to Content
Technical Articles
Author's profile photo Elisha Das

Using RFC adapter in the SAP integration suite -Part II

This post is in continuation of the initial blog post – Using RFC adapter in the SAP integration suite.

If you didn’t get a chance to go through it, you can find it at the below-given link.

https://blogs.sap.com/2022/10/11/using-rfc-adapter-in-the-sap-integration-suite/?preview_id=1621769

In the first part of the blog post, we concentrated on the development of RFC on the SAP ERP side and destination configuration in the cloud connector(basically all the development setup within the firewall). In this part, we will focus on the  SAP BTP side developments.

We can segregate the rest of the development/setup on the SAP BTP side into two parts for better understanding.

  • Destination configuration in SAP BTP Cockpit
  • Developments in the SAP integration suite

Destination configuration in SAP BTP Cockpit

  1. Go to the SAP BTP cockpit. Click on the destination tab and create a new destination.

Note: The user and password should be of a valid SAP ERP user.

2. Click on save and click on “check the connection”.

Developments in the SAP integration suite 

  • Creation of a package in the integration suite.

a) Create a package in the design tab of the integration suite as shown in the below snapshot.

b) Once done click on Save.

c) Creation of artifact in the package.

  • Click on the Artifacts tab.
  • Click on Add dropdown and select integration flow. We refer to this as iflow also.

 

d) Designing the iflow:

  1.  A screen as shown below is displayed on your screen. Click on Edit.
  2. As stated above, we are using postman in our example for triggering the iflow. So, this will be acting as both sender and receiver.
  3. Connect the sender and the start message event in your iflow by HTTPS adapter type.
  4. Enter a valid address as shown below. It needs to start with a ‘/’.Note:The user role “ESBMessaging.send” is necessary for invoking the workflow. This needs to be assigned to the user as well in the BTP cockpit. Please refer SAP Help guide for further information on this.
  5. We are adding a content modifier next. Why?
    Since in this example we want to get all purchase orders that were created on a particular date. So, we would be capturing the date in the body of the content modifier as shown below.
  6. Give a valid name. we are adding the date in xml format in the body as shown below.Note: This Date will be mapped to “createdon”, the importing parameter in our RFC that we have defined above.
  7. Now logically the next step is to send the data to the SAP ERP system in a format that our RFC understands.
    1. Here we can achieve this through message mapping. But before we do that we would need “source” and “target” XSD/WSDL. This will help in mapping the incoming XML format to the appropriate target structure which is RFC in this case.
    2. We already have target WSDL from SAP ERP from the last blog post.
    3. For source XSD, we can use any tool to convert the above XML to XSD format. Once converted it will appear as below.
    4. Save it as an XSD document in your system so that we can use it in our next step.

           

     8. Now let us create a message mapping step as shown below.

       

 

     9. Give a name.

       

   10. Now we add the source and target XSD as shown below.

     

Use the “upload from file system ” option to upload the WSDLs of both the source and target.

 11. We perform a simple one-to-one mapping to let the system know that our date needs to be mapped to RFC’s “createdon” date.

 12. Click on save.

13. Our data is all set to be sent to SAP ERP. So, we create a request-reply for the external call and a receiver as shown below.

 

 

14. Now we need to connect these two by RFC adapter as shown.

 

15. In the destination field use the same destination name that we created in our BTP cockpit ( refer to the beginning of this blog post).

 

16. Click save and deploy.

17. When we go to the monitor tab, we can get the endpoint. We will be using this in postman to trigger the iflow.

 

Testing this development:

  • Now for testing this, go to the postman app. Use the above iflow endpoint as a URL.Maintain authorization as shown below. The credentials are the ones that is used to login into your BTP account.
  • Click on Send. This gets you the output as shown below.Summary:

We have reached the end of our blog. Let us summarize the steps.

  • We created an RFC in the SAP ERP and created destinations in both the cloud connector and SAP BTP cockpit.
  • This RFC is consumed in the iflow that we have created in the SAP integration suite. The whole setup was tested using postman in this example. You can use any other tool as per your preference.

 

Hope this blog helped you to get a basic idea of how to use an RFC adapter in the integration suite. Please feel free to leave your comments/queries below.

Happy Learning !!

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Charan Samanchi
      Charan Samanchi

      Thanks for the info! Great Content.

       

      Thanks,

      Charan

      Author's profile photo Phani Kumar Yennamani
      Phani Kumar Yennamani

      Thanks !