Application Development and Automation Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
HendriSitompul
Explorer
5,609

In this blog we will be discuss how to use IDoc receiver adapter in SAP BTP Integration Suite with a simple scenario. We are using S/4 HANA on-premise as the receiver system.

HendriSitompul_0-1726824570161.png

  1. IDoc setup/configuration in S/4 HANA

Define/configure partner profile, partner number, port if not yet setup. In this blog I’ll touch setup that relate to integrate to SAP BTP Integration Suite only.

  1. Go to TCode: SRTIDOC

HendriSitompul_1-1726824771741.png

Choose register service then execute. If the object already registered an error notification will be appear. 

B. Setup webdispathcer & Cloud Connector 

You need setup /configure connection from webdispatcher to your S/4 HANA system. If not yet settle. Then setup virtual mapping in cloud connector to your webdispatcher. I’ll not be explain about it in detail here. But there is a blog as example how to setup virtual mapping in SAP Cloud connector that you can read (link here).

II. Develop an iFlow with simple scenario

HendriSitompul_2-1726825093087.png

A. Message Mapping

In our iFlow there is a local process with label ‘MappingIDoc’. Double click on it and go to message mapping part.

HendriSitompul_3-1726825171358.png

Let say we use IDoc BATMAS03. In this step we will map data came from third party to IDoc BATMAS03.

HendriSitompul_4-1726825220020.png

There are some important fields in the target mapping  structure that should be filled (IDOCTYP, MESTYP, SNDPOR, SNDPRT, SNDPRN, RCVPOR, RCVPRT, RCVPRN).

Open node EDI_DC40. Fill @SEGMENT with constant value 1’ TABNAM with value EDI_DC40. Fill all fields above.

IDOCTYP = IDoc type

MESTYP = Message type

SNDPOR = Sender port

SNDPRT = Sender partner type

SNDPRN = Sender partner number

RCVPOR = Receiver port

RCVPRT = Receiver partner type

RCVPRN = Receiver partner name

Then map all fields in source structure to target structure based on your requirements.

B. IDoc connection configuration

Go to lable 'request reply 1'  then click IDOC connection.

HendriSitompul_5-1726825396364.png

Click ‘connection’ tab.

Fill some parameter that required.

  • Address: http:<hostname>:port/ sap/bc/srt/idoc?type=receiver&sap-client=300

hostname is the virtual host that you define in SAP cloud connector

port is the virtual port that you define in SAP cloud connector

300 is your SAP client number

  • Proxy type : On-premise
  • Location ID is your cloud connector location ID
  • IDoc content type. There 2 type: Application/x-sap.idoc & Text/XML. We choose Text/XML, so later can create multiple request.
  • Authentication. In this sample we use ‘Basic’

HendriSitompul_6-1726825637126.png

After fill all requirement parameters. Let's move to processing tab.

HendriSitompul_7-1726825678829.png

There are 3 type for determination SAP Message ID.

  1. Generate. It will be generate new SAP Message ID in S/4HANA. So, Message ID in BTP Integration Suite will be different with SAP Message ID in S/4HANA
  2. Reuse. Message ID that generated in SAP BTP Integration Suite will use in S/4HANA system
  3. Map. You can map Message ID in SAP BTP Integration Suite with SAP Message ID in S/4HANA

C. Content modifier with label ‘IDoc Reponse’

In our Iflow there is content modifier with lable ‘IDoc response’. Actually this is optional. I put it because I need to capture or record the IDoc number that generated in S/4 HANA as key and keep in custom header property. So, later we can tracking the data.

 After I run try to send data this is the result in SAP BTP Integration Suite Message Monitor Processing.

HendriSitompul_8-1726825796003.png

Note: If you want to know how to setup custom header property in SAP BTP Integration Suite, you can refer to this blog (link here).

Now let’s check the IDoc in S/4 HANA. Go to TCode: WE02

HendriSitompul_9-1726825894226.png

Execute

HendriSitompul_10-1726825932553.png