Application Development and Automation 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: 
Read only

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

Former Member
0 Likes
4,749

We have an existing custom program, which populate all the segment values for an Inbound IDoc and call the IDoc function module to create the data through IDoc. My requirement was to extend the IDoc ( say : msg type SHPCON, basic type : DELVRY03 ) and populate those fields in the segment, no further process with those data. I have done the following.

1) WE31 --> Created the new segment

2) WE30 --> Extended the basic type (DELVRY03) and released.

3) WE57 --> Created new entry for this extension.

4) WE82 --> Assigned extension to the msg and basic types.

5) Within the program, located the place where all other segments are getting populated. Populated our custom segment with same process.

But when we are executing the program, the following error is coming in the IDoc.

=================================================================

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

Message no. E0078

Diagnosis

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

This error can have several reasons:

  • The segment ZFILE_INFO is assigned to a group whose header segment does not occur.
  • The segment ZFILE_INFO 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 ).

=======================================================================

Please check the attachment for more details of the issue.

1 ACCEPTED SOLUTION
Read only

che_eky
Active Contributor
0 Likes
2,340

1) The screen shot for WE30 show that your extension is called DELVRY03 and not ZDEL03 which is what you have configured in most places. You need to sort out which is which.

2) The screen shot from WE05/WE02 shows that the IDOC you have created is only based on the basic type DELVRY03. It should be created based on the basic type DELVRY03 and your new extension (DELVRY03 or ZDEL03). When calling the IDOC creation function module make sure that you fill the extension idoc field EDIDC-CIMTYP = your new extension (DELVRY03 or ZDEL03).

Right now the inbound IDOC cannot be parsed as SAP is trying to use basic type DELVRY03 and cannot find your new extension segment. Once you sort out the above the IDOC will be able to be parsed successfully based on the definition of the basic type + extension.

Che

2 REPLIES 2
Read only

che_eky
Active Contributor
0 Likes
2,341

1) The screen shot for WE30 show that your extension is called DELVRY03 and not ZDEL03 which is what you have configured in most places. You need to sort out which is which.

2) The screen shot from WE05/WE02 shows that the IDOC you have created is only based on the basic type DELVRY03. It should be created based on the basic type DELVRY03 and your new extension (DELVRY03 or ZDEL03). When calling the IDOC creation function module make sure that you fill the extension idoc field EDIDC-CIMTYP = your new extension (DELVRY03 or ZDEL03).

Right now the inbound IDOC cannot be parsed as SAP is trying to use basic type DELVRY03 and cannot find your new extension segment. Once you sort out the above the IDOC will be able to be parsed successfully based on the definition of the basic type + extension.

Che

Read only

Former Member
0 Likes
2,340

Hi,

  Sorry that was a copy-paste mistake. It would be ZDEL03 only. However, the point you have mentioned, is absolutely  correct. I missed that EDIDC field. After populating, now its working perfectly.

Thanks a lotttt...