P_SubstanceAssgdPCPhys

DDL: P_SUBSTANCEASSGDPCPHYS Type: view CONSUMPTION

Assoc. Physical Chemical Property

P_SubstanceAssgdPCPhys is a Consumption CDS View that provides data about "Assoc. Physical Chemical Property" in SAP S/4HANA. It reads from 1 data source (I_Substance) and exposes 7 fields. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_Substance Substance from

Associations (1)

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

Annotations (8)

NameValueLevelField
EndUserText.label Assoc. Physical Chemical Property view
AbapCatalog.sqlViewName PSUBASGDPHYS 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 (7)

KeyFieldSource TableSource FieldDescription
SubstanceUUIDasSubstanceUUID
PhysChmlPrptyUUIDasPCPrptyInProcessUUID
PCPrptyProcgStsasPCPrptyInProcProcgSts
PhysChmlPrptyUUIDasPCPrptyReleasedUUID
PCPrptyProcgStsasPCPrptyReldProcgSts
ResponsibleUnit I_Substance ResponsibleUnit
ConstantFalseendasPCPrptyIsActive
@EndUserText.label: 'Assoc. Physical Chemical Property'
--                  for Substance
@AbapCatalog:
{
  -- SQL view name (16 characters)
  sqlViewName: 'PSUBASGDPHYS',

  --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_SubstanceAssgdPCPhys
  --Select data from basic view 'Chemical Compliance Information'
  as select from           I_Substance                as Substance

  --Join data from physical chemical propertes with status In Process
    left outer to one join I_PhysicalChemicalProperty as PhysicalChemicalInProcess on  Substance.SubstanceUUID                   = PhysicalChemicalInProcess.SubstanceUUID
                                                                                   and PhysicalChemicalInProcess.PCPrptyProcgSts = 'IP'

  --Join data from physical chemical propertes with status Released
    left outer to one join I_PhysicalChemicalProperty as PhysicalChemicalReleased  on  Substance.SubstanceUUID                  = PhysicalChemicalReleased.SubstanceUUID
                                                                                   and PhysicalChemicalReleased.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 substance
  key Substance.SubstanceUUID                                                   as SubstanceUUID,

      --Property Type
  key cast('EHFNDD_PHYSCHEM' as ehfnd_prop_property_root )                      as PCPrptyRootType,

      --UUID of in process version
      PhysicalChemicalInProcess.PhysChmlPrptyUUID                               as PCPrptyInProcessUUID,

      --Status In Process
      PhysicalChemicalInProcess.PCPrptyProcgSts                                 as PCPrptyInProcProcgSts,

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

      --UUID of released version
      PhysicalChemicalReleased.PhysChmlPrptyUUID                                as PCPrptyReleasedUUID,

      --Status Released
      PhysicalChemicalReleased.PCPrptyProcgSts                                  as PCPrptyReldProcgSts,

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

      Substance.ResponsibleUnit                                                 as ResponsibleUnit,

      --Navigation Link UUID
      case
        when PhysicalChemicalInProcess.PCPrptyProcgSts = 'IP' then
          PhysicalChemicalInProcess.PhysChmlPrptyUUID
        when PhysicalChemicalReleased.PCPrptyProcgSts = 'RE' then
          PhysicalChemicalReleased.PhysChmlPrptyUUID
        else
          _Constants.ConstantEmptyRaw16
      end                                                                       as PCPrptyNavgnLinkUUID,

      --Active Indicator
      case
        when PhysicalChemicalInProcess.PCPrptyProcgSts = 'IP'
          then cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
        when PhysicalChemicalReleased.PCPrptyProcgSts = 'RE'
          then cast(_Constants[inner].ConstantTrue as sdraft_is_active preserving type )
        else
          _Constants.ConstantFalse
      end                                                                       as PCPrptyIsActive

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PHYSICALCHEMICALPROPERTY",
"I_SUBSTANCE",
"P_CCHMLCMPLCONSTANTS"
],
"ASSOCIATED":
[
"P_CCHMLCMPLCONSTANTS"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/