I_ChmlCmplncAnlyts2 is a Composite CDS View that provides data about "Dimension Product Assignment" in SAP S/4HANA. It reads from 3 data sources (I_ChmlComposition, I_ChmlCmplncInfo, Composition) and exposes 7 fields.
@AbapCatalog.sqlViewName: 'ICCMPLCNINFOA2'
@AbapCatalog.compiler.compareFilter: true@AbapCatalog.preserveKey: true@AccessControl.personalData.blocking: #REQUIRED@ObjectModel.representativeKey: 'Material'
@EndUserText.label: 'Dimension Product Assignment'
@AccessControl.authorizationCheck: #CHECK@ClientHandling:
{
type: #INHERITED,
algorithm: #SESSION_VARIABLE
}@ObjectModel.usageType:{
dataClass: #MIXED,
sizeCategory: #XL,
serviceQuality: #D
}@VDM.viewType: #COMPOSITE@Metadata.allowExtensions: truedefineview I_ChmlCmplncAnlyts2
asselectfrom I_ChmlCmplncInfo as ChmlCmplncInfo
-- innerjoin Composition
innerjoin I_ChmlComposition as _ChemicalComposition on ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChemicalComposition.ChmlCmplncInfoUUID
and _ChemicalComposition.ChmlCompositionType <> 'MATLBSD1'
and _ChemicalComposition.ChmlCompositionType <> 'MATLBSD2'
and _ChemicalComposition.ChmlCompositionStatus = 'RE'
{
-- UUID of Unpackaged Product
keycast( ChmlCmplncInfo.ChmlCmplncInfoUUID as ehfnd_cci_uuid preserving type ) as ChmlCmplncInfoUUID,
-- Composition Type
key _ChemicalComposition.ChmlCompositionType,
-- UUID of Company Substance from Composition of Unpackaged Product
key _ChemicalComposition._ChmlComponent.SubstanceUUID,
-- Material assigned to Unpackaged Product
keycast( _MaterialAssignment.Material as ehfnd_cci_product preserving type ) as Material,
-- Indicator that Material assigned to unpackaged product is primary
key _MaterialAssignment.MatlAssgmtIsPrimary,
--Market Coverage Country
key _MarketCoverage.Country,
--Material Groupcast(_MaterialAssignment._Product.ProductGroup as ehfnd_cci_material_group_l preserving type ) as MaterialGroup,
--Production Status
_MarketCoverage.ChmlCmplncProdnAllwd,
-- Responsible Unit (used for DCL)
ProdStewardshipRespUnit as ProdStewardshipRespUnit,
-- Indicator that Material is Sold (used for DCL)
MaterialIsSold,
-- Indicator that Material is Transported (used for DCL)
MaterialIsTransported,
-- Indicator that Material is Produced (used for DCL)
MaterialIsProduced,
-- Indicator that Material is Sourced (used for DCL)
MaterialIsSourced,
MaterialIsDisposed,
MaterialIsEmissionRelevant
}
where
ChmlCmplncInfoType = 'BU'
and MaterialIsProduced = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCMATLASSGMT",
"I_CHMLCMPLNCMKTCVRG",
"I_CHMLCOMPONENT",
"I_CHMLCOMPOSITION",
"I_PRODUCT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/