P_ChmlCmplncInfoAssgdPCSfty

DDL: P_CHMLCMPLNCINFOASSGDPCSFTY Type: view CONSUMPTION

Assoc. Safety-Related Property

P_ChmlCmplncInfoAssgdPCSfty is a Consumption CDS View that provides data about "Assoc. Safety-Related 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.

Data Sources (2)

SourceAliasJoin Type
I_PCPrptyRootType _PCPrptyRootType inner
I_ChmlCmplncInfo ChemicalComplianceInfo from

Associations (1)

CardinalityTargetAliasCondition
[1..1] P_CChmlCmplConstants _Constants _Constants.Constant1 = _Constants.Constant1

Annotations (8)

NameValueLevelField
EndUserText.label Assoc. Safety-Related Property view
AbapCatalog.sqlViewName PCCIASGDSFTY view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (8)

KeyFieldSource TableSource FieldDescription
ChmlCmplncInfoUUIDasChmlCmplncInfoUUID
PCPrptyRootTypeasPCPrptyRootType
PCSftyPrptyUUIDasPCPrptyInProcessUUID
PCPrptyProcgStsasPCPrptyInProcProcgSts
PCSftyPrptyUUIDasPCPrptyReleasedUUID
PCPrptyProcgStsasPCPrptyReldProcgSts
ReleasedByUserasReleasedByUser
PCSftyPrptyUUIDendasPCPrptyNavgnLinkUUID
@EndUserText.label: 'Assoc. Safety-Related Property'
--                  for Unpackaged Product
@AbapCatalog:
{
  -- SQL view name (16 characters)
  sqlViewName: 'PCCIASGDSFTY',

  --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: true

define view P_ChmlCmplncInfoAssgdPCSfty
  --Select data from basic view 'Chemical Compliance Information'
  as select from           I_ChmlCmplncInfo  as ChemicalComplianceInfo

    inner join             I_PCPrptyRootType as _PCPrptyRootType     on _PCPrptyRootType.DomainValue = 'EHFNDD_SR'

  --Join data from safety-related propertes with status In Process
    left outer to one join I_PCSftyProperty  as SftyRelatedInProcess on  ChemicalComplianceInfo.ChmlCmplncInfoUUID = SftyRelatedInProcess.ChmlCmplncInfoUUID
                                                                     and SftyRelatedInProcess.PCPrptyProcgSts      = 'IP'

  --Join data from safety-related propertes with status Released
    left outer to one join I_PCSftyProperty  as SftyRelatedReleased  on  ChemicalComplianceInfo.ChmlCmplncInfoUUID = SftyRelatedReleased.ChmlCmplncInfoUUID
                                                                     and SftyRelatedReleased.PCPrptyProcgSts       = 'RE'

  --Dummy constant selection to solve issues with case-statements with constants (not null-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
      SftyRelatedInProcess.PCSftyPrptyUUID                                      as PCPrptyInProcessUUID,

      --Status In Process
      SftyRelatedInProcess.PCPrptyProcgSts                                      as PCPrptyInProcProcgSts,

      --Is Active entity
      cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyInProcIsActive,

      --UUID of released version
      SftyRelatedReleased.PCSftyPrptyUUID                                       as PCPrptyReleasedUUID,

      --Status Released
      SftyRelatedReleased.PCPrptyProcgSts                                       as PCPrptyReldProcgSts,

      --Released By User
      SftyRelatedReleased.ReleasedByUser                                        as ReleasedByUser,

      --Is Active entity
      cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type ) as PCPrptyReldIsActive,

      --Navigation Link UUID
      case
        when SftyRelatedInProcess.PCPrptyProcgSts = 'IP' then
          SftyRelatedInProcess.PCSftyPrptyUUID
        when SftyRelatedReleased.PCPrptyProcgSts = 'RE' then
          SftyRelatedReleased.PCSftyPrptyUUID
      end                                                                       as PCPrptyNavgnLinkUUID,

      --Active Indicator
      case
        when SftyRelatedInProcess.PCPrptyProcgSts = 'IP'
          then cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
        when SftyRelatedReleased.PCPrptyProcgSts = 'RE'
          then cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
      end                                                                       as PCPrptyIsActive
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCINFO",
"I_PCPRPTYROOTTYPE",
"I_PCSFTYPROPERTY",
"P_CCHMLCMPLCONSTANTS"
],
"ASSOCIATED":
[
"P_CCHMLCMPLCONSTANTS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/