on 2025 Jan 06 6:06 AM
Hello Experts,
Currently i am working on a scenario where the requirement is to update the Production Order Components values from a Third Party software, I am using OData Service:
https://{domain}:{port}/sap/opu/odata/sap/API_PRODUCTION_ORDER_2_SRV/A_ProductionOrderComponent_3(Re...
and testing it with the payload (shared below) :
{
"d": {
"ManufacturingOrder": " 6000004",
"ManufacturingOrderSequence": "0",
"ManufacturingOrderOperation": "0010",
"BOMItem": "6",
"BOMItemCategory": "L",
"BillOfMaterialItemNumber": "0030",
"RequiredQuantity": "5",
"StorageLocation": "FG01",
"Batch": "0000000895"
}
}In Postman, I am getting error as HTTP Status Code 400 with Error Text as
CSRF : Used
Etag i found from getting the metadata through browser.
As referred to SAP API Hub it is having 3 fields as mandatory which are : 1. ReservationItem 2. ReservationItem 3. ReservationRecordType
But not able to find the 3rd field which is ReservationRecordType also kindly provide your feedbacks / solution on this.
Thanks & Regards,
Prathmesh
Request clarification before answering.
Hi @prathmesh009 ,
I’ve reviewed your request to help with the issue. According to the documentation, you indeed need to include the following mandatory fields in the request:
Here’s the link to the documentation: link
According to the documentation, you can only change the following fields:
I followed the documentation, and everything is working for me.
Most likely, you used the sample body from Try Out, which does not suit this API.
Steps to replicate my scenario:
1. Add the x-csrf-token.
2. Make sure to include the ETag in the If-Match header. To do this, make a GET request and copy the LastChangeDateTime value.
Here’s a screenshot showing how to get the LastChangeDateTime:
Here’s a screenshot showing how to insert the ETag in the header:
3. Use the GET request to retrieve the three mandatory fields and insert them into the request.
Example:
A_ProductionOrderComponent_3(Reservation='63',ReservationItem='6',ReservationRecordType='') Then, enter the required body:
{
"RequiredQuantity": "3"
}Execute the request, and the result will be as shown in the screenshot below.
I hope this helps.
BR,
Andrei.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.