0

I have to send the goods movement via IDoc from 2 different SAP systems to S/4 HANA via SAP Process Orchestration (PO).

I need to recognize in S/4 HANA from which system the IDoc is coming, do some mapping based on the sender, and after the mapping, I have to book the goods movement.

My solution is to extend the standard IDoc type MBGMCR03 with 1 segment with 1 field (SOURCE_SYSTEM).

  1. How can I fill that field before creating/sending the outbound IDoc?
  2. On the receiving system ( in this case S/4 HANA), where can I do the mapping before using the standard inbound functionality?

The customer does not want to do any mapping in Process Integration (PI).

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
user2419908
  • 137
  • 2
  • 12
  • I'm very beginner in PI/PO, but are you saying PI/PO removes the "sender" of the IDoc? Isn't the flag "Copy control record values from payload" sufficient? There are SAP notes which can help you (728792, 789895, 792333...) If really you don't have the choice, you may use EXIT_SAPLBD11_001 (ALE00001) to change any IDoc field. For instance you may use the field REFMES in the control record. – Sandra Rossi May 03 '19 at 10:37

1 Answers1

0

There is already sender system exists as SNDPRT on EDI_DC40 segment.

<EDI_DC40 SEGMENT="1">
  <TABNAM>EDI_DC40</TABNAM>
  <MANDT>100</MANDT>
  <DOCNUM>405820</DOCNUM>
  <DIRECT>2</DIRECT>
  <IDOCTYP>IDOC_TYPE</IDOCTYP>
  <CIMTYP />
  <MESTYP>MESSAGE_TYPE</MESTYP>
  <SNDPOR>SAPXXX</SNDPOR>
  <SNDPRT>XXXCLNT200</SNDPRT>
  <SNDPFC>LS</SNDPFC>
  <SNDPRN></SNDPRN>
  <RCVPOR>ED_STATU</RCVPOR>
  <RCVPRT>LS</RCVPRT>
  <RCVPRN>LS</RCVPRN>
  <CREDAT>20131010</CREDAT>
  <CRETIM>162137</CRETIM>
  <SERIAL>20131010162137</SERIAL>
</EDI_DC40>
mkysoft
  • 5,392
  • 1
  • 21
  • 30
  • Thanks.. 1st question : the idoc is sent first to PO. When the PO sends the idoc to S/4 HANA , is the sender in the idoc control segment = PO or the sender system? In which exit-point, can i build the mapping using business logic? – user2419908 May 02 '19 at 18:20
  • Inbound function module for processing the idoc, does not have any parameter about the source system – user2419908 May 02 '19 at 18:23
  • I don't have knowledge about PO idoc process. May be you can convert it to xml then make changes and forward as xml to receiver system. – mkysoft May 02 '19 at 19:32
  • Ok the sender system comes in the receiver system.. but by an inbound idoc you have normally a processing function module. The function module does not have any parameter about sender system.. so where i can build my mapping logic? – user2419908 May 03 '19 at 09:46
  • May you can change input type as http idoc inbound on PO system. You create new service for catching them and process as normal xml, then forward to receiver system IDOC xml endpoint (http://[server]:[port]/sap/bc/idoc_xml?sap-client=[client]). – mkysoft May 03 '19 at 14:39