11-09-2011 1:43 PM
Hi,
I have created an IDoc type with 2 header segments ZINVHDR and ZINVTOT and 3 child segments ZBCKORD, ZSRCINV and ZCORDEP. These 3 child segments are under ZINVHDR. Structure is as follows:
a.ZINVHDR
1.ZBCKORD
2.ZSRCINV
3.ZCORDEP
b.ZINVTOT
Now when I fill segements with only one line item and create idoc, it works fine. When there are more than 1 line item it give error status 26. I'm filing all the segments in the same order as shown in the idoc structure above. Code is written in the following way:
Loop at it_header into wa_header.
Fill_seg_zinvhdr.
Loop at it_item into wa_item.
fill_seg_zbckord.
fill_seg_zsrcinv.
fill_seg_zcordep.
Endloop.
Fill_seg_zinvtot.
Create_IDOC.
ENDLOOP.
I'm filling the segment name and idoc data into idoc structure within each of the fill_seg subroutine.
Please help me solve this issue.
Thanks!!!
Regards,
Sriram.
Edited by: Sriram_14880 on Nov 9, 2011 8:27 PM
11-10-2011 9:46 AM
Hello,
When you are creating IDOC, what have you set for number of records in child segment? Is that (1:1)? In that case only one detailed record could be there in child segment. If you set it to (1:20), 20 detailed records could be there in child segment. Hope it helps you.
11-10-2011 1:45 PM
Hi,
Thanks for your reply. For child segments I have set limits as 1 to 9999. For parent segments I have set limits as 1.
Regards,
Sriram
11-11-2011 10:44 AM
Hello Sriram,
please post some more code. How do you fill the sub segments?
Best regards,
Oliver
12-26-2011 2:19 PM
Hi,
I was able to solve this issue. I placed segments in wrong order which was the reason for the error.
Regards,
Sriram.
12-27-2011 9:58 AM