I_SUBSTBSDCMPSTNCOMPONENT

CDS View

Substances as components in compositions

I_SUBSTBSDCMPSTNCOMPONENT is a CDS View in S/4HANA. Substances as components in compositions. It contains 1 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
I_MatlBsdProducedSubstTP view from TRANSACTIONAL Produced and Remaining Substances in Material Based Comp.
P_SubstBsdCmpstnCompCnvrtd view from CONSUMPTION Substance Based Composition Component Concentration
P_SubstBsdCmpstnReleasedComp view from CONSUMPTION Substances of Released Material or substance Composition

Fields (1)

KeyField CDS FieldsUsed in Views
MatlBsdCmpstnSubstType MatlBsdCmpstnSubstType 1
--Label of view
@EndUserText.label: 'Substances as components in compositions'

@AbapCatalog:
{
  -- SQL view name (16 characters)
  sqlViewName: 'ISCOMPONENT',

  --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: #MANDATORY
}

--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE

--VDM view type
@VDM.viewType: #BASIC

@ObjectModel:
{

  --Performance Annotations
    --Mandatory for non-private CDS views
    --Optional for private CDS views
    --Link: https://wiki.wdf.sap.corp/wiki/display/SuiteCDS/CDS+View+Performance

  usageType:
  {
    dataClass: #MASTER,
    sizeCategory: #L,
    serviceQuality: #C
  },

  representativeKey: 'ChmlCompUUID'
}

define view I_SubstBsdCmpstnComponent
  --Select data from master table 'Substance as component'
  as select from ehfndv_ccmps_cmp as Component

  --Link to parent 'Chemical Composition'
  association [1..1] to I_ChmlComposition          as _Composition        on $projection.ChmlCompositionUUID = _Composition.ChmlCompositionUUID

  --Link to 'Chemcial Compliance Info' as root
  association [1..1] to I_ChmlCmplncInfo           as _ChmlCmplncInfo     on $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID

  --Link to Substance
  association [0..1] to I_SubstanceEnhanced        as _Substance          on $projection.SubstanceUUID = _Substance.SubstanceUUID


  --Link to Role of Ingredient
  association [0..1] to I_ChmlCompType             as _ComponentType      on $projection.ChmlCompType = _ComponentType.ChmlCompType

  --Link to Unit of Measure
  association [0..1] to I_UnitOfMeasure            as _UnitOfMeasure      on $projection.ChmlCompQtyUnit = _UnitOfMeasure.UnitOfMeasure

  --Link Operator of Lower Limit
  association [0..1] to I_ChmlComponentOptrLowrLmt as _OperatorLowerLimit on $projection.ChmlCompOperatorLowerLimit = _OperatorLowerLimit.ChmlCompOperatorLowerLimit

  --Link Operator of Upper Limit
  association [0..1] to I_ChmlComponentOptrUprLmt  as _OperatorUpperLimit on $projection.ChmlCompOperatorUpperLimit = _OperatorUpperLimit.ChmlCompOperatorUpperLimit

{
      --UUID of component
  key Component.chmlcompuuid                                                     as ChmlCompUUID,

      --UUID of chemical compliance information
      @ObjectModel.foreignKey.association: '_ChmlCmplncInfo'
      Component.chmlcmplncinfouuid                                               as ChmlCmplncInfoUUID,

      --UUID of chemical composition
      Component.chmlcompositionuuid                                              as ChmlCompositionUUID,

      --Date/Time of creation
      @Semantics.systemDateTime.createdAt: true
      Component.creationutcdatetime                                              as CreationUTCDateTime,

      --Created by
      @Semantics.user.createdBy: true
      Component.createdbyuser                                                    as CreatedByUser,

      --Date/Time of change
      @Semantics.systemDateTime.lastChangedAt: true
      Component.lastchangeutcdatetime                                            as LastChangeUTCDateTime,

      --Changed by
      @Semantics.user.lastChangedBy: true
      Component.lastchangedbyuser                                                as LastChangedByUser,

      --UUID of Substance
      @ObjectModel.foreignKey.association: '_Substance'
      Component.substanceuuid                                                    as SubstanceUUID,

      --Role of Ingredient
      @ObjectModel.foreignKey.association: '_ComponentType'
      cast( Component.chmlcomptype as ehfnd_cci_ccomp_type_nce preserving type ) as ChmlCompType,

      --Concentration of component
      //      @Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'

      /*=> if you specify "@Semantics.quantity.unitOfMeasure", you have to expose the unit of measure in the consumption view*/
      Component.chmlcompqty                                                      as ChmlCompQty,

      --Concentration as text (for correct formatting with decimals exactly as entered by user)
      Component.chmlcompqtyastext                                                as ChmlCompQtyAsText,

      --Unit of measurement of concentration
      @Semantics.unitOfMeasure: true
      @ObjectModel.foreignKey.association: '_UnitOfMeasure'
      Component.chmlcompqtyunit                                                  as ChmlCompQtyUnit,

      --Operator Lower limit of concentration
      @ObjectModel.foreignKey.association: '_OperatorLowerLimit'
      Component.chmlcompoperatorlowerlimit                                       as ChmlCompOperatorLowerLimit,

      --Lower limit of concentration
      //      @Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit' //TODO same UoM for different components (in progress and released) does not work

      Component.chmlcompqtylowerlimit                                            as ChmlCompQtyLowerLimit,

      --Lower limit as text (for correct formatting with decimals exactly as entered by user)
      Component.chmlcompqtylowerlimitastext                                      as ChmlCompQtyLowerLimitAsText,

      --Operator Upper limit of concentration
      @ObjectModel.foreignKey.association: '_OperatorUpperLimit'
      Component.chmlcompoperatorupperlimit                                       as ChmlCompOperatorUpperLimit,

      --Upper limit of concentration
      //      @Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit' //TODO same UoM for different components (in progress and released) does not work

      Component.chmlcompqtyupperlimit                                            as ChmlCompQtyUpperLimit,

      --Upper limit as text (for correct formatting with decimals exactly as entered by user)
      Component.chmlcompqtyupperlimitastext                                      as ChmlCompQtyUpperLimitAsText,

      --Indicator: Is a component removed - Neccessary for Calculation of Component Status
      Component.chmlcompisremoved                                                as ChmlCompIsRemoved,

      --Refrence of polymer composition integrate with Material produced substance
      Component.polymercompositionintidref                                       as PolymerCompositionIntIDRef,
      
      --MbC - Produced or Remaining Substance
      Component.matlbsdcmpstnsubsttype                                           as MatlBsdCmpstnSubstType,
      
      -- Composition Type
      _Composition.ChmlCompositionType                                           as ChmlCompositionType,

      /*Association*/
      _Composition,
      _ChmlCmplncInfo,

      _Substance,

      _ComponentType,
      _UnitOfMeasure,
      _OperatorLowerLimit,
      _OperatorUpperLimit
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCOMPOSITION",
"EHFNDV_CCMPS_CMP"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCINFO",
"I_CHMLCOMPONENTOPTRLOWRLMT",
"I_CHMLCOMPONENTOPTRUPRLMT",
"I_CHMLCOMPOSITION",
"I_CHMLCOMPTYPE",
"I_SUBSTANCEENHANCED",
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/