Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view C_InspSubsetChar.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CINSPSUBSETCHAR
CREATE VIEW C_InspSubsetChar AS
SELECT
_InspSubset.InspectionLot AS InspectionLot,
_InspSubset.InspPlanOperationInternalID AS InspPlanOperationInternalID,
_InspSubset.InspectionSubsetInternalID AS InspectionSubsetInternalID,
_InspSubset.MaterialSample AS MaterialSample,
_InspSubsetChar.InspectionCharacteristic AS InspectionCharacteristic,
_InspSubsetChar._InspectionCharacteristic._InspectionOperation.InspectionOperation AS InspectionOperation,
_InspSubsetChar._InspectionCharacteristic.InspectionMethod AS InspectionMethod,
_InspSubsetChar._InspectionCharacteristic._InspectionMethodVersion._InspectionMethodText[1:Language=$session.system_language].InspectionMethodText AS InspectionMethodText,
_InspSubsetChar._InspectionCharacteristic._InspSpecImportanceCode.InspSpecImportanceCodeText AS InspSpecImportanceCodeText,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecification AS InspectionSpecification,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecificationText AS InspectionSpecificationText,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecificationPlant AS InspectionSpecificationPlant,
_InspSubsetChar._InspectionCharacteristic.InspectionSpecificationVersion AS InspectionSpecificationVersion,
_InspSubsetChar._InspectionCharacteristic.InspSpecIsQuantitative AS InspSpecIsQuantitative,
_InspSubsetChar._InspectionCharacteristic._InspectionSpecificationUnit._Text[1:Language=$session.system_language].UnitOfMeasureTechnicalName AS InspectionSpecificationUnit,
_InspSubsetChar._InspectionCharacteristic.InspSpecRecordingType AS InspSpecRecordingType,
_InspSubsetChar._InspectionCharacteristic.InspSpecUpperLimit AS InspSpecUpperLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecHasUpperLimit AS InspSpecHasUpperLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecLowerLimit AS InspSpecLowerLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecHasLowerLimit AS InspSpecHasLowerLimit,
_InspSubsetChar._InspectionCharacteristic.InspSpecDecimalPlaces AS InspSpecDecimalPlaces,
_InspSubsetChar._InspectionCharacteristic.InspCharacteristicSampleSize AS InspCharacteristicSampleSize,
_InspSubsetChar._InspectionCharacteristic.InspCharacteristicSampleUnit AS InspCharacteristicSampleUnit,
_InspSubsetChar._InspectionCharacteristic.InspSpecSampleQuantityFactor AS InspSpecSampleQuantityFactor,
_InspSubsetChar._InspectionCharacteristic.InspSpecIsMeasuredValueRqd AS InspSpecIsMeasuredValueRqd,
_InspSubsetChar._InspectionCharacteristic._CharcAttribSelectedCodeSet.SelectedCodeSetText AS SelectedCodeSetText,
_InspSubsetChar._InspectionCharacteristic.InspectionMethodPlant AS InspectionMethodPlant,
_InspSubsetChar._InspectionCharacteristic.InspectionMethodVersion AS InspectionMethodVersion,
_InspSubsetChar._InspSubsetResult.InspectionValuationResult AS InspectionValuationResult,
_InspSubsetChar._InspSubsetResult.InspResultValidValuesNumber AS InspResultValidValuesNumber,
_InspSubsetChar._InspSubsetResult.InspRsltNonconformingValsNmbr AS InspRsltNonconformingValsNmbr,
concat (concat (cast (_InspSubsetChar._InspSubsetResult.InspResultValidValuesNumber as abap.char( 20 )),' / '), concat(' ',cast (_InspSubsetChar._InspSubsetResult.InspRsltNonconformingValsNmbr as abap.char( 20 )))) AS InspRsltInspNonConformanceCt,
_InspSubsetChar._InspSubsetResult.InspectionResultMeanValue AS InspectionResultMeanValue,
_InspSubsetChar._InspSubsetResult._CharcAttributeCode.CharacteristicAttributeCodeTxt AS CharacteristicAttributeCodeTxt,
_InspSubsetChar._InspSubsetResult.CharacteristicAttributeCode AS CharacteristicAttributeCode,
_InspSubsetChar._InspSubsetResult.InspectionResultHasMeanValue AS InspectionResultHasMeanValue,
_InspSubsetChar._InspSubsetResult.CharacteristicAttributeCodeGrp AS CharacteristicAttributeCodeGrp,
_InspSubset._InspectionLot AS _InspectionLot,
_InspSubset._InspectionOperation AS _InspectionOperation
FROM I_InspSubsetCharacteristic AS _InspSubsetChar
INNER JOIN I_InspectionSubset AS _InspSubset ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN C_InspSubsetCharSingleRslt AS _InspSubsetCharSingleRslt ON InspectionLot = _InspSubsetCharSingleRslt.InspectionLot AND InspectionCharacteristic = _InspSubsetCharSingleRslt.InspectionCharacteristic AND InspPlanOperationInternalID = _InspSubsetCharSingleRslt.InspPlanOperationInternalID AND InspectionSubsetInternalID = _InspSubsetCharSingleRslt.InspectionSubsetInternalID -- association [1..*]
;