on ‎2021 Feb 12 5:42 PM
Hello.
We have the next PO in our SAP 4/HANA SandBox

And need to Assign its GL Account through the API
We are using POST method:
https://my305811-api.s4hana.ondemand.com/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/A_PurchaseOrderItem(PurchaseOrder='4500000511',PurchaseOrderItem='10')/to_AccountAssignment
Whit the next body:
{ "PurchaseOrder": "4500000511", "PurchaseOrderItem": "10", "AccountAssignmentNumber": "01", "GLAccount": "51600000" }
Also Tried with
{ "PurchaseOrder": "4500000511", "PurchaseOrderItem": "10", "AccountAssignmentNumber": "1", "GLAccount": "51600000" }
But we are receiving the next error: Resource not found for segment 'A_PurOrdAccountAssignmentType'

We sent many combinations, with/without cost center, with/without project, with/without account, with/without quantity, always with the same result.
Please, we appreciate your orientation to solve this issue.
Kind Regards,
Margarita Guerrero
Request clarification before answering.
Hi. Did you found a solution for this? I'm getting quite the same error
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you set both the Content-Type and Accept header to application/json in postman? (by default the odata API will expect / return XML formatted data)
Best regards,
Geert-Jan Klaps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 39 | |
| 23 | |
| 20 | |
| 6 | |
| 2 | |
| 2 | |
| 2 | |
| 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.