R_PackagedDangerousGoodTP is a Transactional CDS View that provides data about "Packaged Dangerous Good - TP" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 27 fields with key field ChmlCmplncInfoUUID. It has 4 associations to related views. Part of development package EHDGM_RAP_PACKAGED_DNGRS_GOOD.
@AccessControl.authorizationCheck: #MANDATORY@AccessControl.privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser' ]@EndUserText.label: 'Packaged Dangerous Good - TP'
@Metadata.ignorePropagatedAnnotations: true@ObjectModel.representativeKey: 'ChmlCmplncInfoUUID'
@ObjectModel.sapObjectNodeType.name: 'PackagedDangerousGood'
@ObjectModel.semanticKey: [ 'ChemicalComplianceInfo' ]@ObjectModel.usageType: { serviceQuality: #C, sizeCategory: #M, dataClass: #MASTER }@VDM.lifecycle.contract.type: #SAP_INTERNAL_API@VDM.viewType: #TRANSACTIONALdefine root viewentity R_PackagedDangerousGoodTP
asselectfrom I_ChmlCmplncInfo as ChemicalComplianceInfo
leftouter to one join I_ChmlCmplncProdAssgmt as ProductAssignment on ChemicalComplianceInfo.ChmlCmplncInfoUUID = ProductAssignment.ChmlCmplncInfoUUID and ProductAssignment.ChmlCmplncInfoType <> 'BP'
composition [0..*] of R_PckgdDngrsGoodClassfctnTP as _Classification
composition [0..1] of R_PckgdDngrsGoodEnclrDetailsTP as _EnclosureDetails
composition [0..*] of R_PckgdDngrsGoodHazardNoteTP as _HazardNote
// related pp cci product assignment
// association [1..1] to I_ChmlCmplncProdAssgmt as _ChmlCmplncProdAssgmt on $projection.ChmlCmplncInfoUUID = _ChmlCmplncProdAssgmt.ChmlCmplncInfoUUID
// related pp product
association [1..1] to I_Product as _Product on $projection.Product = _Product.Product
// association [1..1] to I_Product as _UnpackagedProduct on $projection.UnpackagedProduct = _UnpackagedProduct.Product
{
key ChemicalComplianceInfo.ChmlCmplncInfoUUID,
ChemicalComplianceInfo.CreationUTCDateTime,
ChemicalComplianceInfo.CreatedByUser,
ChemicalComplianceInfo.LastChangeUTCDateTime,
ChemicalComplianceInfo.LastChangedByUser,
// ProdStewardshipRespUnit,
ChemicalComplianceInfo.DngrsGdsRespUnit,
ChemicalComplianceInfo.ChmlCmplncInternalName,
// Internal Number
cast(ChemicalComplianceInfo.Specification as ehfnd_vdm_cci_internal_nr preserving type) as ChemicalComplianceInfo,
cast(ChemicalComplianceInfo._PrimaryMaterial.Material as ehfnd_product_in_prod_master preserving type) as Product,
cast(ChemicalComplianceInfo._PrimaryMaterial.Material as ehfnd_cci_raw_material preserving type) as RawMaterial,
ChemicalComplianceInfo.ChmlCmplncInfoType,
ChemicalComplianceInfo.ChmlCmplncProdIsResearched,
ChemicalComplianceInfo.MaterialIsSold,
ChemicalComplianceInfo.MaterialIsTransported,
ChemicalComplianceInfo.MaterialIsSourced,
ChemicalComplianceInfo.MaterialIsProduced,
ChemicalComplianceInfo.MatlIsMultiComponentProduct,
ChemicalComplianceInfo._CreatedByUser,
ChemicalComplianceInfo._LastChangedByUser,
// UP CCI UUID
cast(ProductAssignment.ChmlCmplncProdUUID as ehfnd_cci_up_uuid preserving type) as UnpckgdChmlCmplncInfoUUID,
// UP CCI
cast(ProductAssignment._ChmlCmplncInfoProduct.Specification as ehfnd_vdm_cci_up_internal_nr preserving type) as UnpckgdChemicalComplianceInfo,
// UP CCI Name
cast(ProductAssignment._ChmlCmplncInfoProduct.ChmlCmplncInternalName as ehfnd_cci_unpckgdprod_name preserving type) as ChmlCmplncInfoUnpckgdProdName,
// UP Product - needed for navigation
cast(ProductAssignment._ChmlCmplncInfoProduct._PrimaryMaterial.Material as ehfnd_product_unpackaged_id preserving type) as UnpackagedProduct,
/* Associations */
_Classification,
_EnclosureDetails,
_HazardNote,
_Product
// _ChmlCmplncProdAssgmt
}
where
ChemicalComplianceInfo.ChmlCmplncInfoType = 'PP'
and ChemicalComplianceInfo.MaterialIsTransported = 'X'
and ChemicalComplianceInfo.MatlIsMultiComponentProduct = '' // ignore mcp products