cancel
Showing results for 
Search instead for 
Did you mean: 

REST vs. OData in SAP PO

Dimitri
Active Contributor
335

Hi,

We are struggling to integrate a standard OData API (Condition Record for Pricing in Sales - API_SLSPRICINGCONDITIONRECORD_SRV) residing on an S/4HANA private cloud system. Both an OData and REST adapter are being used, but both throw an error.

I loaded the EDMX into an Integration Suite tenant to get an XSD out of it. That one is being used in the mapping.

OData

When testing, nothing can be observed on the S/4HANA side. This is the error in the SAP PO monitoring: The payload is not an entity object.

REST

Message delivered to S/4HANA, but I see an HTTP 415 in the SAP PO Monitoring. On the S/4HANA side: this is the error in the response:  The server is refusing to process the request because the entity has an unsupported format.

Pointers and insights are welcome!

Many thanks.
Dimitri

Dimitri
Active Contributor

SOLUTION found: the problem was in my mapping. I pushed all in 1 block. Different messages were put in A_SlsPrcgConditionRecordType.
Now, I changed the mapping and individual messages are put in batchChangeSetPart. That was the key to success.

Accepted Solutions (0)

Answers (2)

Answers (2)

helmut_skolaut3
Active Participant
0 Kudos

I have read recently somewhere that you have to do always a GET first to retrieve the XSRF token that you have to add to the header for the POST/PATCH actions on the Odata Service. But not remember if this is always the same or only in certain circumstances.

Wondering how this can be achieved by SAP PO easily - Better to think about Cloud Integration ...

BR Helmut

 

Dimitri
Active Contributor
0 Kudos
Token is fine. That part is not the problem. I can clearly see it in the SAP Gateway traces.
junwu
Active Contributor
0 Kudos

if the payload has only json data, you should disable batch.

Dimitri
Active Contributor
0 Kudos

I assume JSON is the only way forward. The adapter should translate from XML.
And batch processing is the only way to go, to my opinion. We need to be able to process multiple messages, in 1 big source message, in 1 shot.
If not, we face issues with the sequence

What do you mean with "if the payload has only json data"? If you go for batch processing in the adapter, the choice for Atom or JSON disappears

junwu
Active Contributor
0 Kudos
let me ask this way, do you know batch? do you know how to use batch?
Dimitri
Active Contributor
If I knew, the problem wouldn't occur 😉