cancel
Showing results for 
Search instead for 
Did you mean: 

is there an API that can be used for removing or adding new material in a production order?

Oscar_Graciano
Employee
Employee
0 Kudos

For example, The PO created without components. Later they just add Material at component level and saved it, The reservation and reservation item is created automatically. (Created in S4 hana system without using API). Example W1503 PO


If the customers wants to add new material to PO created with empty components, How can i know what is the reservation and reservation item. Reservation and reservation item need to happen automatically when i added material at component. How can i add new material with the help of API without reservation and res item?

In summary, is there an API that can be used to add new material at item level ?

madhava_munagala
Explorer
0 Kudos

Hi All,

By using the below API, Iam able to update the existing component with the help of reservation and reservation item. We are not able to add new components to PO by using the below one.https://api.sap.com/api/API_PRODUCTION_ORDER_2_SRV/resource/Production_Order_Components_Using_RAP_BO

To change an existing component of a production order we need the reservation and the reservation item number but to add a new component a reservation is not needed. It will be created by SAP upon saving the production order.

Through the API how to add a new component to the production order?
OwenLiu
Product and Topic Expert
Product and Topic Expert
0 Kudos

Removed irrelevant tags.

Accepted Solutions (1)

Accepted Solutions (1)

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Oscar,

With the API it doesn't appear to be possible to add a component

The documentation of the API at the link below has the following constraints :

https://help.sap.com/docs/SAP_S4HANA_CLOUD/d35113ee62644d3abee1aaec148291d9/0a4262096d2e43258df27c59...

With this service, it is not possible to:

  • Delete production orders directly. However, you can set the deletion flag and the deletion indicator for a production order with this service.
  • Create or update production order items, operations, or production resources/tools (PRTs). You can execute the POST and PATCH operations on production order header level only.
  • Create production order components. However, you can execute PATCH operations for components.

This would be missing functionality . Please consider raising a feature request if you would like it added

2963059 ( https://launchpad.support.sap.com/#/notes/2963059 )

Best Regards

Enda

JulianoRomanato
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello graciano18.

How are you? As the answer from enda.fennelly is more than 7 days old and there is no more comment from your side, I have accepted enda.fennelly answer's for this question.

Regards.

Juliano Romanato.

Answers (1)

Answers (1)

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi graciano18

We have the API API_PRODUCTION_ORDER_2_SRV in S/4HANA Cloud

It has an Entity A_ProductionOrderComponent_4 which supports a PATCH operation and includes the material field
https://help.sap.com/docs/SAP_S4HANA_CLOUD/d35113ee62644d3abee1aaec148291d9/8cdaccb89bfa42d8b2c4040f...


https://api.sap.com/api/API_PRODUCTION_ORDER_2_SRV/overview


Have you considered using this ?

Best Regards

Enda

Oscar_Graciano
Employee
Employee
0 Kudos

HI Enda, thank you for the respone.

Please see the comment from customer below:

By using the below API, Iam able to update the existing component with the help of reservation and reservation item. We are not able to add new components to PO by using the below one.https:// api.sap.com/api/API_PRODUCTION_ORDER_2_SRV/resource/Production_Order_Components_Using_RAP_BO

To change an existing component of a production order we need the reservation and the reservation item number but to add a new component a reservation is not needed. It will be created by SAP upon saving the production order.

Through the API how to add a new component to the production order?

madhava_munagala
Explorer
0 Kudos

Hi Enda,

Currently i have used A_ProductionOrderComponent_4, but with the help of this API, we can update the existing material/ requested quantity with the help of reservation and reservation items fields are are mandatory.

FYI

To change an existing component of a production order we need the reservation and the reservation item number but to add a new component a reservation is not needed. It will be created by SAP upon saving the production order.

Through the API how to add a new component to the production order?

Thanks,

Madhava