04-09-2010 4:55 PM
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
04-09-2010 7:11 PM
Hello Fakher,
Put a break point in FM MASTER_IDOC_DISTRIBUTE and Check your idoc data is in the proper order of WE30->DELVRY03.
The user exit you are using is the correct one as long as your process code is DELV or the FM is IDOC_OUTPUT_DELVRY.
04-09-2010 7:11 PM
Hello Fakher,
Put a break point in FM MASTER_IDOC_DISTRIBUTE and Check your idoc data is in the proper order of WE30->DELVRY03.
The user exit you are using is the correct one as long as your process code is DELV or the FM is IDOC_OUTPUT_DELVRY.
04-12-2010 8:29 AM
Hello Asik,
Thank you for your answer. But, you said, the same order in idoc data than WE30? You mean, segment "E1TXTH8" must be inserted just after "E1EDT13"?? I should so parse all the idoc_data to check which segments available to respect order? What is so the proper way to insert segment?
Thank you again.
Edited by: Fakher Baklouti on Apr 12, 2010 9:30 AM
04-12-2010 10:27 AM
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.
04-13-2010 11:49 AM