Symptom
API API_PRODUCT_SRV fails with error M3406 'The costing lot size must not be smaller than the price unit' when extending a Material
Environment
- SAP S/4HANA Cloud Public Edition
- Master Data
Reproducing the Issue
Call the API API_PRODUCT_SRV ( for example API_PRODUCT_SRV/A_Product('MATERIAL')/to_Valuation ) with Method POST and Payload :
{
"InventoryValuationProcedure" : "V",
"PriceDeterminationControl" : "2",
"PriceUnitQty" : "1000",
"Product" : "MATERIAL",
"ValuationArea" : "0001",
"ValuationClass" : "7920",
"to_ValuationCosting" : {
"IsMaterialCostedWithQtyStruc" : true,
"IsMaterialRelatedOrigin" : "X",
"Product" : "MATERIAL",
"ValuationArea" : "0001"
}
}
Cause
Incomplete Payload file
Resolution
If you want the costing view to be created then plant costing is mandatory. If you only want the accounting view, then in the payload you should only provide valuation node and not valuation costing.
Sample input file SAPMATERIALTEMPLATE_PAYLOAD.txt attached using /sap/opu/odata/sap/API_PRODUCT_SRV/A_Product of what a POST request with plant costing would look like to create a material.
Please amend for your own requirements .
Keywords
ProductIsCostingRelevant , KBA , LO-MD-MM , Material Master , Problem
Product
Attachments
SAPMATERIALTEMPLATE_PAYLOAD.txt |