I have been asked to create a pick confirmation idoc to be called from within the MB_POST_DOCUMENT exit, using the Master Idoc distribute FM. I am required to add 2 new segments to the existing idoc, which I have done.
My idoc extension is ZSHPCONX based on the DELVRY03 idoc of message type SHPCON. The structure, including my new segments is as follows:
The extended message type has been added to WE82, against the SHPCON/DELVRY03 message type, and the WE20 output profile has been updated accordingly.
Before I went on leave 10 days ago, everything worked fine. Now, I've added data to the E1EDL37 segment, and I've lost my hierarchy. It now comes out as all at the same level, and this is causing a syntax error on the idoc create.
In WE02 or BD87, the control fields are showing all the necessary data: comparing a successful version of the idoc before my leave to the newly failed version shows all control data is the same.
The E1EDL37 code changes were copied from my existing code, which goes like this:
move 'E1EDL37' to z_idoc_data-segname. move l_hu to ZE1EDL37-exidv. move ZE1EDL37 to z_idoc_data-sdata. append z_idoc_data to IDOC_DATA. clear z_idoc_data.
I'd be greatful if anyone could point out how I've lost my hierarchy structure. Points will be awarded for a solution to this problem.