cancel
Showing results for 
Search instead for 
Did you mean: 

Post Material BOM | API_BILL_OF_MATERIAL_V2 - odata v2

jmhvieira
Explorer
0 Kudos
235

Hello experts,

has anyone in this community ever implemented This API? I kindly ask for your assistance.

API: https://api.sap.com/api/OP_API_BILL_OF_MATERIAL_SRV_0002/overview

I want to create a material BOM without items but i couldn't do it, I have some error with my json body, fields are missing. I have looked at the documentation, specifically at the suggested JSON in the API Reference but I wasn't able to understand what is missing.

URL Request: (...)/sap/opu/odata/SAP/API_BILL_OF_MATERIAL_SRV;v=0002/MaterialBOM

HTTP Method: Post

Request body - JSON:

{
    "BillOfMaterialVariantUsage": "1",
    "IsMultipleBOMAlt": false,
    "BillOfMaterialAuthsnGrp": "",
    "IsConfiguredMaterial": true,
    "BOMTechnicalType": "M",
    "BOMGroup": "",
    "BillOfMaterialStatus": "1",
    "IsMarkedForDeletion": false,
    "IsALE": false,
    "BOMHeaderBaseUnit": "PC",
    "BOMHeaderQuantityInBaseUnit": "2",
    "DocumentIsCreatedByCAD": false,
    "ProductDescription": "Super Bike",
    "PlantName": ""
}

Status: 400 Bad Request

Error details:

{
    "errordetails": [
        {
            "ContentID": "",
            "code": "29/853",
            "message": "Data is incomplete",
            "propertyref": "",
            "severity": "error",
            "transition": true,
            "target": ""
        }
    ]
}

 

Thank you,

Best Regards,

João Vieira

 

 

jmhvieira
Explorer
0 Kudos
I was able to solve it
jmhvieira
Explorer
0 Kudos

---------

jmhvieira
Explorer
0 Kudos

This is the body JSON that I'm using:

{
    "Material": "SUPERBIKE",
    "Plant": "",
    "BillOfMaterialVariantUsage": "1",
    "BillOfMaterialVariant": "1",
    "BillOfMaterialAuthsnGrp": "",
    "BOMVersionStatus": "",
    "BOMTechnicalType": "M",
    "BOMGroup": "",
    "BOMHeaderText": "API test",
    "BOMAlternativeText": "",
    "BillOfMaterialStatus": "1",
    "BOMHeaderBaseUnit": "PC",
    "BOMHeaderQuantityInBaseUnit": "2"
}

 

Accepted Solutions (0)

Answers (0)