I have to replicate an outbound delivery from ecc to wm system; I know i have to use the idoc SHP_OBDLV_SAVE_REPLICA02.
I Have the following questions :
Thanks in advance
First of all, SHP_OBDLV_SAVE_REPLICA02 is a workflow-based IDoc which is triggered by Workflow process ID WS30000483. So you should check if your event (creation of outbound delivery) is triggered in this process to be sure it will work.
Secondly, if you want to fill segments in a customized way you should find the FM which is fired during IDoc sending. Here is how to do this:
BAPI_IDOC_INPUT1
which just a generic FM which searches corresponding FM from TBDBA/TBDBE mapping tables and if it is not found it throws error. Thirdly, are you at all sure you need especially SHP_OBDLV_SAVE_REPLICA02
for your aims? It is inbound IDoc which is not your case, you need outbound.
I assume you need DESADV message and SD05 process code. Here is how to find FM for this IDoc: go to WE64 tcode, select message type and process code and you will see processing FM for this IDoc
Here is the processing FM for this IDoc in which there is a SEGMENTS_FILL
form where the segments are filled.
Just copy this FM to Z, make necessary corrections and fill into this customizing record in WE64.