You could also get the corresponding outbound IDoc from the receiving system, known the inbound IDoc using transaction BD87 and clicking on the button, "Trace IDocs" on the application toolbar.
Alternatively, at the sender, the corresponding inbound IDoc number could be obtained from the known outbound IDoc number using the same transaction, BD87 by clicking on "Trace IDocs" on the application toolbar.
You can use fm SREL_GET_NEXT_NEIGHBORS for this purpose.
Scenario: An EDI purchase order is received by SAP-XI and forwarded as Inbound ORDERS IDoc to R/3. SAP-XI generates an (outbound) IDoc number which differs from the (inbound) ORDERS05 IDoc in the R/3 system.
Calling fm SREL_GET_NEXT_NEIGHBORS with the following parameters:
OBJECT-OBJKEY = <IDoc number, 16-digits> OBJECT-OBJTYPE = 'IDOC' MAX_HOPS = '99' " <<< get all links
I get the following result:
0000000000133906 IDOC CUSTOMER OUTIDOC 0000000000407402 IDOC INIDOC 000000370383 BUS2012 CUSTOMER OUTBELEG 0010057944 BUS2032 INBELEG
Outbound IDoc number
Inbound IDoc number (ORDERS05)
Sales order (created from inbound ORDERS IDoc)
I am just looking for the same solution and however I implemented the same in my code. And it is working if the Sales Order in Relationships have Inbound and outbound Idocs, it will list in this FM.
But my problem here is: I just executed one inbound idoc and processed successfully. Sales Order got created and the corresponding out- bound Idoc also got created and went to some other system.
But this Incoming Idoc and outgoing Idoc I could not able to see in the relationships(Sales order trxn).
Is somewhere I need to configure this to see in the Salesorder at relationships ???
Appreciate your reply on this one.