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: 

Syntax Error in Invoice IDOC

Former Member
0 Kudos

I have created an extension for idoc INVOIC02. I added a segment ZDISC to E1EDK18(qualf 002). In my test system, everything is working fine. But in production, it is giving a syntax error. Following is the error.

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

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

Message no. E0078

Diagnosis

The segment ZDISC does not occur at the current level of the basic type INVOIC02 (extension INVOICEX).

This error can have several reasons:

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

The segment ZDISC does not exist in the syntax description of the basic type INVOIC02 (extension INVOICEX).

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 INVOIC02 (extension INVOICEX).

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

Though , the segment E1EDK18 with qualifier is being created in the IDOC but zdisc created at zero level and not attching to the E1EDK18.

Same thing is working fine in the test system.

All the helpful answers will be rewarded.

Thanks

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Can you verify the IDoc Type/Message (WE82) to ensure the extension was setup/assigned?

Regards,

Ferry Lianto

19 REPLIES 19

ferry_lianto
Active Contributor
0 Kudos

Hi Shahnila,

Is this for outbound IDoc?

If it is then please check the partner profile (WE20) and ensure to add/have the extension specified under IDoc type tab.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

sridhar_k1
Active Contributor
0 Kudos

Check the extension segment transported to the prd system.

Regards

Sridhar

0 Kudos

I've already checked the partner profile. It has basic type as INVOIC02 and extention is INVOICEX.

The extension segment is transported in production.

0 Kudos

Did you verify the extension is defined properly in RPD via WE30? Can you navigate to the segment definition from here as well?

What is the segment release version?

0 Kudos

Yes, I checked WE30 and through segment editor navigated to WE31. Release is 620.

0 Kudos

The user exit populating the extension segment might be adding it wrongly because some condition was true which didnot happen in test system.

Debug the user exit to check it's adding the segments to the idoc_data table in proper place.

REgards

Sridhar

0 Kudos

I debugged user exit in both the systems and the new segment is being appended correctly.

The only thing I noticed is that the hier.level in int_edidd for all the segments is 00 at this point.

But this is true for both the systems.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Can you verify the IDoc Type/Message (WE82) to ensure the extension was setup/assigned?

Regards,

Ferry Lianto

0 Kudos

Yes I checked we82. Idoc basic type and extension are all linked with message type invoic. I know it is weird but i tried to check everything before posting it here. And still it is not working.

I am now double checking it with your suggestions.

0 Kudos

Did you check the minimum and maximum number of times the segment being added in the user exit is with in the limits when you've defined the extension.

Regards

Sridhar

0 Kudos

This segment is at header level and is just being added one time to the segment E1EDK018 when the qualf is '002'.

Min and max in the segment def. is 1 and 1.

0 Kudos

Hi,

I think you have selected ZDISC as mandatory segment . this is added to optional segment : E1EDK18, if segment E1EDK18 is missing in the idoc , you will get the above error.

remove the mandatory option for the Z segment ZDISC.

Check this link , if you miss something it will give details:

http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml

Regards

Appana

0 Kudos

No, It is not added as a mandatory segment. And segment E1EDK18 with qualf 002 exist in the idoc.

0 Kudos

Is there a value in the 'Seg. release in IDoc type' field in the partner profile?

0 Kudos

No there is no value. Should there be some value here?

0 Kudos

If there is no value then it expects the current system version. It uses this version to get the corresponding segment versions for the IDoc. In my case, we are in a basis 620 environment, so unless I explicitly state an alternative release in the partner profile, it will expect the 620 version of each segment. It doesn't sound like this is your issue.

0 Kudos

No this is not. But I put the vrsion 620 there and still the same error.

0 Kudos

After extension, did you do edit->set release in WE30. Idoc modules does not raise syntax error if release is not set in 4.6c but don't know in 6.20.

Regards

Sridhar

0 Kudos

I did the transport again from Development system to production. Nothing appeared to be changed but it worked this time

Thanks to all of you for your replies.