Setting Up A Simple IDOC-to-IDOC Scenario On SAP PO 7.5 - SAP Blogs

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.

5 | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Aris van Mazijk


October 29, 2016 12 minute read

Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5


Follow RSS feed Like

5 Likes 33,749 Views 8 Comments

Background
Although I considered myself a fairly experienced SAP PI/PO developer in the past, I wasn’t really able to work
with the integration solution from SAP for the last couple of years. Back then it was still called SAP Process
Integration (PI), the go-to version was 7.1 and maybe the most important di erence, there was still an ABAP
stack present! Now that I started freelancing and setting my rst steps towards entrepreneurship I came across
an assignment in which SAP PI experience was required. What looked like a great opportunity to me for a rst
assignment as a freelancer soon turned out to be a reality check.

After the intake with my rst potential client in which they explained the architectural features of their system
landscape to-be I soon realized my acquired PI 7.1 knowledge in the past wasn’t really going to make the cut
with the JAVA stack only, 7.5 version of what is now called SAP Process Orchestration (PO). I could have easily
walked away from the situation with an “I don’t think my skillset matches the requirements of this assignment”
excuse, but I decided to take on the challenge and eventually discovered that my PI 7.1 knowledge wasn’t really
useless at all 😉

Scenario
My client is migrating his current SAP R/3 system to a brand new on-premise S/4HANA environment. If you
haven’t been able to work with a S/4HANA environment, believe me, it’s a Ferrari compared to the traditional
SAP ERP on-premise solution. Anyway, enough on S/4HANA. With this migration there is a requirement to
transfer master data of employees from the current (old) SAP HCM environment to the new S/4HANA
environment through SAP PO. Also, after the initial load of all employees from SAP HCM, every change in the
selected infotypes of an employee in SAP HCM, should also trigger a change in S/4HANA.

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 1/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Proposed Solution
Because of limited time given for this interface (and my limited experience with PO 7.5) we decided to go with a
relatively easy to build IDOC-to-IDOC interface using the IDOC_AAE adapter of SAP PO. This gave me the
opportunity to break in my hands-on experience with PO 7.5 while not worrying too much about the fast
approaching go-live date. An initial load of employees will be triggered through transaction PFAL, while changes
in their respective infotypes will be triggered through change pointers.

Setting up the connections


First and foremost you need to setup all required connections between the sender system, PO and the target
system. In most cases this might have been done already by a SAP Basis consultant but in my case there
weren’t any, so I had to set them up myself. Here’s what I did:

Go to transaction SM59 and create a new TCP/IP connection of type T in your source system.

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 2/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

I named the RFC destination (PD1) after the system name of the PO system. Make sure you use the PROGRAM
ID “PD_RI” later on in your “inboundRA” resource adapter of PO. Select the option “Registered Server Program”
and choose the Gateway Host and Service on which you want to register the PD_RI Program ID. I chose the Host
and Service name of the HCM source system here because I couldn’t get it to work with the Gateway Host and
Service of the PO system (somehow recommended by SAP).

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 3/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Use the “Connection Test” button to test the new connection.

Now that your connection between the source system and SAP PO is set, let’s look into the con guration on the
SAP PO side:

Browse to the SAP Netweaver administrator and go to Con guration->Infrastructure->Application Resources.

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 4/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Filter out the “inboundRA” resource adapter and select the “Properties” tab.

As you can see, the “PD_R1” ProgramID corresponds with the value used in the RFC destination we created in
the previous section. Also, you need to use the same Gateway Service and Gateway Host here as you did in the
before mentioned RFC destination. Also notice the “XI_IDOC_DEFAULT_DESTINATION” destination which will
come in use later in this blog. The property “MaxReaderThreadCount” is usually set to 0 by default. SAP
recommends setting a value between 5 and 10 for this scenario. You might experience some di culties
restarting the inboundRA after setting this property. A restart of the JAVA instance helped me out in this case.

I set the “Local” property to “false” since the Program ID is registered on the Gateway Host and Service of the
sender system. You will have to set this particular property to “true” if you use the PO Gateway Host and Service
to register your Program ID.

Let’s take a look at the before mentioned “XI_IDOC_DEFAULT_DESTINATION” destination in PO. From the SAP
Netweaver Administrator page browse to Con guration->Infrastructure->Destinations and look up the RFC
destination.

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 5/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Make sure this destination points to the sender system from which you’re going to send the IDOCs. Also, make
sure you enter the right user with su cient authorization on the “Logon Data” tab.

The XI_IDOC_DEFAULT_DESTINATION RFC destination is used by PO to retrieve information regarding the


IDOCs from the sender system. You can test the new RFC connection by using the “Ping Destination” button in
the screen shown above.

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 6/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Now that the connections between the sender system and SAP PO are set up, you’ll need to set up the
connection  between SAP PO and the target system. In my case this is the new S/4HANA system. Like the
XI_IDOC_DEFAULT_DESTINATION you’ll need to set this one up in the “Destinations” section of the SAP
Netweaver Administrator:

Make sure the RFC destination created points to the target system for the IDOCs and give the technical user
used on the “Logon Data” tab su cient authorization for the destination system.

Now that we have con gured all required connections between sender system, SAP PO, and target system it’s
time to set up all required objects in the Enterprise Service Repository and the Integration Directory of SAP PO.
https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 7/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Enterprise Service Repository


Setting up objects in the ESR is fairly easy. In my case I had to import the required IDOC HRMD_A05 from both
the HCM sender system and the S/4HANA target system into the ESR. Whether you developed your own IDOC
or you’re using a standard one like me, importing them into the ESR should be relatively easy.

Make sure to create two software component versions (SWCV) one for each system and import the required
IDOC from each system into the SWCV of each corresponding system. Importing IDOCs is accomplished by
right-clicking on your SWCV and selecting the importing option:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 8/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

The user used for importing objects into the SWCV needs su cient authorization for importing objects.

Warning: Importing standard IDOCs like HRMD_A05 might take a while or even cause JAVA HEAP errors
because of the massive size of the IDOC. Make sure you’ll have enough memory available locally (adjust the two
JAVA les for the ESR and IB downloaded when starting the ESR and IB) or server side (ask your Basis
counterpart). 

Now that we have imported the IDOCs from both the sender system and the target system we are ready to
develop a message mapping and subsequently an operation mapping in the ESR. Since I’m using a standard
IDOC and this is somewhat of a 1-on-1 mapping, not a whole lot is required here. Like the SWCV’s created for
both the source system and destination system, I also created a SWCV for the SAP PO system called
“Integration”:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 9/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

I use the SWCV for the SAP PO system for ordering all mapping objects neatly under separate namespaces.

The rst object required, the message mapping is pretty straightforward. You’ll need the IDOCs uploaded from
both systems and add them to the message mapping:

Add the IDOC from the sender system as data type on the left and the IDOC from the target system as data type
on the right. Use the “Map selected elds and substructures if names are identical” button to breeze through the
eld mapping.

Now add an operation mapping to the same namespace and use the IDOC from the target system as source
message and from the target system as target message. Use the above created message mapping as mapping
https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 10/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

program:

This way no data types or message types are required for the scenario. These are all the objects you need from
the ESR! Easy isn’t?

Integration Directory
Now, the objects you’ll need to develop in the integration directory (ID) are pretty straightforward also. You’ll
need a sender and receiver communication channel and an integrated con guration. That’s about it. Let’s look
into the sender channel. Create a communication channel for the sender system which you should have de ned
in the ID as a business system. Make it a “Sender” channel and select adapter type “IDoc_AAE” as adapter of
choice:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 11/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Select the default option for RFC parameters and leave the rest as-is (unless your scenario needs speci c
adjustments o course).

Create a receiver channel for the target system underneath the business system you have de ned for the target
system. Again, select the “IDoc_AAE” adapter, leave the RFC parameters on “Default” and use the RFC
destination you have created for the target system in the destinations section for RFC Client Parameters:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 12/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Now that you have created both communication channels you’ll have to create an integrated con guration. I
wasn’t familiar with this object until now since it wasn’t available in PI 7.1, but in my opinion it neatly organizes
all objects involved in your scenario in one….well…con guration. This is what my ID looks like so far:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 13/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

You’ll need pretty much all the objects you have developed so far in the integrated con guration. Use your
sender communication channel on the “Inbound Processing” tab:

Select your target system as “Communication Component” on the “Receiver” tab:


https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 14/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

On the “Receiver Interfaces” tab select your operation mapping for this scenario as the intended receiver
interface. Here you can also add lters under the “Condition” column:

Use your receiver communication channel on the “Outbound Processing” tab and leave the rest as-is:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 15/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

That’s about it for the integrated scenario object in the ID. Now that everything is in place on the sender, PO and
target side, let’s dive into con guring the IDOC settings on both ends of the scenario.

Setting up the IDOCs


Although we have already set up a lot of the scenario in the previous parts, we still have some work to do so we
can eventually send out and receive the IDOCs on both ends of the scenario. Let’s take a look into the
con guration on the sender system rst.

Through transaction WE21 create an new IDOC port of type “Transactional RFC” and use the RFC destination
created (PD1) in the “Setting up the connections” of this blog:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 16/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

After you created the dedicated IDOC port create a new logical system for the target system (if one doesn’t
exist yet) through BD54:

The client already had logical system BVG_IDOC in place for dedicated IDOC communication, but in your case
you might have to create a new one.

Create a partner pro le of type logical system with WE20 and make it point to the logical system we have just
created:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 17/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Add the relevant message type (HRMD_A05) in the outbound parameters and con gure as displayed below:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 18/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Select the IDOC

port you have created at the beginning of this part and point to the relevant IDOC type. Make sure you use an
authorized user on the “Post Processing” tab.

Now activate the change pointers on a general level with BD61:

And subsequently on a more speci c level with BD50:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 19/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

In order to register the changes made in the selected infotypes you’ll need to create a distribution model
through BD64. Create a new model view with the “Create Model View” button and give it a technical name
suitable for your scenario. Add a message type to your new model view:

Use the logical system of the source as sender and the (new) logical system of the target as receiver. Select the
relevant message type also. Your new model will (kinda) look like this:

As you can see a lter is active that lters out the infotypes needed for my scenario. I added this lter so that
every change made in the selected infotypes will trigger an IDOC and thus changes the infotypes of the target
system equally. Underneath are the infotypes needed in my scenario. O course you can add or delete infotypes
to suit your own scenario:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 20/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Triggering IDOCs from changes


As said before in the “Proposed Solution” part of this blog, an initial load of employees will be send out by IDOCs
through transaction PFAL. This speci c transaction is very handy when you want to send out an IDOC for all (or
speci c) employees with all the infotypes selected:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 21/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

You can either select one employee (as depicted) or select all employees (this might take a while). Make sure to
use the correct receiver and message type.

Subsequent changes in the selected infotypes of employees through (for example) PA30 only trigger IDOCs
after you run BD21 (or report RBDMIDOC) for the relevant message type:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 22/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

In order to receive the generated IDOCs from the sender system your target system needs some con guration
too. Create a partner pro le of type “Logical System” through WE20 and point to the logical system created for
the sender system. If no logical system for the sender present, create one through BD54:

Make sure to add the relevant message type as an inbound parameter and subsequently con gure the
parameter:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 23/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Now that everything is in place for sending and receiving IDOCs through SAP PO, let’s take a short look on the
monitoring options.

Monitoring IDOC tra c


IDOCs can be monitored through transaction WE02 on both the sender (outbound) and the target (inbound)
system:

You can click on the outbound IDOC to see its content on the sender system.

Whenever an IDOC is not present in the WE02 monitor, you might want to check out SM58 and look for RFC
errors on the sender side:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 24/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Monitoring IDOCs on SAP PO is achieved through the “Con guration and Monitoring home” link on the
startpage of SAP PO. Go to tab Monitoring->Adapter Engine->IDOC Adapter Monitor to check up on IDOCs that
are passing through SAP PO:

O course, there are plenty more monitoring options available (message monitoring, communication channel
monitoring), but I’ll stick to the IDOC monitoring for now.

Since this is my rst blog and rst hands-on experience with the JAVA stack only SAP PO 7.5 feel free to leave
suggestions or even corrections on this walkthrough. In no way I’ve had the intention to create the perfect,
complete blog J just wanted to share my experiences and leave you with a walkthrough that might come in
handy when confronted with the same business scenario!

Cheers!

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 25/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Alert Moderator

Assigned tags

SAP Process Integration | HCM (Human Capital Management) | NW ABAP Integration Technology (ALE) | NW ABAP

Remote Function Call (RFC) | NW AS Java Administrator (NWA) |

View more...

Related Blog Posts

External System non-SAP Client to Idoc Adapter (AAE) Part I


By Federico Abait , Apr 07, 2016
Resolve the issue of using IDOC in BPM
By Dai Quach , Jun 22, 2016
IDOC bundling: Elucidation on Con guration step
By Santhosh Kumar Vellingiri , Aug 24, 2008

Related Questions

Processing error = Error adding rst hoplist entry.


By Aris van Mazijk , Nov 04, 2016
Getting error while import idoc objects from sap
By Former Member , Feb 21, 2017
SMQ1 entries in ECC for IDoc interface SAP PO single stack
By Ramu G , Mar 06, 2019

8 Comments

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 26/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

You must be Logged on to comment or reply to a post.

Former Member

November 14, 2016 at 9:55 am

Hi,
Could you let us know about any signi cant di erence in the steps or processes to be noted between 7.4 and
7.5?

Thanks,
Arivarasu S

Like(0)

Aris van Mazijk | Post author

November 17, 2016 at 10:19 am

I’m not sure about the di erence since I haven’t been able to work with 7.4 so I can’t really help you with that.

Aris

Like(0)

Former Member

December 12, 2016 at 9:38 am

Hi Aris,

Very nice tutorial!!!

I would like to report an Idoc from my HCM to a third system, do i need a DT and MT?

Best regards
Sékou

Like(0)

Aris van Mazijk | Post author

December 15, 2016 at 10:51 am

Nope, just upload your IDOC de nition into your repository.

Like(0)

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 27/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Former Member

April 17, 2017 at 2:33 am

Hi,

Thanks for the great work, I’m facing an error “IDoc_AAE sender communication channel is not found”, the error
log in SM58 is kind the same as you’ve posted “Commit fault: ASJ.ejb.005043 (Failed in component:
sap.com/com.sap.aii.ad”

Here’s what I did, I recreated everything in ES Repository and ID, even the business systems in SLD, the RFC
destination in NWA were maintained and can ping successfully, the connection to PO box in sender system
through SM59 was ok.

The inboundRA properties were maintained as follow:

MaxReaderThreadCount      10
GatewayService                    sapgw01
GatewayServer                     <po host FQDN>
Local                                     true(also tried false)
DestinationName                  XI_IDOC_DEFAULT_DESTINATION
ProgramID                            XI_IDOC_DEFAULT_PID

In PO NWA, the RFC XI_IDOC_DEFAULT_DESTINATION was pointing to backend sender system and the
connection was ok too.

I’ve also checked SAP note 2419326 – IDoc_AAE sender communication channel is not found, the resolution
was

“When you try to send CREMAS.CREMAS01 IDocs the interface used for the Sender Communication
Component must be CREMAS.CREMAS01 with the interface namespace “urn:sap-
com:document:sap:idoc:messages”. This is mandatory and applies for all IDoc types. This is a standard
behavior and can’t be changed. ”

but I couldn’t gure it out how to x the problem as I’m kind of new to PO. Could you please provide some
information about how you overcome this issue?

Thanks,

Michael

Like(0)
https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 28/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Manoj K

April 17, 2017 at 10:51 am

Michael,

Check the logs in NWA , you will be having more descriptive error which will help to resolve the issue.

Br,

Manoj

Like(0)

Former Member

April 18, 2017 at 9:03 am

Hi Manoj,

Thanks for the reply, the error was actually discovered in NWA Log Viewer, the content was almost exactly the
same as mentioned in note 2419326, I even did a XPI Inspector catch the XI channel, the result looks like this:

com.sap.aii.af.service.cpa.CPAObjectNotFoundException: Couldn’t retrieve inbound binding for the given P/S/A


values: FP=;TP=;FS=<SID>CLNT<XXX>;TS=;AN=CREMAS.CREMAS01;ANS=urn:sap-
com:document:sap:idoc:messages;

I just can’t gure it out what’s the cause of this problem, as the interface namesapce for sender  in ICO is
con gured for IDoc and can’t be changed, the channel status is ok in pimon as well.

Regards,

Michael

Like(0)

Manoj K

April 18, 2017 at 9:19 am

Michael,

Cross check your ICO if it matches the exact details being sent from ECC:

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 29/30
7/22/2020 Setting up a simple IDOC-to-IDOC scenario on SAP PO 7.5 | SAP Blogs

Sender Business system.


Sender Interface( CREMAS.CREMAS01)
Sender Namespace  (com:document:sap:idoc:messages) .

And try to do dummy change in ICO and re-activate it.

Br,

Manoj

Like(0)

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://blogs.sap.com/2016/10/29/setting-simple-idoc-idoc-scenario-sap-po-7.5/ 30/30

You might also like