Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Error during syntax check of IDoc (outbound)

Hello,

I did an insert into idoc_data of segment E1TXTH8 (level 3 - as child of E1EDL20) and E1TXTP8 (level 4 as child of E1TXTH8).

inside user-exit ZXTRKU02.

But idoc is created with error 26 (and hierarchy is not respected! (WE05)).

Am I using the right user-exit or i miss something in the sequence while insert??

Error:

*****************************************

EDI: Syntax error in IDoc (segment cannot be identified)

Message no. E0078

Diagnosis

The segment E1TXTH8 does not occur at the current level of the basic type DELVRY03 (extension ).

This error can have several reasons:

The segment E1TXTH8 is assigned to a group whose header segment does not occur.

The segment E1TXTH8 does not exist in the syntax description of the basic type DELVRY03 (extension ).

The sequence of segments in the group in which the segment appears is incorrect.

Previous errors ('mandatory' segment or group missing) may be due to this error.

Procedure

Please check the IDoc or the syntax description of the basic type DELVRY03 (extension ).

*****************************************************

Thank you in advance for your help.

Edited by: Fakher Baklouti on Apr 9, 2010 7:12 PM

replied

Hello Faker,

It depends on the previous available segment.

Here is the procedure,

1. Get all the segments from the database table IDOCSYN where basic type is DELVRY03

2. Sort them by Sequential number in DESCENDING

3. Get the Index (say GV_INDEX) of the segment in IDOCSYN which you want to insert or edit

4. LOOP internal table of IDOCSYN from index GV_INDEX and check for the availability of the segment of IDOCSYN in idoc data

5. If it is success, break the loop and now you got the previous available segment

6. Now just insert your segment in the idoc table just after it.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question