P_AssociatedTrdSecretProd

DDL: P_ASSOCIATEDTRDSECRETPROD Type: view CONSUMPTION

P_AssociatedTrdSecretProd is a Consumption CDS View in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncInfo) and exposes 10 fields. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncInfo ChemicalComplianceInfo from

Associations (1)

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

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PAASTSUP 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 (10)

KeyFieldSource TableSource FieldDescription
ChmlCmplncInfoUUID
ChmlCompositionType
ProdCmplncLegalArea
ChmlCompositionInProcessUUID
ChmlCmpstnInProcStatus
ChmlCmpstnInProcIsActiveEntity
ChmlCompositionReleasedUUID
ChmlCmpstnReldStatus
ReleasedByUser
ChmlCmpstnReldIsActiveEntity
@AbapCatalog:
{
  -- SQL view name (16 characters)
  sqlViewName: 'PAASTSUP',

  --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_AssociatedTrdSecretProd
  --Select data from basic view 'Chemical Compliance Information' (Logical key of composition)
  as select from I_ChmlCmplncInfo      as ChemicalComplianceInfo

  --Join data from composition
    join         P_AssociatedTrdSecret as Composition on ChemicalComplianceInfo.ChmlCmplncInfoUUID = Composition.ChmlCmplncInfoUUID

  association [1..1] to P_CChmlCmplConstants as _Constants on _Constants.Constant1 = _Constants.Constant1
{
      --UUID of chemical compliance information
  key ChemicalComplianceInfo.ChmlCmplncInfoUUID,

      --Composition Type
  key Composition.ChmlCompositionType,
  
      --Composition Type
  key Composition.ProdCmplncLegalArea,

      --UUID of chemical composition in process
      Composition.ChmlCompositionInProcessUUID,

      --Status In Process
      Composition.ChmlCmpstnInProcStatus,

      --Indicator: Is active entity of chemical composition with status In Process
      Composition.ChmlCmpstnInProcIsActiveEntity,

      --UUID of chemical composition released
      Composition.ChmlCompositionReleasedUUID,

      --Status Released
      Composition.ChmlCmpstnReldStatus,

      --Released by User
      Composition.ReleasedByUser,

      --Indicator: Is active entity of chemical composition with status In Process
      Composition.ChmlCmpstnReldIsActiveEntity,

      --Indicator: Released Composition Exists
      cast ( case Composition.ChmlCmpstnReldStatus
        when 'RE'
          then _Constants[inner].ConstantTrue
        else _Constants[inner].ConstantEmpty
      end as ehfnd_cci_ccmps_has_released ) as ChmlCmpstnHasReldCmpstn,

      --Navigation Link UUID
      case
        when Composition.ChmlCmpstnInProcStatus = 'IP' then
          Composition.ChmlCompositionInProcessUUID
        when Composition.ChmlCmpstnReldStatus = 'RE' then
          Composition.ChmlCompositionReleasedUUID
      end                                   as ChmlCmpstnNavgnLinkUUID,

      --Active Indicator
      case
        when Composition.ChmlCmpstnInProcStatus = 'IP'
          then Composition.ChmlCmpstnInProcIsActiveEntity
        when Composition.ChmlCmpstnReldStatus = 'RE'
          then Composition.ChmlCmpstnReldIsActiveEntity
      end                                   as ChmlCmpstnIsActive

}
--Only for Unpackaged Product
where
       ChmlCmplncInfoType    = 'BU'
  and(
       MaterialIsSold        = 'X'
    or MaterialIsTransported = 'X'
    or MaterialIsProduced    = 'X'
    or MaterialIsSourced     = 'X'
  )