P_ChmlCmplncInfoAssgdPCStRct is a Consumption CDS View that provides data about "Assgd Stability & Reactivity Proprerties" 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. Part of development package EHFND_CNS_CCI.
@AbapCatalog.viewEnhancementCategory: [#NONE]@EndUserText.label: 'Assgd Stability & Reactivity Proprerties'
--Access Control: Authorizations Checks
@AccessControl:
{
authorizationCheck: #NOT_REQUIRED
}
--VDM view type
@VDM.viewType: #CONSUMPTION@VDM.private: true@Feature: 'FTGL_PSSPROD_8827'
defineviewentity P_ChmlCmplncInfoAssgdPCStRct
asselectfrom I_ChmlCmplncInfo as ChemicalComplianceInfo
innerjoin I_PCPrptyRootType as _PCPrptyRootType on _PCPrptyRootType.DomainValue = 'EHFNDD_STA'
--Join data from stability and reactivity properties with status In Process => Active or draft composition
leftouter to one join I_PCStRct as StabilityReactivityInProcess on ChemicalComplianceInfo.ChmlCmplncInfoUUID = StabilityReactivityInProcess.ChmlCmplncInfoUUID
and StabilityReactivityInProcess.PCPrptyProcgSts = 'IP'
--Join data from stability and reactivity properties with status Released => only active chemical composition, because released composition isnot editable
leftouter to one join I_PCStRct as StabilityReactivityReleased on ChemicalComplianceInfo.ChmlCmplncInfoUUID = StabilityReactivityReleased.ChmlCmplncInfoUUID
and StabilityReactivityReleased.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,
StabilityReactivityInProcess.PCStRctUUID as PCPrptyInProcessUUID,
StabilityReactivityInProcess.PCPrptyProcgSts as PCPrptyInProcProcgSts,
--Is Active entitycast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyInProcIsActive,
StabilityReactivityReleased.PCStRctUUID as PCPrptyReleasedUUID,
StabilityReactivityReleased.PCPrptyProcgSts as PCPrptyReldProcgSts,
--Released By User
StabilityReactivityReleased.PCPrptyReleasedBy as ReleasedByUser,
--Is Active entitycast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyReldIsActive,
--Navigation Link UUID
casewhen StabilityReactivityInProcess.PCPrptyProcgSts = 'IP' then
StabilityReactivityInProcess.PCStRctUUID
when StabilityReactivityReleased.PCPrptyProcgSts = 'RE' then
StabilityReactivityReleased.PCStRctUUID
endas PCPrptyNavgnLinkUUID,
--Active Indicator
casewhen StabilityReactivityInProcess.PCPrptyProcgSts = 'IP'
thencast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
when StabilityReactivityReleased.PCPrptyProcgSts = 'RE'
thencast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
endas PCPrptyIsActive
}