SAP Knowledge Base Article - Public

3757882 - Issue with Product Validation BAdI Not Triggering During API-Based Material Creation

Symptom

Validations via BAdI CMD_PRODUCT_VALIDATE work as expected when creating materials manually on the Manage Product Master Data app.

However, Validations fail to initiate when creating materials through OData API like API_PRODUCT_SRV. 

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Open the Manage Product Master Data app and create a material manually.
  2. Observe that validations via BAdI CMD_PRODUCT_VALIDATE work as expected.
  3. Use the OData API like API_PRODUCT_SRV to create a material.
  4. Observe that validations fail to initiate.

Cause

The CMD_PRODUCT_VALIDATE BAdI is specifically designed for the "Manage Product Master Data" Fiori app and operates within the UI application layer rather than the API service layer.

When using API_PRODUCT_SRV, the system bypasses the UI-specific validation framework where your current BAdI implementation resides.

API services often use different processing paths that don't invoke UI-layer BAdIs to optimize performance. 

Resolution

Implement the BD_CMD_PROD_DATA_API_CHECK BAdI which is officially designed to work for both the Manage Product Master Data app and the Unified Product Data API (including the API_PRODUCT_SRV).

See Also

Keywords

CMD_PRODUCT_VALIDATE, BD_CMD_PROD_DATA_API_CHECK, OData API, Manage Product Master Data app, Unified Product Data API, material creation, BAdI validation, API service layer, UI application layer, product data validation, S/4HANA Cloud, Public Edition, Fiori app, validation framework, performance optimization , KBA , LO-MD-MM-2CL , Product Master for Public Cloud , Problem

Product

SAP S/4HANA Cloud Public Edition all versions