Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC hierarchy getting disturbed when I add new segment

former_member202771
Contributor
0 Kudos

Hi All,

I am trying to add new E1EDPT1/T2 segments for INVOIC02 idoc via customer exit.

Here in order to add this, I am identifying if E1EDP01 is available, and as soon as I see it, I add E1EDPT1/T2 under it.

I have taken care to add hierarchy levels as well.

But the final IDOC comes out without any hierarchy in the structure.

Can you please share your expertise on how to handle it ? Many thanks in advance.

Br,

Anil

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

Please tell us what customer exit it is? Could you show the contents of the IDoc segment(s) you add, and all the components you fill?

former_member202771
Contributor
0 Kudos

Exit used - EXIT_SAPLVEDF_002

Code :

ls_edidd-segnam = 'E1EDPT1'.

ls_e1edpt1-tdid = 'ZOUT'.

ls_e1edpt1-tsspras = is_dobject-spras.

WRITE is_dobject-spras TO ls_e1edpt1-tsspras_iso.

MOVE ls_e1edpt1 TO ls_edidd-sdata.

APPEND ls_edidd TO ct_int_edidd_tab. CLEAR ls_edidd.