Application Development 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: 

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

Former Member
0 Kudos

Hi ,

I created a basic type 'ZWXWIDOCTYPE' with 2 Segment type: 'ZWXWIDOC2' and 'ZWXWIDOC' .

When i run my program to create idoc files , it gives me an error (see with tcode we02 ),

here is the error text :

________________________begin of text ____________________________________

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

Message no. E0078

Diagnosis

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

This error can have several reasons:

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

The segment ZWXWIDOC2 does not exist in the syntax description of the basic type ZWXWIDOCTYPE (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 ZWXWIDOCTYPE (extension ).

_____________________end of text _______________________________________

Here is some of my program :

____________________ begin of program _________________________________

control_dat-mestyp = 'ZWXWIDOCMSG'.

control_dat-idoctp = 'ZWXWIDOCTYPE'.

control_dat-rcvprt = 'LS'.

control_dat-rcvprn = p_logsys.

gen_segment = 'ZWXWIDOC'.

select * into corresponding fields of gen_data

from ekko where ebeln = ebeln .

int_edidd-segnam = gen_segment.

int_edidd-sdata = gen_data.

append int_edidd.

endselect.

gen_segment = 'ZWXWIDOC2'.

select * into corresponding fields of gen_data2

from ekpo where ebeln = ebeln .

int_edidd-segnam = gen_segment.

int_edidd-sdata = gen_data2.

append int_edidd.

endselect.

____________________end of program _________________________________

Anyone can help me ?

Thanks a lot .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

after adding those segments you need to release it.

check it menu you can see the release option, you need to release it.

then only it will work

refer the link

https://forums.sdn.sap.com/click.jspa?searchID=3611132&messageID=1232098

<b>Reward points</b>

Regards

2 REPLIES 2

Former Member
0 Kudos

Hi,

after adding those segments you need to release it.

check it menu you can see the release option, you need to release it.

then only it will work

refer the link

https://forums.sdn.sap.com/click.jspa?searchID=3611132&messageID=1232098

<b>Reward points</b>

Regards

0 Kudos

Hi skk,

Thank you ! It works now .