cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc_error_parse_failure Java IDoc_AAE in PI 7.31 SP11

Former Member
0 Kudos

Hi Experts,

Currently I am working on File to IDoc_AAE scenario in PI 7.31 SP11 NW731EXT_16_REL and Earlier I used to use standard IDoc SHP_OBDLV_CREATE_SLS01 and it used to transfer IDoc to ECC with out any issue after mapping the control record with constant values accordingly but now  I am using custom IDoc Z IDoc type ZSD_PGI01 and the receiver IDoc_AAE adapter is functioning in error and the message failed with error as below:

MP: exception caught with cause com.sap.aii.af.idoc.exception.IDOCAdapterException: Error before sending due to idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: An IDocIllegalTypeException occurred while parsing IDoc-XML for type <ZSD_PGI01>:
state=READING_SEGMENT_STARTTAG, charPosition=339, lineNumber=1, columnNumber=340 .


And when I checked the 339th char position which is SHIP_POINT field with XSD type as string as defined in IDoc structure. 339th char position is highlighted with red dot below.


Thanks,

Nithin.


Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Eng,

The same error code again

Exception caught by adapter framework: (7) IDOC_ERROR_PARSE_FAILURE: An IDocIllegalTypeException occurred while parsing IDoc-XML for type <ZSD_PGI01>:
state=READING_SEGMENT_STARTTAG, charPosition=332, lineNumber=1, columnNumber=333 .

Please find the below snippet.

Thanks,

Nithin.

engswee
Active Contributor
0 Kudos

Hi Nithin

Can you check if all mandatory fields/segment defined in the custom IDoc structure in ECC are populated during runtime?

Regards

Eng Swee

Former Member
0 Kudos

Hi Eng,

Thanks for ur time,there are no mandatory fields in data record but all segments and their attributes are mapped with constants. PFB, snippet of whole data record in which only REF_ITEM is not mapped.

Thanks,

Nithin.

engswee
Active Contributor
0 Kudos

The payload does not match the definition.

In the payload, ZSD_PGI_ITEM is under ZSD_PGI, but in the definition it is under ZSD_PGI_HEADER

nitindeshpande
Active Contributor
0 Kudos

Hi Nithin,

Also there is no field named ZSD_PGI_HEADER in your payload, which is a mandatory field having the occurrence of 1..Unbounded.

Request you to test the mapping using test tab, before activating the mapping.

Regards,

Nitin

Former Member
0 Kudos

Hi Eng,

Perfect, you are right but even during testing in mapping the header segment name is ZSD_PGI_HEADER but during runtime the payload has ZSD_PGI instead. Any idea how the payload takes ZSD_PGI rather than ZSD_PGI_HEADER? How can we solve this?

Thanks,

Nithin.

engswee
Active Contributor
0 Kudos

You will need to check whether all your objects are activated correctly as well as the cache is up-to-date/refreshed.

Just to double check the post mapping result during runtime, can you add an AM logging step in the ICO and check the payload after mapping. Check if that payload is having ZSD_PGI or ZSD_PGI_HEADER. If it is ZSD_PGI, then maybe your objects/caches are incorrect so the mapping is generating incorrect payload during runtime.

Former Member
0 Kudos

Hi Eng,

After enabling AM in ICO it worked like charm. Thanks a lot.

/Nithin.

engswee
Active Contributor
0 Kudos

Brilliant. Glad that it's solved now!

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Eng,Experts,

Would this be an issue with adapter framework patch?

Thanks,

Nithin.

engswee
Active Contributor
0 Kudos

Can you provide screenshot of the field before and after SHIP_POINT?

Sometimes the error could be around the vicinity. If I'm not mistaken, DUE_DATE field is after SHIP_POINT - check that the date format matches expected SAP format, i.e. YYYYMMDD.

Former Member
0 Kudos

Dear Eng,

Thanks for reply, please find the below screen shot.

I tried the below steps as below but atleast even above error code didn't get changed.

1) Checked the string lengths and data type of each fields and validated the each field in payload accordingly. The DUE_DATE & ACTUAL_MOVEMENT_DATE fields are of string length 8 and in format yyyymmdd.

2) I tried to trigger the file with only mandatory elements keeping the control record & segment , begin and other attribute fields mapping with constants as it was earlier with processed standard IDoc. Also tried to disable all the fields in data record except DUE_DATE & ACTUAL_MOVEMENT_DATE & triggered the file but still same above error code.

3) Recreated ICO, receiver Java IDoc channel but still same above error code.

4) In we19 a test IDoc got processed, and used the same data of processed one[status 53] in we05 in actual input file and triggered the data but still the same error code.

Thanks,

Nithin.

engswee
Active Contributor
0 Kudos

Hi Nithin

The DIRECT field in the IDoc control record is wrong. It should be 2 for inbound instead of Constant.

Try changing that to see if it solves the issue.

Regards

Eng Swee

nitindeshpande
Active Contributor
0 Kudos

Hi Nithin,

Can you check if you have mapped the Segment field in the IDoc? You need to map it with a Constant in order to use the mapping.

Regards,

Nitin

Former Member
0 Kudos

Hi Nitin,

Thanks for ur reply, yes I do have mapped and standard IDoc used to work earlier for same ICO but now I replaced the earlier standard IDoc with custom IDoc [Z type] which is not working as expected. PFB. Also I mapped the fields in control record like TABNAM,DIRECT,IDOCTYP,MSGTYP,SNDPOR,SNDPRT,SNDPRN,RCVPOR,RCVPRN with constants. All segments of IDoc mapped with null value.

Thanks,

Nithin.