cancel
Showing results for 
Search instead for 
Did you mean: 

Guidance: Update Purchase Order in Custom Business Object or custom reuse elements

0 Kudos
519

Hi community colleagues,

I am building an extension using (or trying to use) In-App extensibility only.

One of the requirements is to Update Purchase Order. To achieve that, I am coding a custom reuse elements to be called later in a custom business object.

The API_PURCHASEORDER_PROCESS_SRV is the one I will use for. I use these tutorials:

https://developers.sap.com/tutorials/abap-extensibility-cbo-execute-outbound-service.html

https://help.sap.com/viewer/f544846954f24b9183eddadcc41bdc3b/1902.500/en-US/a8036fc167d74f4f8e13b022...

Here´s what I did already:

1. creation of custom communication scenario

2. creation of custom outbound service for API_PURCHASEORDER_PROCESS_SRV

3. code

3.1. check service availability

3.2. create client

3.3. service request (get)

3.4. send request and read response

By reading the body, I don´t get JSON data, but some HTML codes. I am not able to read the full message as the string message is limited to 255 characters.

The portion of the body as follow:

"<html><head><meta http-equiv="cache-control" content="no-cache" /><meta http-equiv="pragma" content="no-cache" /></head><body onload="javascript:var url=window.location.hash;if(url&&(0!==url.length)){document.cookie=&quot;oucfarwteufowwvvoreeaozecdowqczbz"

My bet is the system is being redirected to IdP to validate the user.

At this point, I´d like to ask some guidance:

1) Did I get the right idea on how to update Purchase Order? or is there another recommended way (best practice)?

2) If so, any idea on how to overtake this issue? did I miss any setup in S/4HC?

BR,

Pietro

View Entire Topic
0 Kudos

I found the root cause of this issue.

Using In-App extensibility, if you need to call a whitelisted API (standard) you´re gonna use two communication scenarios:

1) outbound service point to path /sap/opu/odata/sap (custom communication scenario).

2) inbound service for the standard API (e.g., SAP_COM_0053).

BR,

Pietro

AnupNair
Active Participant
0 Kudos

Dear mgrilo If you could share a document on the process you followed or create a Blog on this topic, it would be helpful for the community.

Thanks in Advance!