on 2021 Oct 07 12:33 PM
I am trying to create Sales orders via OData API calls, by following the postman collections from this GitHub repo - https://github.com/SAP-samples/byd-api-samples/tree/main/Postman
I am giving multiple items while creating and the request body, URL details are as follows:
Request URL: https://{{TenantHostname}}/sap/byd/odata/cust/v1/khsalesorder/SalesOrderCollection
Method: POST
{
"Name": "test Sales Order",
"DataOriginTypeCode": "1",
"DeliveryPriorityCode": "1",
"SalesUnitParty": {
"PartyID": "{{Party_ID}}"
},
"BuyerParty": {
"PartyID": "{{customer_ID}}"
},
"PricingTerms": {
"GrossAmountIndicator": false
},
"Item": [
{
"ID": "10",
"ProcessingTypeCode": "TAN",
"ItemProduct": {
"ProductID": "{{MaterialID_1}}"
},
"ItemScheduleLine": [
{
"Quantity": "2",
"unitCode": "EA"
}
]
},
{
"ID": "20",
"ProcessingTypeCode": "TAN",
"ItemProduct": {
"ProductID": "{{MaterialID_2}}"
},
"ItemScheduleLine": [
{
"Quantity": "1",
"unitCode": "EA"
}
]
}
]
}
Although the sales order is getting created in the Business ByDesign UI, it is not populating "unitCode" for the second item and showing blank. And even when I retrieve the sales order and expand "ItemScheduleLine", the "unitCode" value is null. It works fine with a single item.
What is the root cause for this issue?
Please help!
Request clarification before answering.
I guess you are using the material P100109 of the model company in our partner demo tenants "as-is", isn't it?
If yes, then the master data record of this material does not have sales data assigned and therefore no sales unit of measure. Hence, the business object does not accept the unit "EA", because it is not allowed according the master data. The system saves the sales order with all "good" data, but keeps the status "in preparation". On the UI you find a corresponding error message as well.
The solution would be to check the master data and add the missing sales data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
39 | |
8 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.