I have developed a stand alone z-program of idoc type Pexr2002 and message type Payext which creates idoc using MASTER_IDOC_DISTRIBUTE function module, now i have a new requirement to add some new field for cheque payments to bank. so i extended a PEXR2002 idoc , extension: PEXR2002 with Z-segments, after populating the respective data in z-segements and send it to MASTER_IDOC_DISTRIBUTE fm in this standalone z-program, after generation, it appearing without any hierarchy, like i added child segment in E1IDPU1 , but in generated idoc,(WE02) it appeared in last as a parent segment instead of appearing as child segment of E1IDPU1.
I want to ask where did i do wrong? or should I implement a enhancement for MASTER_IDOC_DISTRIBUTE to populate a data into extended Z segements, like we did in other approach other then standalone program, i,e( idoc generation through process code).
Please guide me in this regard.