OData service returns empty component lists for variant product BOMs

We’re extracting SBOM data from SAP PLM 2022 via OData service for compliance reporting, but component lists come back empty for variant/configurable products. Standard BOMs work fine, but when we query variant BOMs the response shows the header but zero components.

Here’s what we’re seeing:

GET /sap/opu/odata/sap/API_BOM_DATA/BillOfMaterialSet('100234')
Response: {
  "MaterialBOM": "100234",
  "BOMComponents": []
}

The variant BOM explosion logic seems not to trigger through the OData call. When we check the same BOM in CS03, all components display correctly with their variant conditions. Is there a specific OData parameter or configuration needed for SBOM extraction from configurable materials? Our compliance team needs the full exploded BOM including variant-specific components for regulatory submissions.

Thanks all. Priya, I tried your suggestion with the ExplodeBOM function import but I’m getting a 400 error: “Configuration profile DEFAULT not found for material 100234”. Our variant BOMs use characteristic-based configuration, not profiles. How do we handle that scenario? Is there a way to pass characteristic values directly in the OData call instead of referencing a saved configuration profile?

The issue is that variant BOMs require configuration context to explode. The standard OData service doesn’t automatically provide a configuration profile. You need to pass configuration parameters in your request. Try adding $expand=BOMComponents with additional parameters for variant key or configuration profile. Check SAP Note 3247891 which addresses OData BOM explosion for configurable materials in S/4HANA 2022.

Here’s a comprehensive solution addressing all three focus areas:

OData Service Configuration: The root issue is that the standard BOM OData service (API_BOM_DATA) doesn’t automatically handle variant BOM explosion. You need to use the explosion function import with proper parameters:

  1. Service activation check (transaction /IWFND/MAINT_SERVICE):

    • Verify service API_BOM_DATA is active
    • Check that function import ‘ExplodeBOM’ is registered in service metadata
    • If missing, regenerate service using /IWFND/GW_CLIENT → Execute → GET $metadata
    • Ensure technical service version matches your SAP PLM 2022 support package level
  2. Correct OData query structure for variant BOMs:


GET /sap/opu/odata/sap/API_BOM_DATA/ExplodeBOM?
  MaterialNumber='100234'&
  Plant='1000'&
  BOMUsage='1'&
  BOMApplication='PP01'&
  ConfigurationString='COLOR=RED;SIZE=M;VOLTAGE=220V'
  1. Authorization requirements:
    • Object C_STUE_BER (BOM explosion) with activity 03
    • Object S_DEVELOP (configuration access) for variant characteristics
    • Service user must have these in role assigned via PFCG

Variant BOM Explosion Logic: The explosion requires configuration context that standard queries don’t provide:

  1. Characteristic-based configuration:

    • Query characteristic definitions: GET /sap/opu/odata/sap/API_CONFIGURATION/CharacteristicSet
    • Retrieve valid values for material: Filter by MaterialNumber=‘100234’
    • Build configuration string format: CHARC1=VAL1;CHARC2=VAL2
    • Character limit: 255 chars for ConfigurationString parameter
  2. Alternative using configuration profile:

    • If you have saved configurations in transaction CU41
    • Query: ConfigurationProfile=‘PROFILE_001’ instead of ConfigurationString
    • Profile must exist in table CUKB (configuration database)
    • More efficient for frequently-used configurations
  3. Handling multiple variant conditions:

    • Some components have complex selection conditions (e.g., COLOR=RED AND SIZE IN (M,L))
    • The OData explosion resolves these automatically based on your configuration string
    • Result includes only components matching the provided characteristic values
    • Components with no variant conditions (100% items) always appear

SBOM Extraction for Configurable Materials: For compliance reporting, implement this extraction pattern:

  1. Full query with $expand for nested components:

GET /sap/opu/odata/sap/API_BOM_DATA/ExplodeBOM?
  MaterialNumber='100234'&
  Plant='1000'&
  ConfigurationString='COLOR=RED;SIZE=M'&
  $expand=BOMComponents,BOMComponents/ComponentMaterial
  1. Response parsing for SBOM data:
{
  "d": {
    "MaterialBOM": "100234",
    "BOMComponents": [
      {
        "BOMComponentNumber": "0010",
        "ComponentMaterial": "MAT-001",
        "ComponentQuantity": "2",
        "BOMComponentCategory": "L",
        "VariantCondition": "COLOR=RED"
      }
    ]
  }
}
  1. Filter for compliance-relevant components:

    • Include: BOMComponentCategory IN (‘L’,‘R’,‘N’) - physical materials
    • Exclude: BOMComponentCategory IN (‘T’,‘D’,‘M’) - text/doc/phantom items
    • Check field ComponentScrapPercent for waste calculations
    • Extract ComponentMaterial for substance data lookup
  2. Multi-level explosion for nested assemblies:

    • Enable recursive explosion: $expand=BOMComponents($expand=BOMComponents)
    • Set explosion depth: Add parameter BOMExplosionLevel=‘99’ for full depth
    • Performance consideration: Deep explosions can timeout - limit to level 5 for OData

Implementation Code Pattern:

// JavaScript example for OData query with variant explosion

const bomQuery = {

  method: 'GET',

  url: '/sap/opu/odata/sap/API_BOM_DATA/ExplodeBOM',

  params: {

    MaterialNumber: '100234',

    Plant: '1000',

    ConfigurationString: buildConfigString(characteristics),

    $expand: 'BOMComponents'

  }

};

function buildConfigString(chars) {

  return chars.map(c => `${c.name}=${c.value}`).join(';');

}

Troubleshooting Steps:

  1. Test explosion in SAP GUI first (transaction CS11 with variant conditions)
  2. Verify configuration string format matches characteristic names in CAWN table
  3. Check explosion log in transaction CS12 for any errors
  4. Enable OData tracing: /IWFND/ERROR_LOG to see backend calls
  5. Validate that variant conditions in CS02 are properly maintained

Performance Optimization:

  • Cache configuration strings for frequently-used variants
  • Use batch requests ($batch) when extracting multiple BOMs
  • Implement delta extraction based on change documents (table CDHDR)
  • Consider custom CDS view with built-in explosion logic for better performance

This solution ensures your SBOM extraction captures all components from variant BOMs by properly configuring the OData service, implementing correct explosion logic, and handling configurable material scenarios for compliance reporting.

Kevin’s on the right track. For SBOM extraction, you specifically need to use the BOM explosion function import in the OData service. The query should look like this with function import parameters: /sap/opu/odata/sap/API_BOM_DATA/ExplodeBOM?MaterialNumber=‘100234’&Plant=‘1000’&BOMUsage=‘1’&ConfigurationProfile=‘DEFAULT’. The ConfigurationProfile parameter is critical - it tells the system which variant configuration to use for explosion. Without it, you get the super BOM structure which shows zero components for pure variant items.