Symptom
- Error "A result already exists for insp. lot , operation , characteristic" when using API API_INSPECTIONLOT_SRV with entity A_InspectionResult
- No results are recorded for an Inspection Lot but the API API_INSPECTIONLOT_SRV and Entity A_InspectionResult returns an Error when using method POST
Environment
- SAP S/4HANA Cloud Public Edition
- Quality Management
Reproducing the Issue
Call API /API_INSPECTIONLOT_SRV/A_InspectionResult with Same Payload and Method POST
{
"InspectionLot": "40000000000",
"InspPlanOperationInternalID": "1",
"InspectionCharacteristic": "10",
"InspectionResultStatus": "5",
"InspResultFrmtdMeanValue": "1",
"InspResultValidValuesNumber": 1,
"InspectionResultText": "SAPTEST"
}
Cause
The process "Record Inspection Results in an External System" (SAP Help Documentation) has been setup and followed
With this process you request locking of the characteristic by creating the results record with status '6' using a POST Request
This means the results record is already existing when you want to record the result. With the POST you would create the results record but since it is already existing you get a corresponding error message as response
Resolution
Please use Method PATCH , instead of POST to record the Results.
Keywords
QM_API_ODATA_MSG104 , RREC , QAMR , summarized , KBA , QM-IM-RR-CHR , Characteristic Results , QM-IM-RR-CHR-2CL , Characteristic Results (Public Cloud) , Problem