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: 

Create Out-bound idoc using abap program.

Former Member
0 Kudos

Hi All,

How to create outbound idoc using ABAP program. I am trying to use the FM MASTER_IDOC_DISTRIBUTE but this is not creating the idoc in its structure. ie all the segments are lined up continues. e.g. i have total 8 segments in custom idoc where 4 the segment is a child to 3rd segment but created idoc shows all the segments at the same level. i am doing something wrong.. can some one explain how to create outbound doc for a hierarchical structured idoc...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You might have missed one of the mandatory segment in the idoc that's the reason the hierarchy is missed, and moreover your idoc would have been in 26 status.

First of all you need to define the hierarchy in WE30 transaction for that particular basic type and you need to give the control record and data records to the MASTER_IDOC_DISTRIBUTE function module and it will generate the idoc as per definition of the basic type.

Thanks,

Mahesh.

3 REPLIES 3

Former Member
0 Kudos

Hi,

You might have missed one of the mandatory segment in the idoc that's the reason the hierarchy is missed, and moreover your idoc would have been in 26 status.

First of all you need to define the hierarchy in WE30 transaction for that particular basic type and you need to give the control record and data records to the MASTER_IDOC_DISTRIBUTE function module and it will generate the idoc as per definition of the basic type.

Thanks,

Mahesh.

0 Kudos

Hi Mahesh,

You were right! there was a problem with the mandatory segment and now its working fine.

Thanks a lot.

Former Member
0 Kudos

thanks