cancel
Showing results for 
Search instead for 
Did you mean: 

sap PO: error on IDOCXmlToFlatConvertor

former_member745782
Active Participant
0 Kudos

hello everybody,

we are working with a SAP PO 7.4.

We designed a interface Idoc ->PO->FTP; the idoc is Z and we are following this document:

We want write a flat file starting from idoc so we decided to use IDOCXmlToFlatConvertor in the module processor.

After sending the idoc we have an error on Message Monitor:

Exception caught by adapter framework: (7) IDOC_ERROR_PARSE_FAILURE: An IDocConversionException occurred while parsing IDoc-XML for type <SHPMNT01>:
state=READING_FIELD_VALUE_TAG, charPosition=2506, lineNumber=1, columnNumber=2507


Transmitting the message to endpoint <local> using connection IDoc_AAE_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.conn.idoc.IDocParseException: (7) IDOC_ERROR_PARSE_FAILURE: An IDocConversionException occurred while parsing IDoc-XML for type <SHPMNT01>:
state=READING_FIELD_VALUE_TAG, charPosition=2506, lineNumber=1, columnNumber=2507


any suggestion?

why in second part of message PO wrote IDoc_AAE? the receiver  FTP Communication Channel have a different name. IDoc_AAE is the inbound adapter.


thanks in advance


Alessandro


Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor
0 Kudos

Hi Alessandro,

In Java-only scenarios, when you use Integrated Configuration, Messaging System steps of message processing are executed in sender adapter queue. Since you have a scenario IDoc to FTP (sender adapter is IDoc_AAE), you see evidence of message being handled by IDoc_AAE consumer thread in message audit log and error details.

Regards,

Vadim

former_member745782
Active Participant
0 Kudos

thanks a lot Vadim!

so, have u a idea where is the problem or a suggestion for fix the error?

vadimklimov
Active Contributor
0 Kudos

Alessandro, can you check erroneous IDoc: please find segment field that is located at an offset specified in the error (character offset 2506 from the beginning of an IDoc) and verify its content / value against its type. Is there any mismatch?

It is also possible to disable IDoc field types validation when using adapter modules IDOCFlatToXmlConvertor and IDOCXmlToFlatConvertor to avoid this error - see detains regarding this functionality in SAP Note 2094460. But when field type validation is disabled, it may potentially result in generation of IDoc with invalid field content, so it should be used with caution.

Regards,

Vadim

former_member745782
Active Participant
0 Kudos

hi Vadim!

sorry for late replay.

We tried with a standard idoc and everything work fine.

The problem is with a idoc extended.

Do you this is not possible use this Converter with custom or extended idoc?

thanks

Alex

vadimklimov
Active Contributor
0 Kudos

Hi Alessandro,

Yes, this module should work well for both SAP standard IDoc types as well as their extensions. I have just tested this in our internal system (SAP PO 7.4 SP09) and it worked well for me for an IDoc extension.

Regards,

Vadim

former_member745782
Active Participant
0 Kudos

thanks a lot!

so probably we have problem in this kind of idoc

former_member183816
Active Participant
0 Kudos

This is the most popular error in IDOC_AAE adapter 

It normally comes, when you violate some field constraints as per your IDoc xsd. For example, field is defined as Date while you are trying to convert/take it as String.

And it is very difficult to pinpoint the exact erroneous field because chaPosition indicates the position after conversion which won't be visible anywhere. So check for such kind of fields in your payload.

vadimklimov
Active Contributor
0 Kudos

IDoc field that caused error IDOC_ERROR_PARSE_FAILURE, can be figured out by checking IDoc XML and finding IDoc field located at a character position indicated in error details, within that IDoc XML. For IDoc receiver flow, this means, we need to check IDoc XML message which is a message after mapping - if it is not shown in Message Monitor already, you may check logging configuration and enable logging after mapping step in corresponding Integrated Configuration to see PI message payload after mapping execution.

Regards,

Vadim

former_member745782
Active Participant
0 Kudos

ok,

I try

former_member745782
Active Participant
0 Kudos

so I found the problem:

actually the field STZKL in idoc SHPMNT01 is defined as DEC but in the idoc i founded a String.

I removed this field from mapping and now everything is working fine.

Thanks a lot to everybody

Alessandro

Answers (0)