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
- Open the Manage Product Master Data app and create a material manually.
- Observe that validations via BAdI CMD_PRODUCT_VALIDATE work as expected.
- Use the OData API like API_PRODUCT_SRV to create a material.
- 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
- SAP Help Portal - BAdIs in Product Master
- SAP Business Accelerator Hub - BD_CMD_PROD_DATA_API_CHECK
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
SAP Knowledge Base Article - Public