Skip to Content
0
Former Member
Jul 10, 2009 at 01:36 AM

Issue with outbound idoc segment population

303 Views

Hi All,

I was using custom idoc to populate the data, i can able to successfully create an Idoc with both 03 status also. But the problem is when i was populating 4 segments in the same hierarchy it was working fine. When i was populating the other segment then it was ending with 26 status. Can any one look in to this issue.

The Idoc structure is like this

iDOC |----


Segment1 " Problem with Segment1 |----
Segment2 |----
Segment21 |----
Segment22 |----
Segment23 |----
Segment2 |----
Segment21 |----
Segment22 |----
Segment23

When i was populating segment2, segment21, segment22,Segment23 then everything is working fine, but when i populate Segment1 then it was throwing 26 status - "Segment order if wrong ...etc"

I am using the below code.

  
LOOP AT ITAB_SEGDATA.
NUM1 = NUM1 + 1.
    ITAB_EDIDD-SEGNAM = 'ZSEG_2'.     " SEGMENT NAME
    ITAB_EDIDD-SEGNUM = NUM1.                           " SEGMENT NUMBER
         ITAB_TEMP_SEGDATA-EBELN1 = ITAB_SEGDATA-EBELN1.
         ITAB_TEMP_SEGDATA-LIFNR1 = ITAB_SEGDATA-LIFNR1.
         ITAB_TEMP_SEGDATA-EBELP1 = ITAB_SEGDATA-EBELP1.
         ITAB_TEMP_SEGDATA-MENGE1 = ITAB_SEGDATA-MENGE1.

         MOVE ITAB_TEMP_SEGDATA TO ITAB_EDIDD-SDATA .
         APPEND ITAB_EDIDD.

         NUM1 = NUM1 + 1.

NUM1 = NUM1 + 1.
    ITAB_EDIDD-SEGNAM = 'ZSEG_21'.     " SEGMENT NAME
    ITAB_EDIDD-SEGNUM = NUM1.                           " SEGMENT NUMBER
         ITAB_TEMP_SEGDATA-EBELN1 = ITAB_SEGDATA-EBELN1.
         ITAB_TEMP_SEGDATA-LIFNR1 = ITAB_SEGDATA-LIFNR1.
         ITAB_TEMP_SEGDATA-EBELP1 = ITAB_SEGDATA-EBELP1.
         ITAB_TEMP_SEGDATA-MENGE1 = ITAB_SEGDATA-MENGE1.

         MOVE ITAB_TEMP_SEGDATA TO ITAB_EDIDD-SDATA .
         APPEND ITAB_EDIDD.

         NUM1 = NUM1 + 1.

<< Removed for formatting >>

   ENDLOOP.

Edited by: Jaya Sri on Jul 10, 2009 3:37 AM

Moderator message - Please try to respect the 2,500 character limit for posts for formatting reasons

Edited by: Rob Burbank on Jul 10, 2009 11:16 AM