Application Development and Automation 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: 
Read only

Segment with Child Segments

Former Member
0 Likes
2,332

Hi Folks,

I have created an IDoc in which I have a parent one segment and 2 child segments. I'm trying to send the IDoc through a custom program. If there are only fields inside a segment I know how to populate the IDoc data structure but I don't have any Idea how to populate an IDoc data structure if the sengment has child segments also.

Kindly Help.

Regards,

santosh

That is code that he provided, though you're right, it's not very descriptive/clear code. He also left out assigning the segment number, parent segment, and length fields. However, if you would just take some time to look at the EDIDD structure, you should be able to figure it out. You also have many outbound process code examples available in the standard system to look at.

3 REPLIES 3
Read only

Former Member
0 Likes
1,274

Hi,

Along with the parent Segment , populate Child segment also.

But here you need to give hierarchy level for each segment.

ex:

wa1-vbeln = it_tab-vbeln.

wa1-vkorg = it_tab5-vkorg.

wa-segnam = 'E1EDL20'.

wa-sdata = wa1.

wa-hlevel = 1.

append wa to t_edidd.

wa2-i_ibase = it_tab5-ibase.

wa2-i_qty = it_tab5-amount.

wa2-i_dat = it_tab5-valfr.

wa-segnam = 'ZIBASE'.

wa-sdata = wa2.

wa-hlevel = 2.

append wa to t_edidd.

here E1EDL20 is parent segment and ZIBASE is child segment.

Regards,

Lokeswari.

Read only

0 Likes
1,274

Hi Lokeshwari,

Thank you very much for your reply. This part of the code is not understandable for me. Kindly provide a brief code.

Regards,

santosh

Read only

0 Likes
1,274

That is code that he provided, though you're right, it's not very descriptive/clear code. He also left out assigning the segment number, parent segment, and length fields. However, if you would just take some time to look at the EDIDD structure, you should be able to figure it out. You also have many outbound process code examples available in the standard system to look at.