I_MATLBASEDCMPSTNCOMPONENT

CDS View

Component available after/before production

I_MATLBASEDCMPSTNCOMPONENT is a CDS View in S/4HANA. Component available after/before production. It contains 8 fields. 12 CDS views read from this table.

CDS Views using this table (12)

ViewTypeJoinVDMDescription
A_ProdCmplncMlticmpProdComp view_entity from CONSUMPTION Multicomponent Product Component
C_RawChmlCmplncProdnCountry view from CONSUMPTION Production Country/Region
C_RawChmlCmplncSalesCountry view from CONSUMPTION Sales Country/Region
I_MatlBasedCmpstnCompActvDrft view union_all COMPOSITE Components draft and active
I_MatlBsdAfterProdnCompTP view from TRANSACTIONAL After Production Cmpnt in Mat.Bsd Cmpstn
I_MatlBsdBeforeProdnCompTP view from TRANSACTIONAL After Production Cmpnt in Mat.Bsd Cmpstn
I_ProdCmplncMlticmpProdComp view_entity from COMPOSITE Multicomponent Product Component
P_MatlBasedCmpstnCompCnvrtd view from CONSUMPTION Material Based Composition Converted Component Concentration
P_MatlBasedCmpstnReleasedComp view from CONSUMPTION Material Components of Released Material Based composition
P_RawChmlCmplncProdCt view from CONSUMPTION Count Purpose Assignments from Finished Good and Product
R_ProdMatlBsdAfterProdnCompTP view_entity from TRANSACTIONAL After Prodn Comp in Mat Bsd Cmpstn - TP
R_ProdMatlBsdBeforeProdnCompTP view_entity from TRANSACTIONAL Before Prodn Comp in Mat Bsd Cmpstn - TP

Fields (8)

KeyField CDS FieldsUsed in Views
KEY CompChmlCmplncInfoUUID CompChmlCmplncInfoUUID 2
KEY MatlBsdCompUUID ActiveMatlBsdCompUUID,ChmlCompUUID,MatlBsdCompUUID 4
ChmlCmplncInfoUUID ChmlCmplncInfoUUID 2
ChmlCompIsNotContained ChmlCompIsNotContained 1
ChmlCompIsRemoved ChmlCompIsRemoved 1
ChmlCompositionUUID ChmlCompositionUUID 2
ChmlCompQty ChmlCompQty 2
ChmlCompQtyAsText ChmlCompQtyAsText 2
----------------------------------------------------
-- Components of Material Based Composition
-- Used for before and after production components
----------------------------------------------------

--Label of view
@EndUserText.label: 'Component available after/before production'

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

  --If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
  compiler.compareFilter: true
}

--Access Control: Authorizations Checks
@AccessControl:
{
  authorizationCheck: #MANDATORY,
  privilegedAssociations:  [ '_CreatedByUser', '_LastChangedByUser' ]
}

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

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

@ObjectModel:
{

  --Performance Annotations
  usageType:
  {
    dataClass: #TRANSACTIONAL,
    sizeCategory: #XL,
    serviceQuality: #C
  }
}

//

define view I_MatlBasedCmpstnComponent

  --Select data from master table 'Components available before/after production
  as select from ehfndv_mcmps_cmp as CompAvailableBfrOrAftProdn

  --Link to parent '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 Chemical compliance Info as component
  association [0..1] to I_ChmlCmplncInfo           as _CompChmlCmplncInfo on $projection.CompChmlCmplncInfoUUID = _CompChmlCmplncInfo.ChmlCmplncInfoUUID

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

  --Link to user data
  association [0..1] to I_User                     as _CreatedByUser      on $projection.CreatedByUser = _CreatedByUser.UserID
  association [0..1] to I_User                     as _LastChangedByUser  on $projection.LastChangedByUser = _LastChangedByUser.UserID

{
      --UUID of component
  key CompAvailableBfrOrAftProdn.matlbsdcompuuid                as MatlBsdCompUUID,
  
      --UUID of chemical compliance information
      @ObjectModel.foreignKey.association: '_ChmlCmplncInfo'
      CompAvailableBfrOrAftProdn.chmlcmplncinfouuid             as ChmlCmplncInfoUUID,

      --UUID of composition
      @ObjectModel.foreignKey.association: '_Composition'
      CompAvailableBfrOrAftProdn.chmlcompositionuuid            as ChmlCompositionUUID,

      --UUID of material(cci) as component
      @ObjectModel.foreignKey.association: '_CompChmlCmplncInfo'
      CompAvailableBfrOrAftProdn.compchmlcmplncinfouuid         as CompChmlCmplncInfoUUID,

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

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

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

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

      --Indicator: Is a component before production (I = Input) or after production (O = Output)
      CompAvailableBfrOrAftProdn.matlbsdcompproductiontype      as MatlBsdCompProductionType,

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

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

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

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

      --Lower limit of concentration
      /*=> if you specify "@Semantics.quantity.unitOfMeasure", you have to expose the unit of measure in the consumption view*/
      CompAvailableBfrOrAftProdn.chmlcompqtylowerlimit          as ChmlCompQtyLowerLimit,

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

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

      --Upper limit of concentration
      /*=> if you specify "@Semantics.quantity.unitOfMeasure", you have to expose the unit of measure in the consumption view*/
      CompAvailableBfrOrAftProdn.chmlcompqtyupperlimit          as ChmlCompQtyUpperLimit,

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

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

      --Indicator: Is a component not contained - Neccessary for Calculation of Component Status
      CompAvailableBfrOrAftProdn.chmlcompisnotcontained         as ChmlCompIsNotContained,
      
      --UUID of MCP Component
      CompAvailableBfrOrAftProdn.mlticmpprodcompuuid            as MlticmpProdCompUUID,

      /*Associations*/
      _Composition,
      _ChmlCmplncInfo,
      _CompChmlCmplncInfo,
      _UnitOfMeasure,
      _OperatorLowerLimit,
      _OperatorUpperLimit,

      _CreatedByUser,
      _LastChangedByUser
}