Symptom
- The flag "Post to Inspection Stock" is set on the Quality Management panel for an Inspection type in Manage Product Master Data but the API API_PRODUCT ( Method GET ) returns the flag as not being maintained:
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental"
Environment
- SAP S/4HANA Cloud Public Edition
- Master Data
Reproducing the Issue
Call the API API_PRODUCT in a GET request using the Entity _ProductPlantQualityManagement
Sample Request :
/sap/opu/odata4/sap/api_product/srvd_a2x/sap/product/0002/ProductPlant/EF_QM/1010/_ProductPlantQualityManagement
Response from API :
"Product" : "EF_QM",
"Plant" : "1010",
"ProdQltyManagementControlKey" : "",
"HasPostToInspectionStock" : false,
"InspLotDocumentationIsRequired" : false,
"QualityMgmtSystemForSupplier" : "",
"RecrrgInspIntervalTimeInDays" : 0,
"ProductQualityCertificateType" : "",
"ProdQualityAuthorizationGroup" : "",
"SAP__Messages" : [
Cause
The "Post to Inspection Stock” field is present in 2 CDS Views : I_PRODUCTPLANT ( Plant Data for Material - field HasPostToInspectionStock ) and I_PRODUCTINSPTYPESETTING ( Inspection type - material parameters- field HasPostToInspectionStock ).
The field which can be seen on the Quality Management panel in Manage Product Master Data is from CDS view I_PRODUCTINSPTYPESETTING and not from the CDS View I_PRODUCTPLANT.
The API is returning the data from CDS view I_PRODUCTPLANT (in other words Plant nodes) where it is blank.
The CDS View I_PRODUCTPLANT field HasPostToInspectionStock is used, if no stock-relevant inspection type has been activated in the inspection setup, and therefore no stock-relevant inspection lots can be created.
If you activate a stock-relevant inspection type, the entry in this field is deselected and can no longer be maintained.
Resolution
System works as designed.
Instead of using the API API_PRODUCT and Entity _ProductPlantQualityManagement to check if "Post to Inspection Stock" is active for a Product , use the CDS view I_PRODUCTPLANT
in conjunction with I_PRODUCTINSPTYPESETTING to check.
Keywords
API_PRODUCT_SRV - A_ProductPlantQualityMgmt , HasPostToInspectionStock , INSMK , MARC , QMAT , insp., material master , KBA , QM-PT-2CL , Quality Planning (Public Cloud) , LO-MD-FIO-MM , Fiori UI for Product Master , Problem
SAP Knowledge Base Article - Public