cancel
Showing results for 
Search instead for 
Did you mean: 

Getting metadata parsing failed error while posting sales order data to s4 hana cloud from sap cpi

former_member241350
Participant
0 Kudos

Hi,

I am posting data to Sales Order Creation ODATA service of S4Hana Cloud from SAP CPI using ODATA adapter, but getting the below error.

com.sap.gateway.core.ip.component.odata.exception.OsciException: setEdmService() : Metadata parsing failed An exception of type 'XMLStreamException' occurred., cause: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,182]
Message: The entity name must immediately follow the '&' in the entity reference.

Can anyone please help with the resolution of this issue?

Also where can we update ODATA Metadata in S4Hana, if this issue is related to Metadata Refresh.

Regards,

Aman Raj

Accepted Solutions (1)

Accepted Solutions (1)

KarthikBangeraM
Active Participant
0 Kudos

Hi Aman,

Have you gone through the below note? It looks similar to your issue. There are 3 resolution steps which you can give a try.

2510796 - The entity name must immediately follow the '&' in the entity reference

Regards,

Karthik

Answers (1)

Answers (1)

KarthikBangeraM
Active Participant
0 Kudos

Hi Aman,

Can you try escaping the character '&' in your data using amp; and then feed it to S4. The xml parser is looking for the entity name amp after '&' which it isn't able to find.

Regards,

Karthik

former_member241350
Participant
0 Kudos

Hi Karthik,

There is no '&' character in my payload which I am sending to S4 Hana.

Regards,

Aman Raj

KarthikBangeraM
Active Participant
0 Kudos

Hello Aman,

Then probably its the Target URL (with a '&' in the resource path) which is causing this issue, please confirm if there is such a character in it. Also, is it possible for you to share the channel screenshot with the resource path details?

If above is true, then alternatively you can also try posting the SOs using an http channel to see it it works.

Regards,

Karthik

former_member241350
Participant
0 Kudos

Hi Karthik,

There is no '&' character in resource path as well.

Regards,

Aman Raj