Skip to Content
0
Former Member
Jul 03, 2007 at 09:58 AM

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

64 Views

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 .