Skip to Content
author's profile photo Former Member
Former Member

Inserting segment E1EDL41 into IDoc type SHPMNT06

Hi Experts,

I have a requirement for IDOC.

If segment E1EDL41 with qualifier 001 is not found for a particular message type, I have to insert that segment.

I have added an Enhancement point in the Include' LV56KF3Q' and I am writing the code. At this point all the idoc data are in INT_EDIDD table.

I can check whether E1EDL41 segment is present or not


E1EDL41 is child segment for E1EDL24, and no mandatory segmnents are given .

E1EDL24 is the delivery item segment, hence it will repeat as many time ITEMS are present.So the child segment will also get repeated.

as many times parnt segment will repeat.

At runtime INT_EDIDD has no Entries for fields PSGNUM, HLEVEL & SEGNUM.

Please tell me how to do so and how to find exact location as where to insert this segment.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 09, 2012 at 11:04 PM

    Hi Sha,

    You can not modify the idoc segment in the middle of idoc processing, it will throw an syntax error, you have to do it before the loop on IDOC data starts.

    READ_IDOC_DATA function module will give you the HLEVEL. SEGNUM is nothing but segment count, it will be equal to your sy-tabix value of a loop on idoc_data, and psgnum is the sy-tabix of your parent segment of current segment, Parent segment you will get from READ_IDOC_DATA FM.

    Best Regards,

    Tapodipta Khan.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.