Multi-Mapping without BPM for IDoc Scenarios- Yes, it’s possible!..!!!
Recently I had worked on one requirement where I need to send different IDoc’s to ECC based on RFC lookup value, if RFC look up returns the delivery number ,then I need to send ORDERS CREATE IDoc, if no delivery number then ORDERS CHANGE IDoc to ECC.
I thought of developing this requirement using multi mapping , it avoids using BPM, but unfortunately multi mapping concept not supported by IDoc and HTTP Adapters,
Then alternative is implementing using BPM.
I tried different ways to achieve this requirement without BPM; finally I found the best solution as follows.
If you want to send different IDoc’s to SAP ECC based on some condition check (source data), in this case you don’t required to develop individual mapping’s, use below approach it will work, and no need to write any conditions in Interface determination, write it in operation mapping.
If you want to send multiple different IDoc’s to SAP ECC based on some look up value.
If you want to send different IDoc’s to SAP ECC at same time.
1)Import IDocs from SAP ECC system in to PI using imported objects and export it as a XSD; Change the occurrence of IDoc segment to 1 to Unbounded.
2) Then create a message mapping between source and Target, add two IDocs External definitions (ED_ORDERS_Orders05, ED_ORDCHG_ORDERS05) in Target side, change occurrence of external definitions to 0 to unbounded in signature tab.
Perform RFC Lookup.
Refer below blog for how to perform lookups graphically in PI7.1
SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups
3)Mapping loggic for ORDER Create IDoc:
Here I am passing EVENT as a input to the RFC ,it retrieves the delivery number from SAP,if there is delivery number available for this event then I want to send Order Create IDoc to SAP.
Mapping loggic for ORDER Change IDoc:
If there is no delivery number for EVENT then I want to send Order Change IDoc to SAP.
4) Operation Mapping:
Add outbound service interface in source and imported IDocs in Target, change occurrence of IDocs to 0 to Unbounded.
Create one Sender Agreement and two receiver agreements.
Number of receiver agrements depend on Number of Different IDoc’s you want to send it to ECC.
Create one Interface determination and one Receiver determination.
Two IDocs posted succesfully ,check in WE02 in ECC to see the status of IDoc’s posting.