Skip to Content
Technical Articles
Author's profile photo Buddhika Krishantha

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.

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Prasad Madusanka
      Prasad Madusanka

      Useful article. I had to do a lot of R&D to achieve this task. This may help other consultant very well.

      Author's profile photo Sameera Senaratne
      Sameera Senaratne

      very useful article. Implemented in our environment and works.
      Perfect described and understandable.

      Author's profile photo ebsor ---
      ebsor ---

      Why source and target message is same in operation mapping?

      Author's profile photo Chethana Adhikari
      Chethana Adhikari

      Hi Buddhika,

      Thanks a lot for sharing this article. I've been searching for a step-by-step guide for weeks. This is perfect. 🙂

      Author's profile photo Nikhil Shembekar
      Nikhil Shembekar

      in sm58 it is showing error/Function IDOC_INBOUND_ASYNCHRONOUS not found.please suggest.

      Author's profile photo Evgeny Maslenyi
      Evgeny Maslenyi
      Hi Buddhika,
      
      should REST SERVICE – Service Interface be outbound and not inbound?