P_ChmlCmplncInfoAssgdPCTx is a Consumption CDS View that provides data about "Assoc. Tox. Information Property" in SAP S/4HANA. It reads from 2 data sources (I_PCPrptyRootType, I_ChmlCmplncInfo) and exposes 8 fields. It has 1 association to related views.
@EndUserText.label: 'Assoc. Tox. Information Property'
-- for Unpackaged Product
@AbapCatalog:
{
-- SQL view name (16 characters)
sqlViewName: 'PCCIASGDTX',
--If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
compiler.compareFilter: true,
preserveKey: true
}
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #NOT_REQUIRED
}
--Client Handling of the view@ClientHandling.algorithm: #SESSION_VARIABLE
--VDM view type
@VDM.viewType: #CONSUMPTION@VDM.private: truedefineview P_ChmlCmplncInfoAssgdPCTx
--Select data from basic view 'Chemical Compliance Information'
asselectfrom I_ChmlCmplncInfo as ChemicalComplianceInfo
innerjoin I_PCPrptyRootType as _PCPrptyRootType on _PCPrptyRootType.DomainValue = 'EHFNDD_TX'
--Join data from physical chemical propertes with status In Process
leftouter to one join I_PCTxProperty as ToxInProcess on ChemicalComplianceInfo.ChmlCmplncInfoUUID = ToxInProcess.ChmlCmplncInfoUUID
and ToxInProcess.PCPrptyProcgSts = 'IP'
--Join data from physical chemical propertes with status Released
leftouter to one join I_PCTxProperty as ToxReleased on ChemicalComplianceInfo.ChmlCmplncInfoUUID = ToxReleased.ChmlCmplncInfoUUID
and ToxReleased.PCPrptyProcgSts = 'RE'
--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,
--UUID of in process version
ToxInProcess.PCTxPrptyUUID as PCPrptyInProcessUUID,
--Status In Process
ToxInProcess.PCPrptyProcgSts as PCPrptyInProcProcgSts,
--Is Active entitycast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyInProcIsActive,
--UUID of released version
ToxReleased.PCTxPrptyUUID as PCPrptyReleasedUUID,
--Status Released
ToxReleased.PCPrptyProcgSts as PCPrptyReldProcgSts,
--Released By User
ToxReleased.ReleasedByUser as ReleasedByUser,
--Is Active entitycast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyReldIsActive,
--Navigation Link UUID
casewhen ToxInProcess.PCPrptyProcgSts = 'IP' then
ToxInProcess.PCTxPrptyUUID
when ToxReleased.PCPrptyProcgSts = 'RE' then
ToxReleased.PCTxPrptyUUID
endas PCPrptyNavgnLinkUUID,
--Active Indicator
casewhen ToxInProcess.PCPrptyProcgSts = 'IP'
thencast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
when ToxReleased.PCPrptyProcgSts = 'RE'
thencast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
endas PCPrptyIsActive
}