Symptom
- Calling the API API_PRODUCT_SRV ( Method POST) creates a material but the Gross Weight field is 0 despite being maintained in the payload
- The API API_PRODUCT_SRV allows the creation of Products with Gross Weight field as 0
- The Payload file contains values for the fields "NetWeight" and "WeightUnit" for the API API API_PRODUCT_SRV but the values are not displayed in the Product Master apps or Manage Product Master Data
Environment
- SAP S/4HANA Cloud Public Edition
- Master Data
Reproducing the Issue
Call the API with operation POST , For example /sap/opu/odata/sap/API_PRODUCT_SRV/A_Product and sample Payload
{
"ProductType": "FERT",
"BaseUnit": "PC",
"GrossWeight":"10.00",
"NetWeight":"5.00",
"WeightUnit":"KG",
"to_Description":
[ { "Language": "EN", "ProductDescription": "SAPTEST" } ],
"to_ProductUnitsOfMeasure":{
"results":[
{
"AlternativeUnit":"EA",
"QuantityNumerator":"2",
"QuantityDenominator":"2",
"UnitSpecificProductLength": "2",
"UnitSpecificProductWidth": "3",
"UnitSpecificProductHeight": "4",
"ProductMeasurementUnit":"M",
"BaseUnit":"PC"
}
Cause
incomplete Payload file
The fields "GrossWeight" and "WeightUnit" are not maintained in the Entity "to_ProductUnitsOfMeasure"
Resolution
System works as designed.
Sample of a correct Payload :
{
"ProductType": "FERT",
"BaseUnit": "PC",
"GrossWeight":"10.00",
"NetWeight":"5.00",
"WeightUnit":"KG",
"to_Description":
[ { "Language": "EN", "ProductDescription": "SAPTEST" } ],
"to_ProductUnitsOfMeasure":{
"results":[
{
"AlternativeUnit":"EA",
"QuantityNumerator":"2",
"QuantityDenominator":"2",
"GrossWeight": "10",
"WeightUnit":"KG",
"UnitSpecificProductLength": "2",
"UnitSpecificProductWidth": "3",
"UnitSpecificProductHeight": "4",
"ProductMeasurementUnit":"M",
"BaseUnit":"PC"
}
Keywords
API_PRODUCT_SRV , material master , ODATA , 'Product Master (A2X)' , "API_PRD_MSG/003", POSTMAN , JSON , XML , KBA , LO-MD-MM , Material Master , LO-MD-FIO-MM , Fiori UI for Product Master , Problem