cancel
Showing results for 
Search instead for 
Did you mean: 

Guidance: update purchase order quantity from the custom business object

0 Kudos
397

Dear community peers,  

I created a cockpit that displays data coming from purchase orders, stock, forecast and outbound deliveries.

Now, I need to implement the following logic: from the CBO the user can update the purchase order.

The system version is S/4HC, so I presume that BAPI, direct update is out of the question. So, I think the only option is "inbound service".

I´d like some guidance on:

1) What´s the best practice recommendation to achieve it?

2) If a service call is the option to go, then I try this out in advance and I ran into issues.

I stick with these tutorials:

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

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

However, both of them, deal with outbound service (consuming a service from SCP). My scenario needs to consume a service in S/4HC. Also,  API_PURCHASEORDER_PROCESS_SRV does not have outbound, but inbound service.

Could someone give a clue or some tutorial explaining how to call inbound service using In-app extensibility?

BR,

Pietro

View Entire Topic
MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pietro

If I understand you correctly, based on the inputs of a record into a CBO you want to update a purchase order? Is that correct? I'm a little curious about the use case but what is updating the CBO? Is it the standard UI screen or another business area context in S/4HC?

Having said that, although I havent done it, you could treat AP_PURCHASEORDER_PROCESS_SRV as an "outbound service" from your CBO--basically the custom logic would call the API on the S/4HC system. Again, I would need to test but this should work.

However, if you could clarify your end to end scenario a bit further maybe we can also come up with better solution.

Thanks,

Marty

0 Kudos

Hi marty.mccormick ,

In ECC, the client has a cockpit based on STOs. So, at one single screen they get information as total forecast, total of outbound deliveries sent, forecast for next months, forecast per day, currently stock, and so on.

Another requirement is (as they do it currently) right from the cockpit they review the quantity asked to central supply chain and decide if they gonna send the quantity request, or increase or decrease and so on.

Here´s where comes into play the API to update PO.

We first suggest move back to standard by using PO update in ME22N and approval via workflow (my inbox app), but they rejected it.

They want to take action from a central point and have the system updating PO automatically according to the quantity they set using this cockpit.

As I stated out in this question, I managed to overcome this issue. Now, I am facing another issue. I´ll investigate it deeper and if I cannot fix it then I will raise a hand.

https://answers.sap.com/questions/13248563/view.html

BR,

Pietro