C_ChmlCmplncMktCvrgCmplncInfo is a Consumption CDS View that provides data about "Compliance Information - For Products" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfo, I_ChmlCmplncMatlAssgmt) and exposes 38 fields. It has 12 associations to related views. Part of development package EHPMA_CNS_ASSESS_MARKETABILITY.
@EndUserText: {
label: 'Compliance Information - For Products'
}@AbapCatalog:
{
sqlViewName: 'CCCMKTCVRGCPLINF',
compiler.compareFilter: true
}
-- Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #CHECK,
// blocking of personal data not required (no personal data fields exposed for material; user can not be blocked)
personalData.blocking: #NOT_REQUIRED
}
-- Client Handling of the view@ClientHandling.algorithm: #SESSION_VARIABLE
-- VDM view type
@VDM.viewType: #CONSUMPTION@Consumption: {
semanticObject: 'PackagedChemicalInfo'
}@ObjectModel:
{
usageType:
{
dataClass: #MASTER,
sizeCategory: #L,
serviceQuality: #C
},
-- Semantic key MATERIAL is used as navigation in the UI since it is defined as nav. parameter in
-- the target mapping of the application. Don't change the 'Product' as navigation from product master to this app does not work.
semanticKey: [ 'Material' ]
}
@Metadata.allowExtensions: true@Search.searchable : truedefineview C_ChmlCmplncMktCvrgCmplncInfo
asselectfrom I_ChmlCmplncInfo as ChmlCmplncInfo
innerjoin I_ChmlCmplncMatlAssgmt as MatlAssgmt on ChmlCmplncInfo.ChmlCmplncInfoUUID = MatlAssgmt.ChmlCmplncInfoUUID
and MatlAssgmt.Material isnotnull
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Additional Information
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Cardinality is okay as one PP has only one UP assigned
/*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] } */association [0..1] to C_ChmlCmplncProdAssgmt as _ChmlCmplncProdAssgmt on $projection.ChmlCmplncInfoUUID = _ChmlCmplncProdAssgmt.ChmlCmplncInfoUUID
and _ChmlCmplncProdAssgmt.ChmlCmplncInfoParentType = 'BU'
-- Branded Product
association [0..1] to C_ChmlCmplncProdAssgmt as _BrandedChmlCmplncProdAssgmt on $projection.ChmlCmplncInfoUUID = _BrandedChmlCmplncProdAssgmt.ChmlCmplncInfoUUID
and _BrandedChmlCmplncProdAssgmt.ChmlCmplncInfoParentType = 'BP'
association [0..1] to I_ProductGroup_2 as _ProductGroupVH on $projection.MaterialGroup = _ProductGroupVH.ProductGroup
-- DG specific associations
association [0..*] to C_ChmlCmplncMktProdAssgmt as _PackagedProducts on _PackagedProducts.ChmlCmplncProdUUID = ChmlCmplncInfo.ChmlCmplncInfoUUID
association [0..*] to C_ChmlCmplncInfoTransptPrmssn as _ChmlCmplncInfoTransptPrmssn on ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChmlCmplncInfoTransptPrmssn.ChmlCmplncInfoUUID
association [0..*] to C_ChCoInfoIntlTransptPrmssn as _ChCoInfoIntlTransptPrmssn on ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChCoInfoIntlTransptPrmssn.ChmlCmplncInfoUUID
association [0..1] to C_ChmlCmplncInfoDngrsGdsDets as _ChmlCmplncInfoDngrsGdsDets on ChmlCmplncInfo.ChmlCmplncInfoUUID = _ChmlCmplncInfoDngrsGdsDets.ChmlCmplncInfoUUID
association [0..1] to C_ChmlCmplncInfoQuickView as _ChmlCmplncInfoQuickVw on $projection.Specification = _ChmlCmplncInfoQuickVw.Specification
association [0..1] to C_ChmlCmplncInfoQuickView as _ChmlCmplncInfoQuickVwUnpckgd on $projection.UnpckgdChemicalComplianceInfo = _ChmlCmplncInfoQuickVwUnpckgd.Specification
association [0..*] to C_LgsPaInsnMktCvrgCmplncInfo as _ChmlCmplncInfoPaInsn on $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfoPaInsn.ChmlCmplncInfoUUID and
$projection.Product = _ChmlCmplncInfoPaInsn.Product
-- Quickview for BP
association [0..1] to C_ChmlCmplncInfoQuickView as _BrnddChmlCmplncInfoQuickVw on $projection.ChmlCmplncBrnddInternalNumber = _BrnddChmlCmplncInfoQuickVw.Specification
association [0..1] to I_PckgdDngrsGoodEnclosureDets as _PckgdDngrsGoodEnclosureDets on $projection.ChmlCmplncInfoUUID = _PckgdDngrsGoodEnclosureDets.ChmlCmplncInfoUUID
{
-- UUID of Chemical Compliance Information
key ChmlCmplncInfo.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
-- Material of Chemical Compliance Information (assigned in material - either Related Products in Product Master OR Compliance Views for Related Packaged Products)
@ObjectModel.readOnly: true@ObjectModel.text.element: [ 'ProductName' ]@Search.defaultSearchElement: true@Search.fuzzinessThreshold: 0.8
@Search.ranking: #MEDIUMkey MatlAssgmt.Material as Material,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Product Master
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
@Consumption.semanticObject: 'Material'
MatlAssgmt.Material as Product,
@Search.defaultSearchElement: true@Search.fuzzinessThreshold: 0.8
@Search.ranking: #HIGH@Semantics.text: true
MatlAssgmt._Product._Text[1: Language = $session.system_language].ProductName as ProductName,
-- Product group@ObjectModel.text.element: [ 'MaterialGroupName' ]@Search.defaultSearchElement: false
MatlAssgmt._Product.ProductGroup as MaterialGroup,
-- Material Group Name
@Search.defaultSearchElement: true
MatlAssgmt._Product._ProductGroup._Text[1: Language = $session.system_language].MaterialGroupName as MaterialGroupName,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Compliance view
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Internal name of chemical compliance information
@Search.defaultSearchElement: true@Search.fuzzinessThreshold: 0.8
@Search.ranking: #LOW@Semantics.text: true
ChmlCmplncInfo.ChmlCmplncInternalName as ChmlCmplncInternalName,
@ObjectModel.virtualElement: true@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT4'
cast('' as ehpma_application) as ChmlCmplncApplication,
@ObjectModel.readOnly: true@ObjectModel.virtualElement: true@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_MKT_CALC_EXIT4'
cast('' as ehfnd_boolean) as ChmlCmplncCustMultiAddrIsActv,
@ObjectModel.virtualElement: true@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_TYPE_IMAGE_CALC_EXT'
@UI.hidden: truecast('' as /ui2/semantic_object) as SemanticObject,
ChmlCmplncInfo.MatlIsNotProdSafetyRlvt as MatlIsNotProdSafetyRlvt,
@ObjectModel.foreignKey.association: '_ChmlCmplncInfoQuickVw'
@ObjectModel.readOnly: true@ObjectModel.text.element: [ 'ChmlCmplncInternalName' ]@Search.defaultSearchElement: true@Search.fuzzinessThreshold: 0.8
@Search.ranking: #MEDIUMcast(ChmlCmplncInfo.Specification as ehfnd_compliance_view preserving type) as Specification,
ChmlCmplncInfo.ProdStewardshipRespUnit as ProdStewardshipRespUnit,
ChmlCmplncInfo.ChmlCmplncInfoType as ChmlCmplncInfoType,
ChmlCmplncInfo.MaterialIsSold as MaterialIsSold,
ChmlCmplncInfo.MaterialIsTransported as MaterialIsTransported,
ChmlCmplncInfo.MaterialIsProduced as MaterialIsProduced,
ChmlCmplncInfo.MaterialIsSourced as MaterialIsSourced,
ChmlCmplncInfo.MatlIsMultiComponentProduct as MatlIsMultiComponentProduct,
ChmlCmplncInfo.ChmlCmplncProdIsResearched as ChmlCmplncProdIsResearched,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Packaged Product Data
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
_PckgdDngrsGoodEnclosureDets.DngrsGoodIsPartiallyPackaged as DngrsGoodIsPartiallyPackaged,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Unpackaged Product Data
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
@Consumption.semanticObject: 'UnpackagedChemicalInfo'
@ObjectModel.foreignKey.association: '_ChmlCmplncInfoQuickVwUnpckgd'
@ObjectModel.readOnly: true@ObjectModel.text.element: [ 'ChmlCmplncInfoUnpckgdProdName' ]
_ChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.Specification as UnpckgdChemicalComplianceInfo,
-- Combined Name of Unpackaged Product
@ObjectModel.readOnly: true@Semantics.text: truecast(_ChmlCmplncProdAssgmt._UnpckgdProdMatDataPrimary.ChmlCmplncInfoCombinedName as ehfnd_cci_up preserving type) as ChmlCmplncInfoUnpckgdProdName,
-- UUID of Unpackaged Product - Used in CL_EHPMA_MKT_CALC_EXIT4 for Calculation of Applications
@ObjectModel.readOnly: true
_ChmlCmplncProdAssgmt.ChmlCmplncProdUUID as ChmlCmplncProdUUID,
-- UUID of Unpackaged Product - Used for Navigation on Object Page to UP Basic Data
@ObjectModel.readOnly: truecasewhen _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID isnotnullthen _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID
else ChmlCmplncInfo.ChmlCmplncInfoUUID
endas ChmlCmplncInfoNavgnLink,
-- UUID of MCP - used for navigation
@UI.hidden: true
ChmlCmplncInfo.ChmlCmplncInfoUUID as MultiComponentProductUUID,
-- UUID of Unpackaged Product - Used for Navigation on Object Page to UP Compliance Assessment
// @ObjectModel.readOnly: true// case// when _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID isnotnull// then _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID
// else ChmlCmplncInfo.ChmlCmplncInfoUUID
// endas CmplRqRsltNavgnLink,
@ObjectModel.readOnly: truecasewhen _ChmlCmplncProdAssgmt.ChmlCmplncProdUUID isnotnullthen _ChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.Specification
else ChmlCmplncInfo.Specification
endas SpecificationNavgnLink,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Branded Product Data
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
@ObjectModel.foreignKey.association: null
_BrandedChmlCmplncProdAssgmt.ChmlCmplncProdUUID as BrnddChmlCmplncInfoUUID,
-- Branded Product -- Internal Number
@Consumption.semanticObject: 'BrandedChemicalInfo'
@Consumption.semanticObjectMapping.additionalBinding: [ { localElement: 'BrnddChmlCmplncInfoUUID',
element: 'ChmlCmplncInfoNavgnLink' } ]@ObjectModel.foreignKey.association: '_BrnddChmlCmplncInfoQuickVw'
@ObjectModel.mandatory: true@ObjectModel.readOnly: true@ObjectModel.text.element: [ 'ChmlCmplncBrnddProdName' ]cast(_BrandedChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.Specification as ehfnd_compliance_view_bp preserving type) as ChmlCmplncBrnddInternalNumber,
-- Branded Product -- Internal Name
@ObjectModel.readOnly: true@Semantics.text: true
_BrandedChmlCmplncProdAssgmt._ChmlCmplncInfoProduct.ChmlCmplncInternalName as ChmlCmplncBrnddProdName,
-- Branded Product -- Material isnot a Branded Product
casewhen _BrandedChmlCmplncProdAssgmt.ChmlCmplncProdUUID isnullthencast('X' as ehfnd_cci_is_not_bp preserving type)
elsecast('' as ehfnd_cci_is_not_bp preserving type)
endas MatlIsNotBrandedProduct,
-------------------------------------------------------------------------------------------------------
// Type Image URL
-------------------------------------------------------------------------------------------------------
@ObjectModel.readOnly: true@ObjectModel.virtualElement@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_TYPE_IMAGE_CALC_EXT'
cast('' asabap.char(255)) as ChmlCmplncTypeImageURL,
_ChmlCmplncInfoQuickVw.PckgdChmlCmplncInfoIsHidn,
_ChmlCmplncInfoQuickVw.UnpckgdChmlCmplncInfoIsHidn,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
// Associations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
_ProductGroupVH,
ChmlCmplncInfo._PurposeAssignment,
ChmlCmplncInfo._Application,
ChmlCmplncInfo._RespUnitForProductStewardship,
_PackagedProducts,
_ChmlCmplncInfoTransptPrmssn,
_ChCoInfoIntlTransptPrmssn,
_ChmlCmplncInfoDngrsGdsDets,
_ChmlCmplncProdAssgmt._ChmlCmplncInfoProduct,
MatlAssgmt._Product,
_ChmlCmplncInfoQuickVw,
_ChmlCmplncInfoQuickVwUnpckgd,
_BrnddChmlCmplncInfoQuickVw,
_ChmlCmplncInfoPaInsn
}
where
ChmlCmplncInfo.MaterialIsSold = 'X'
or ChmlCmplncInfo.MaterialIsProduced = 'X'
or(
ChmlCmplncInfo.MaterialIsSourced = 'X'
and ChmlCmplncInfo.MaterialIsTransported = 'X'
)