cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.30 - IDOC_AAE - IDOC_ERROR_PARSE_FAILURE

jegathees_waran
Active Participant
0 Kudos

Hi Friends

We have done one File to IDoc scenario in our PI 7.3 system (SP05). We have used IDoc_AAE adapter as receiver. We have done this scenario using ICO (Integrated Configurtion) AAE.

The parameters in the Receiver communication channel are:

--------------------------------------------------------------------------------

Adapter Type: IDoc_AAE

Version     : SAP BASIS 7.30

Transport Protocol:  tRFC

Message Protocol  :  IDoc XML

RFC Parameters Tab:

RFC Client Parameters :  Default (Recommended)

Destination : XI_IDOC_DEFAULT_DESTINATION_D11

Interface Version: Interface Version 4.0 and Above

SAP Release:  730

Optional Parameters Tab:

The option "External Metadata Required" is not checked.

Advanced Tab:

Control Records in IDoc XML:  Not Mandatory

--------------------------------------------------------------------------------

The destination "XI_IDOC_DEFAULT_DESTINATION_D11" was created in NWA (Configuration --> Infrastructure --> Destinations) with the mandatory parameters and Logon Data is tab is filled with the user which has IDoc authorization in the SAP application system. When we ping destination, it shows the message "Successfully connected to system D11 as user BIS_REMOTE".

When we test the scenario, the file is picked up successfully, but it is failed with the following error in the receiver channel as below.

Error:

     Message processing failed. Cause: com.sap.conn.idoc.IDocParseException: (7) IDOC_ERROR_PARSE_FAILURE: Invalid character encountered within IDocXML for type <DEBMAS06>: state=READING_ATTRIBUTE_VALUE, charPosition=24, lineNumber=1, columnNumber=25, invalidChar=U+0022, sourceSnippet=...DEBMAS06><IDOC BEGIN=""><EDI_DC40

Friends, could you please clarify why the receiver channel throws this error? . How to fix this?

Thanking you.

Kind regards,

Jegathees P.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

Make sure you assign IDOC BEGIN=1 (Constant of value 1) in your Message Mapping, then everything should be fine.

Hope this helps,
Greg

jegathees_waran
Active Participant
0 Kudos

Hi Grezegorz

I have set the value <DEBMAS06><IDOC BEGIN="1"> as you said. The same error is coming. Also, we have not used any mapping in the configuration. This is just pass through interface. (to pass the IDoc XML and to create the IDoc in the reciever SAP system).

Even though we use mapping , the same error is coming.

former_member184681
Active Contributor
0 Kudos

Hi,

Good to know it is a pass-through interface. One more thing: is the IDoc XML file generated from an SAP system, or some 3rd party?

The error description gives you some details on where to look for the source of the problem:

charPosition=24, lineNumber=1, columnNumber=25, invalidChar=U+0022

Check the 25th character of the message payload - you should find a misused quotation mark (") - this is the unicode U+0022 character. Getting rid of this misused character should solve your problem.

EDIT: Find a similar thread here: http://scn.sap.com/thread/2071291 - it was solved by putting IDOC BEGIN=1, and SEGMENT=1 to each segment. And I definitely think it is not an authorization issue, as the error description says: parse error.

Regards,
Greg

jegathees_waran
Active Participant
0 Kudos

Hi Grzegorz and Monika,

Really thank you very much for your reply. The user in the application system has SAP_ALL authorization. So, as you said this Parse error is not related to authorization.

I tried to replace all the SEGMENT= "" with SEGMENT = "1" in the XML.  Still I am getting error in the channel.

Can you show me the simple IDoc XML format  on the receiver end to understand this better ?

former_member184681
Active Contributor
0 Kudos

Hi,

Here is an example IDoc from one of my current scenarios. I just "anonymized" it a little bit, not to provide you real data of my customers. But still it is a well-formed IDoc payload from SXI_MONITOR:

<?xml version="1.0" encoding="UTF-8"?>

<Z_IDOC_EXAMPLE01>
  <IDOC BEGIN="1">
    <EDI_DC40 SEGMENT="1">
      <TABNAM>1</TABNAM>
      <DIRECT>2</DIRECT>
      <IDOCTYP>Z_IDOC_EXAMPLE01</IDOCTYP>
      <MESTYP>Z_IDOC_EXAMPLE</MESTYP>
      <SNDPOR>1</SNDPOR>
      <SNDPRT>1</SNDPRT>
      <SNDPRN>1</SNDPRN>
      <RCVPOR>1</RCVPOR>
      <RCVPRN>1</RCVPRN>
    </EDI_DC40>
    <Z1EXAMPLE SEGMENT="1">
      <FIELD1>000000001234</FIELD1>
      <FIELD2>6</FIELD2>
      <FIELD3>01</FIELD3>
      <MESSAGE>This is an IDoc example</MESSAGE>
    </Z1EXAMPLE>
  </IDOC>
</Z_IDOC_EXAMPLE01>

Hope this helps,
Greg

jegathees_waran
Active Participant
0 Kudos

Hi Grezegorz,

Similar to your Z IDoc XML, I changed our actual XML (DEBMAS) and sent to receiver channel (IDoc_AAE). (Pass through scenario : File to IDoc)  Now, the following error comes in the receiver channel.

-----------------------------------------------------------------------------

IDoc: Error before sending : IDocException com.sap.conn.idoc.IDocParseException: (7) IDOC_ERROR_PARSE_FAILURE: IDoc type "" within the control record does not match IDocXML root tag <DEBMAS06>: state=READING_ENDTAG, charPosition=189, lineNumber=1, columnNumber=190

------------------------------------------------------------------------------------

I could not see any difference between your XML and our XML.

I have attached the complete XML for your reference. (Customer_SeaBlue.xml)

Could you please clarify why this error?

Thanking you.

former_member184681
Active Contributor
0 Kudos

Hi,

The error description gives you details:

IDoc type "" within the control record ...

You should fill IDOCTYP and MESTYP IDoc fields to get rid of this error, as follows:

<IDOCTYP>DEBMAS06</IDOCTYP>
<MESTYP>DEBMAS</MESTYP>

Hope this helps,
Greg

jegathees_waran
Active Participant
0 Kudos

Hi Grezegorz,

Sorry for troubling you. I have entered all the values for the fields in the control record (as you said) and processed it. It shows the error as below.

Message processing failed. Cause: com.sap.conn.idoc.IDocParseException: (7) IDOC_ERROR_PARSE_FAILURE: An IDocConversionException occurred while parsing IDocXML for type <DEBMAS06>: state=READING_FIELD_VALUE_TAG, charPosition=387, lineNumber=1, columnNumber=388

When I checked the XML and count the position, it is in the value "BBBNR>CET</BBBNR>". I am not able to understand why the system is not able to parse. 

I have attached the XML "Customer_SeaBlue_2.xml" for your reference.

Could you please clarify?

Thanking you.

former_member184681
Active Contributor
0 Kudos

I'm a little disappinted with the level of details provided by this error in PI... I checked the IDoc metadata (in we60) and the data type of this field BBBNR is NUMC, which means it cannot accept the "CET" value, because it has to be numeric. Correct that and you should be able to go further.

Regards,
Greg

jegathees_waran
Active Participant
0 Kudos

Hi Grezegorz,

Thank you vey much for helping me. I have removed the field BBBNR and check the remaining fields with WE60 as you said corrected that data and processed it.  Now that IDoc Parase error has gone but different error is coming.

IDoc: SQLException before sending : com.sap.sql.log.OpenSQLException: Failed to set the parameter 9 of the statement >>INSERT INTO XI_IDOC_OUT_MSG ( IDOC_NUMBER , XI_MSG_NO , REF_NUMBER , ORIGINAL_IDOC_NO , IN_TIME , MESSAGING_TYPE , IDOC_TYPE , CIM_TYPE , SEND_PORT , SEND_PRTNR_NO , SEND_PRTNR_TYPE , CLIENT , STATUS , CONTROL_RECORD , CHANNEL_ID , ACK_NEEDED , ACK_RECEIVED , ARCHIVE ) values ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) <<: Cannot assign an empty string to a parameter with JDBC type >>VARCHAR<<.

Though I have set the correct value for the fields SEND_PORT, SEND_PRTNR_NO, still this error is coming.  Do you have any idea on this ?

I have attached the payload "Customer_SeaBlue_3.xml" for your reference.

former_member184681
Active Contributor
0 Kudos

It looks like you solved all the errors related to the message itself. The error you are getting now is a matter of PI's version, see some details here: http://scn.sap.com/thread/2143622. The solution is: import OSS Note 1688780 - IDoc AAE Adapter fails to insert empty strings in database. The note is released by now (in contrary to what was mentioned in the thread above).

Hope this helps,
Greg

kumaramar
Advisor
Advisor
0 Kudos

Hello,

If above note as per reply from Grzegorz helps thats great. In case not, I thought to reply. I was facing same issue 2 days back and the reason for the same is ->

A new property DefaultSenderPort is added for the Java IDoc Adapter managed connection  factory and could be set using NWA in Application Resources tool. Select JavaIDOCAdapter Resource Adapter -> Properties Tab and edit the value for the DefaultSenderPort property. The issue has been resolved by code correction. The archives and the support package stack guide can be found on the SAP Service Marketplace described in SAP Note 952402. You can also check directly Note 1653715. In case you have the above mentioned property you need to fill with value SAP<SID>. or else you can delete this property.

Regards, Amar

jegathees_waran
Active Participant
0 Kudos

Hi Grzegorz,

Thank you very much for your kind help.  I have asked our Basis to import the Java Patches (SCA) file as mentioned in the SAP Note 1688780. I hope it should work.

Once again thank you for your help and guidance. I will close this thread.

Answers (2)

Answers (2)

deviprasad_pothireddy
Active Participant
0 Kudos

I have also faced the same problem and seen the same error,

But based on this error in message monitoring, I did not find solution, Later I have searched the log for communication channel monitoring,

My scenario is JMS to IDOC, without mapping, (channel monitoring provided the exact reason for this). this was due to duplicate jms message id found again,

after modifying value for jms sender (time period of for duplicate check is 0), we rectified this error.

Thanks

Deviprasad.

Former Member
0 Kudos

Please make sure that the user has sufficient authorizations. You need

the S_IDOCDEFT (EDI_TCD = "WE30"; ACTVT = "03") authorization.

jegathees_waran
Active Participant
0 Kudos

Hi Monika,

We have referred the SAP Note 1406965. Instead this object S_IDOCDEFT, the user has the following object  (B_ALE_RECV - ALE/EDI: Receiving IDocs via RFC, EDI_MES - *). This user is working fine if we configure the scenario using classical method (IDoc Adapter). If we add S_IDOCDEFT to the user, will the problem solve?

Former Member
0 Kudos

Dear Jegatheeswaran

Could you please add the object and then let me know the result? Also

Idoc AAE does not support SEGMENT="" as of now. As per Idoc

definition(EDI_DC40) the value cannot be empty.

It was allowed on ABAP Idoc adapter (7.0 7.1), but not supported Idoc AAE (i guess because of performance).

Map required attributes to constant "1"

Regards

Monika


siddhesh_pathak4
Contributor
0 Kudos

Hello,

Could you please tell us how this got resolved?

Thanks,

Siddhesh

sahithi_moparthi
Contributor
0 Kudos

Hi,

Please refer this sap note.May hep http://scn.sap.com/thread/3171933

Thanks,

Sahithi M

sahithi_moparthi
Contributor
0 Kudos

Hi,

Please refer this sap note.May hep http://scn.sap.com/thread/3171933

Thanks,

Sahithi M