Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

PO IDOC routing

Former Member
0 Kudos

We have an R/3 System client 100 and we have two abap programs called ABAP1 and ABAP2 sending the same PO idoc to XI. (It is SAP's IDOC and NOT user defined IDOC)

But now the Receiver is varied depending on the ABAP1 or ABAP2 Program, if it is ABAP1 Program we have to route it the Receiver11 and if it is ABAP2 we have to route it to Receiver22.

Since the two programs ABAP1 and ABAP2 are sitting on the same business system, XI can't differentiate which ABAP program has send it, so at XI level its not possible for us to decide the Receiver.

Whats the best way to deal the above situation.

3 REPLIES 3

ferry_lianto
Active Contributor
0 Kudos

Hi Pete,

Are both program calling FM CLOI_MASTERIDOC_CREATE_LOIROU to generate the routing IDoc?

If they are perhaps you can populate EDIDC-CIMTYP with ABAP1 or ABAP2 in user exits EXIT_SAPLLOI1_006 to distinguish from which program the IDoc generated (Assuming you are not extending the routing IDoc).

This EDIDC-CIMTYP can be used as flag field for data mapping in XI system.

Regards,

Ferry Lianto

0 Kudos

Thanks Ferry, I said its PO idoc, basically its Orders05 IDOC. So how to do that?

Where to check the FM what they are using?

ferry_lianto
Active Contributor
0 Kudos

Hi Pete,

Sorry ... I mis-rread your question.

In order to know which FM is used by message type, you can go to transaction WE64. For your case, go to messages -> outbound messages -> orders -> process code ME10 (which will call FM IDOC_OUTPUT_ORDERS).

In this FM, you can find any user exits available to populate EDIDC-MESCOD or EDIDC-MESFCT.

Regards,

Ferry Lianto