Technical Articles
IDOC to REST Asynchronous scenario
This is a step by step guide to pass IDOC data into REST service through SAP PO.
I have seen many guides of IDOC to SOAP scenario. But I didn’t find, IDOC to REST step by step guide.Therefore I have tried the scenario and blogging it for newbies.
System: SAP PI 7.5
This article will demonstrate how to pass IDOC data to REST service through SAP PO. The requirement was, IDOC data needed to pass in to REST web service.
This example will follow below workflow:
Business Case Description
ARTMAS IDoc data needed to pass to 3rd party REST service through SAP PO.
Scenario – We are going to pass Material Number(MATERIAL) and Material Group(MATL_GROUP) to REST service to store it in third party application.
REST SERVICE Data Type
REST SERVICE Message Type
REST SERVICE – Service Interface
Mode should be Asynchronous.
REST SERVICE – Message Mapping
In here we have mapped ARTMAS IDoc into REST request.
MATERIAL mapped into PARAM1 and MATL_GROUP mapped into PARAM2.
REST SERVICE – Operation Mapping
Integration Builder Configuration-
IDOC Sender Channel
REST receiver Channel – General
REST receiver Channel – REST URL
REST receiver Channel – REST Operation
REST receiver Channel – Data Format
REST receiver Channel – HTTP Headers
If you need to pass subscription key for authentication, you can use HTTP headers tab to pass the same.
Integrated Configuration – Inbound Processing
Integrated Configuration – Receiver
Integrated Configuration – Receiver Interfaces
Integrated Configuration – Outbound Processing
Conclusion:
By following the above steps, you can transfer IDOC data into third party REST service using SAP PO.
Hope this will help.
Thanks for reading and comments are always welcome.
Useful article. I had to do a lot of R&D to achieve this task. This may help other consultant very well.
very useful article. Implemented in our environment and works.
Perfect described and understandable.
Why source and target message is same in operation mapping?
Hi Buddhika,
Thanks a lot for sharing this article. I've been searching for a step-by-step guide for weeks. This is perfect. 🙂
in sm58 it is showing error/Function IDOC_INBOUND_ASYNCHRONOUS not found.please suggest.
Hi Buddhika, should REST SERVICE – Service Interface be outbound and not inbound?