cancel
Showing results for 
Search instead for 
Did you mean: 

API - create Purchase order from a Sales Order

0 Kudos

Hello,

we have the requirement to create a Purchase Order in S4 Hana Cloud from a Sales Order created in ECC. I checked API and i cannot find anything applicable for that.

Is there any solution that can cover this requirement?

Thanks and regards

Daniele

Accepted Solutions (1)

Accepted Solutions (1)

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daniele

If there is a Purchase Requisition associated with the Sales Order in ECC then you can use the API API_PURCHASEORDER_PROCESS_SRV and Entities A_PurchaseOrder and to_PurchaseOrderItem ( POST ) to create the Purchase Order

In the Entity there are 2 fields PurchaseRequisition and PurchaseRequisitionItem where you can supply the reference Purchase Req Documentation.

https://help.sap.com/viewer/99a132748cef4fc198ad4500e3704416/latest/enUS/3c55df577ec43528e10000000a4...

I Hope the information is of help

Enda.

0 Kudos

Hello Enda,

thanks for your answer. In our case, there is no purchase requisition. Basically, after Sales Order creation in ECC we need an API that creates a related Purchase Order in SAP S4 Hana Cloud.

I found two API (one is the API that you mentioned):

1) https://api.sap.com/api/MMPUR_PURCHASEORDERREQUEST_IN/overview

2) https://api.sap.com/api/API_PURCHASEORDER_PROCESS_SRV/resource

For sure this inbound APIs allows to create a PO in S4 HANA Cloud, but it is not clear if it can be done from a Sales Order

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

It would depend on the data in the sales order and if it is suffiicient to create the PO (i.e. do all required fields for your scenario to create the PO exist in the sales order).

If you are using SAP Cloud Platform Integration (CPI) you could start with the sales order and then fetch any additional data required for the PO if necessary via additional calls but the APIs you identified above are correct--one is SOAP and one is OData based.

Thanks,

Marty

Answers (1)

Answers (1)

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daniele ,

The creation directly from a Sales Order does not appear to be possible . in the API documenation , there is no field for Sales Order / Sales Order Item so there is nothing to link to the PO to the Sales Order

Best Regards

Enda