Skip to Content
0
Oct 14, 2021 at 11:59 AM

Issue while Creating sales order with line item price

170 Views Last edit Oct 15, 2021 at 12:20 AM 2 rev

Hi Team,

1. I have a problem when creating sales orders from OData API.
I can't write the item list price. This is the JSON request body I used is attached

{
    "Name": "Checking price for orders 8",
    "DataOriginTypeCode": "1",
    "SalesUnitParty": {
        "PartyID": "{{SalesUnitID}}"
    },
    "BuyerParty": {
        "PartyID": "{{CustomerID2}}"
    },
    "PricingTerms": {
        "CurrencyCode": "EUR",
        "GrossAmountIndicator": false
    },
    "Item": [
        {
            "ID": "10",
            "ProcessingTypeCode": "TAN",
            "ItemProduct": {
                "ProductID": "{{ProductID}}"
            },
            
             "ItemPriceAndTaxCalculation": {
                "ItemPriceComponent": [
                    {
                        "Description": "Total Item Net Value",
                        "DecimalValue": "100",
                        "CurrencyCode": "EUR",
                        "BaseMeasureUnitCode": "EA",
                        "BaseDecimalValue": "1"
                    }
                ]
            },
            "ItemScheduleLine": [
                {
                    "Quantity": "3",
                    "unitCode": "EA"
                }
            ]
        }
    ]
}
URL - "https://{{TenantHostname}}/sap/byd/odata/cust/v1/khsalesorder/SalesOrderCollection". and I got the below error
{"error": {"code": "cx_odata_not_creatable_error","message": { "lang": "en","value": "Entity set: ItemPriceAndTaxCalculationCollection is not allowed for creation. Check service metadata."} } }
Other than using SOAP Do we have another way to achieve the above scenario
=========================================================
2. When we are trying to enable the PriceAndTaxCalculationItem under Item Service in OData Services in UI.
Once after selecting it is creating a new entity named "SalesOrderPriceAndTaxCaluculation". Do we have any option for how to enable the "PriceAndTaxCalculationItem"?
Please refer to the screenshots attached below.

Could you please provide the solutions?


Thank you!