C_MatlBsdCmpstnAfterProdCompVH

DDL: C_MATLBSDCMPSTNAFTERPRODCOMPVH Type: view CONSUMPTION Package: EHFND_CNS_CMPS_MATLBASED

After Production Components of MbC

C_MatlBsdCmpstnAfterProdCompVH is a Consumption CDS View that provides data about "After Production Components of MbC" in SAP S/4HANA. It reads from 1 data source (I_MatlBsdBeforeProdnCompDraft) and exposes 19 fields with key field MatlBsdCompUUID. It has 1 association to related views. Part of development package EHFND_CNS_CMPS_MATLBASED.

Data Sources (1)

SourceAliasJoin Type
I_MatlBsdBeforeProdnCompDraft MatlBsdBeforeProdnComp from

Parameters (1)

NameTypeDefault
P_ChmlCompositionUUID sysuuid_x

Associations (1)

CardinalityTargetAliasCondition
[0..1] C_ChmlCmplncPrimMatl _PrimaryMaterial $projection.CompChmlCmplncInfoUUID = _PrimaryMaterial.ChmlCmplncInfoUUID

Annotations (14)

NameValueLevelField
EndUserText.label After Production Components of MbC view
AbapCatalog.sqlViewName MBCAFTPRCOMPVH view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.representativeKey MatlBsdCompUUID view
Metadata.ignorePropagatedAnnotations true view
ClientHandling.algorithm #SESSION_VARIABLE view
Search.searchable true view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY MatlBsdCompUUID I_MatlBsdBeforeProdnCompDraft MatlBsdCompUUID
ActiveMatlBsdCompUUID I_MatlBsdBeforeProdnCompDraft ActiveMatlBsdCompUUID
ChmlCompositionUUID
ChmlCmplncInfoUUID I_MatlBsdBeforeProdnCompDraft ChmlCmplncInfoUUID
CompChmlCmplncInfoUUID I_MatlBsdBeforeProdnCompDraft CompChmlCmplncInfoUUID
MatlBsdCompProductionType I_MatlBsdBeforeProdnCompDraft MatlBsdCompProductionType
ChmlCompQty I_MatlBsdBeforeProdnCompDraft ChmlCompQty
ChmlCompQtyAsText I_MatlBsdBeforeProdnCompDraft ChmlCompQtyAsText
ChmlCompQtyUnit I_MatlBsdBeforeProdnCompDraft ChmlCompQtyUnit
ChmlCompOperatorLowerLimit I_MatlBsdBeforeProdnCompDraft ChmlCompOperatorLowerLimit
ChmlCompQtyLowerLimit I_MatlBsdBeforeProdnCompDraft ChmlCompQtyLowerLimit
ChmlCompQtyLowerLimitAsText I_MatlBsdBeforeProdnCompDraft ChmlCompQtyLowerLimitAsText
ChmlCompOperatorUpperLimit I_MatlBsdBeforeProdnCompDraft ChmlCompOperatorUpperLimit
ChmlCompQtyUpperLimit I_MatlBsdBeforeProdnCompDraft ChmlCompQtyUpperLimit
ChmlCompQtyUpperLimitAsText I_MatlBsdBeforeProdnCompDraft ChmlCompQtyUpperLimitAsText
ChmlCompIsRemoved I_MatlBsdBeforeProdnCompDraft ChmlCompIsRemoved
ChmlCompSubstancesTxt
_ChmlCmplncInfo I_MatlBsdBeforeProdnCompDraft _ChmlCmplncInfo
_PrimaryMaterial _PrimaryMaterial
@EndUserText.label: 'After Production Components of MbC'

@AbapCatalog:
{
  sqlViewName: 'MBCAFTPRCOMPVH',
  compiler.compareFilter: true
}

@AccessControl:
{
  authorizationCheck: #MANDATORY,
  // blocking of personal data not required (no personal data fields exposed for material)

  personalData.blocking: #NOT_REQUIRED
}

@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  dataCategory: #VALUE_HELP,

  usageType:
  {
    dataClass: #MIXED,
    sizeCategory: #L,
    serviceQuality: #C
  },
  representativeKey: 'MatlBsdCompUUID',
  semanticKey: ['ChmlCmplncInfoCombinedName']
}

@Metadata.ignorePropagatedAnnotations: true

@ClientHandling.algorithm: #SESSION_VARIABLE

@UI:{
  presentationVariant: [{
    sortOrder: [{ by: 'ChmlCmplncInfoCombinedName', direction: #ASC }],
     requestAtLeast: ['ChmlCompositionUUID',
                      'ChmlCmplncInfoCombinedName',
                      'Material',
                      'ChmlCompQtyAsText',
                      'ChmlCompOperatorLowerLimit',
                      'ChmlCompQtyLowerLimitAsText',
                      'ChmlCompOperatorUpperLimit',
                      'ChmlCompQtyUpperLimitAsText',
                      'ChmlCompQtyUnit',
                      'ChmlCompSubstancesTxt'
                    ]
  }]
}

@Search.searchable: true

/*
 * This view is used in the object page of the material based composition
 * to diplay all CCIs with type = 'Bulk' and role 'Produced' or 'Sourced'
 * in a value help
 */

define view C_MatlBsdCmpstnAfterProdCompVH
  with parameters
    P_ChmlCompositionUUID : sysuuid_x
  -- select Raw Material
  as select from I_MatlBsdBeforeProdnCompDraft as MatlBsdBeforeProdnComp

  association [0..1] to C_ChmlCmplncPrimMatl as _PrimaryMaterial on $projection.CompChmlCmplncInfoUUID = _PrimaryMaterial.ChmlCmplncInfoUUID

{

  key MatlBsdBeforeProdnComp.MatlBsdCompUUID,
      MatlBsdBeforeProdnComp.ActiveMatlBsdCompUUID,
      $parameters.P_ChmlCompositionUUID                                                              as ChmlCompositionUUID,
      MatlBsdBeforeProdnComp.ChmlCmplncInfoUUID,
      MatlBsdBeforeProdnComp.CompChmlCmplncInfoUUID,
      -- Preferred Material of Component
      @ObjectModel.readOnly: true
      @ObjectModel.text.element: ['ChmlCmplncInfoCombinedName']
      @Semantics.text:true
      cast( _PrimaryMaterial.Material as matnr preserving type)                                      as Material,

      -- Combined component name
      @ObjectModel.readOnly: true
      @Semantics.text: true
      @Search: {
        defaultSearchElement: true,
        fuzzinessThreshold:   0.8,
        ranking: #HIGH
      }
      cast(_PrimaryMaterial.ChmlCmplncInfoCombinedName as ehfnd_cci_component_name preserving type ) as ChmlCmplncInfoCombinedName,

      MatlBsdBeforeProdnComp.MatlBsdCompProductionType,

      @Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
      MatlBsdBeforeProdnComp.ChmlCompQty,
      MatlBsdBeforeProdnComp.ChmlCompQtyAsText,
      MatlBsdBeforeProdnComp.ChmlCompQtyUnit,
      MatlBsdBeforeProdnComp.ChmlCompOperatorLowerLimit,
      @Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
      MatlBsdBeforeProdnComp.ChmlCompQtyLowerLimit,
      MatlBsdBeforeProdnComp.ChmlCompQtyLowerLimitAsText,
      MatlBsdBeforeProdnComp.ChmlCompOperatorUpperLimit,
      @Semantics.quantity.unitOfMeasure: 'ChmlCompQtyUnit'
      MatlBsdBeforeProdnComp.ChmlCompQtyUpperLimit,
      MatlBsdBeforeProdnComp.ChmlCompQtyUpperLimitAsText,
      MatlBsdBeforeProdnComp.ChmlCompIsRemoved,

      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_MCMPS_APC_SUB_EXIT'
      cast( 0 as ehfnd_text1333 )                                                                    as ChmlCompSubstancesTxt,

      /* Associations */
      MatlBsdBeforeProdnComp._ChmlCmplncInfo,
      _PrimaryMaterial
}
where
      MatlBsdBeforeProdnComp.ChmlCompositionUUID = $parameters.P_ChmlCompositionUUID
  and MatlBsdBeforeProdnComp.ChmlCompIsRemoved   <> 'X'