P_ChmlCmplncInfoAssgdPCIdfr is a Consumption CDS View that provides data about "Assigned Product Identifiers" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfo, I_PCPrptyRootType) and exposes 9 fields. It has 1 association to related views. Part of development package EHFND_CNS_CCI.
@AbapCatalog.viewEnhancementCategory: [#NONE]@EndUserText.label: 'Assigned Product Identifiers'
--Access Control: Authorizations Checks
@AccessControl.authorizationCheck: #NOT_REQUIRED
--VDM view type
@VDM.viewType: #CONSUMPTION@VDM.private: truedefineviewentity P_ChmlCmplncInfoAssgdPCIdfr
asselectfrom I_ChmlCmplncInfo as ChemicalComplianceInfo
innerjoin I_PCPrptyRootType as PCPrptyRootType on PCPrptyRootType.DomainValue = 'EHFNDD_ID'
--Join data from CCI Identifiers with status In Progress => Active or draft
leftouter to one join I_ChmlCmplncIdfr as IdentifierInProgress on IdentifierInProgress.ChmlCmplncIdfrParentUUID = ChemicalComplianceInfo.ChmlCmplncInfoUUID
and IdentifierInProgress.ChmlCmplncIdfrProcgStatus = 'IP'
and IdentifierInProgress.ChmlCmplncIdfrParentType = 'CCI'
--Join data from CCI Identifiers with status Released => only active, as released identifiers are not editable
leftouter to one join I_ChmlCmplncIdfr as IdentifierReleased on IdentifierReleased.ChmlCmplncIdfrParentUUID = ChemicalComplianceInfo.ChmlCmplncInfoUUID
and IdentifierReleased.ChmlCmplncIdfrProcgStatus = 'RE'
and IdentifierReleased.ChmlCmplncIdfrParentType = 'CCI'
--Dummy constant selection to solve issues withcase-statements with constants (notnull-preserving)
association [1..1] to P_CChmlCmplConstants as _Constants on _Constants.Constant1 = _Constants.Constant1
{
--UUID of chemical compliance information
key ChemicalComplianceInfo.ChmlCmplncInfoUUID as ChmlCmplncInfoUUID,
--Property Type
key PCPrptyRootType.PCPrptyRootType as PCPrptyRootType,
-- In Progress Version
IdentifierInProgress.ChmlCmplncIdfrUUID as PCPrptyInProcessUUID,
IdentifierInProgress.ChmlCmplncIdfrProcgStatus as PCPrptyInProcProcgSts,
cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyInProcIsActive,
-- Released Version
IdentifierReleased.ChmlCmplncIdfrUUID as PCPrptyReleasedUUID,
IdentifierReleased.ChmlCmplncIdfrProcgStatus as PCPrptyReldProcgSts,
IdentifierReleased.ChmlCmplncIdfrReldByUser as ReleasedByUser,
cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyReldIsActive,
--Navigation Link UUID
casewhen IdentifierInProgress.ChmlCmplncIdfrProcgStatus = 'IP' then IdentifierInProgress.ChmlCmplncIdfrUUID
when IdentifierReleased.ChmlCmplncIdfrProcgStatus = 'RE' then IdentifierReleased.ChmlCmplncIdfrUUID
-- else _Constants[inner].ConstantEmptyRaw16
endas PCPrptyNavgnLinkUUID,
--Active Indicator
casewhen IdentifierInProgress.ChmlCmplncIdfrProcgStatus = 'IP'
thencast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
when IdentifierReleased.ChmlCmplncIdfrProcgStatus = 'RE'
thencast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
endas PCPrptyIsActive
}