C_MM_MaterialValueHelp

DDL: C_MM_MATERIALVALUEHELP SQL: CMMMATL_VH Type: view CONSUMPTION Package: ODATA_MM_COMMONS_VH

Material Value Help

C_MM_MaterialValueHelp is a Consumption CDS View that provides data about "Material Value Help" in SAP S/4HANA. It reads from 1 data source (I_MaterialPlant) and exposes 22 fields with key fields Material, Plant. It has 9 associations to related views. Part of development package ODATA_MM_COMMONS_VH.

Data Sources (1)

SourceAliasJoin Type
I_MaterialPlant I_MaterialPlant from

Associations (9)

CardinalityTargetAliasCondition
[0..1] I_MaterialText _MaterialText $projection.Material = _MaterialText.Material and _MaterialText.Language = $session.system_language
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_MaterialGroupText _MaterialGroupText $projection.MaterialGroup = _MaterialGroupText.MaterialGroup and _MaterialGroupText.Language = $session.system_language
[0..1] I_MaterialTypeText _MaterialTypeText $projection.MaterialType = _MaterialTypeText.MaterialType and _MaterialTypeText.Language = $session.system_language
[0..1] I_Producttype _ProductType $projection.MaterialType = _ProductType.ProductType
[0..1] I_MaterialType _MaterialType $projection.MaterialType = _MaterialType.MaterialType
[0..1] I_MaterialGroup _MaterialGroup $projection.MaterialGroup = _MaterialGroup.MaterialGroup
[0..1] I_CO2eqFprntAvgRltvBaseUoM _CO2eqFprntAvgRltvBaseUoM $projection.Material = _CO2eqFprntAvgRltvBaseUoM.Product and $projection.Plant = _CO2eqFprntAvgRltvBaseUoM.Plant
[0..1] I_UnitOfMeasure _UnitOfMeasure $projection.PFMFootprintUnit = _UnitOfMeasure.UnitOfMeasure

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName CMMMATL_VH view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
ObjectModel.dataCategory #VALUE_HELP view
Search.searchable true view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
Consumption.valueHelpDefault.fetchValues #ON_EXPLICIT_REQUEST view
EndUserText.label Material Value Help view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
Consumption.ranked true view

Fields (22)

KeyFieldSource TableSource FieldDescription
KEY Material I_MaterialPlant Material
KEY Plant I_MaterialPlant Plant
ProductExternalID _Material ProductExternalID MaterialExternal
MaterialName
PlantName _Plant PlantName
MaterialGroup _Material ProductGroup
MaterialGroupName _MaterialGroupText MaterialGroupName Product Group Description
MaterialType _Material ProductType
AuthorizationGroup _Material AuthorizationGroup
MaterialTypeName _MaterialTypeText MaterialTypeName Material Type Description
MaterialBaseUnit _Material BaseUnit
ProductTypeCode _ProductType ProductTypeCode
ProductTypeName Product Type Description
PFMFootprintQuantity _CO2eqFprntAvgRltvBaseUoM PFMFootprintFxdPtDcmlQuantity
PFMFootprintUnit _CO2eqFprntAvgRltvBaseUoM PFMFootprintUnit CO2e Footprint Unit
_Plant _Plant
_MaterialType _MaterialType
_ProductType _ProductType
_MaterialGroup _MaterialGroup
_BaseUnit _BaseUnitOfMeasure
_UnitOfMeasure _UnitOfMeasure
_Material _Material
@AbapCatalog.sqlViewName: 'CMMMATL_VH'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #CONSUMPTION
@ObjectModel.dataCategory: #VALUE_HELP
@Search.searchable: true
@ObjectModel.semanticKey:  [ 'Material', 'Plant' ]
@ObjectModel.representativeKey: [ 'Material' , 'Plant' ]
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@Consumption.valueHelpDefault.fetchValues: #ON_EXPLICIT_REQUEST
@EndUserText.label: 'Material Value Help'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Consumption.ranked: true

define view C_MM_MaterialValueHelp
  as select from           I_MaterialPlant
  //  left outer to one join  I_Material as _Material on I_MaterialPlant.Material = _Material.Material

    left outer to one join I_Product as _Material on I_MaterialPlant.Material = _Material.Product

  association [0..1] to I_MaterialText             as _MaterialText             on  $projection.Material   = _MaterialText.Material
                                                                                and _MaterialText.Language = $session.system_language

  association [0..1] to I_Plant                    as _Plant                    on  $projection.Plant = _Plant.Plant

  association [0..1] to I_MaterialGroupText        as _MaterialGroupText        on  $projection.MaterialGroup   = _MaterialGroupText.MaterialGroup
                                                                                and _MaterialGroupText.Language = $session.system_language

  association [0..1] to I_MaterialTypeText         as _MaterialTypeText         on  $projection.MaterialType   = _MaterialTypeText.MaterialType
                                                                                and _MaterialTypeText.Language = $session.system_language

  association [0..1] to I_Producttype              as _ProductType              on  $projection.MaterialType = _ProductType.ProductType

  association [0..1] to I_MaterialType             as _MaterialType             on  $projection.MaterialType = _MaterialType.MaterialType

  association [0..1] to I_MaterialGroup            as _MaterialGroup            on  $projection.MaterialGroup = _MaterialGroup.MaterialGroup

  association [0..1] to I_CO2eqFprntAvgRltvBaseUoM as _CO2eqFprntAvgRltvBaseUoM on  $projection.Material = _CO2eqFprntAvgRltvBaseUoM.Product
                                                                                and $projection.Plant    = _CO2eqFprntAvgRltvBaseUoM.Plant

  association [0..1] to I_UnitOfMeasure            as _UnitOfMeasure            on  $projection.PFMFootprintUnit = _UnitOfMeasure.UnitOfMeasure

{

      @ObjectModel.text.element: [ 'MaterialName' ]
      @Search: { defaultSearchElement: true, ranking: #HIGH , fuzzinessThreshold: 0.7}
  key I_MaterialPlant.Material                                                         as Material,

      //      @Search: { defaultSearchElement: true, ranking: #HIGH , fuzzinessThreshold: 0.7 }

      //      @EndUserText.label: 'MaterialExternal'

      //  key _Material.ProductExternalID                                          as MaterialExternal,

      //

      @Search: { defaultSearchElement: true, ranking: #LOW , fuzzinessThreshold: 0.8}
      @ObjectModel.foreignKey.association: '_Plant'
  key I_MaterialPlant.Plant                                                            as Plant,

      @UI.hidden: true
      @Search: { defaultSearchElement: true, ranking: #HIGH , fuzzinessThreshold: 0.8}
      @EndUserText.label: 'MaterialExternal'
      _Material.ProductExternalID                                                      as ProductExternalID,

      @Semantics.text: true
      @Search: { defaultSearchElement: true, ranking: #MEDIUM , fuzzinessThreshold: 0.8}
      _MaterialText[1: Language = $session.system_language].MaterialName               as MaterialName,

      @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7 }
      _Plant.PlantName                                                                 as PlantName,

      @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7}
      // _Material.MaterialGroup                                             as MaterialGroup,

      _Material.ProductGroup                                                           as MaterialGroup,

      @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7 }
      @EndUserText.label: 'Product Group Description'
      _MaterialGroupText.MaterialGroupName                                             as MaterialGroupName,

      @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7}
      // _Material.MaterialType                                              as MaterialType,

      _Material.ProductType                                                            as MaterialType,

      // _Material.AuthorizationGroup                                        as AuthorizationGroup,

      _Material.AuthorizationGroup                                                     as AuthorizationGroup,

      @EndUserText.label: 'Material Type Description'
      @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7 }
      _MaterialTypeText.MaterialTypeName                                               as MaterialTypeName,

     // @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7} "Commented for Performance issue

      @UI.hidden: true
      // _Material.MaterialBaseUnit                                          as MaterialBaseUnit,

      _Material.BaseUnit                                                               as MaterialBaseUnit,

      @ObjectModel.text.element: [ 'ProductTypeName' ]
     // @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.7} "Commented for Performance issue

      _ProductType.ProductTypeCode                                                     as ProductTypeCode,

      @EndUserText.label: 'Product Type Description'
      @Semantics.text: true
      _ProductType._ProductTypeCode._Text[1: Language = $session.system_language].Name as ProductTypeName,


      @Feature: 'BF:PFM_PROCESSINTEGRATION'
      //  @EndUserText.label: 'CO2eq Footprint Quantity'

      @Semantics.quantity.unitOfMeasure: 'PFMFootprintUnit'
      //cast( _CO2eqFprntAvgRltvBaseUoM.PFMFootprintQuantity  as abap.dec(24,6)  ) as PFMFootprintQuantity,

      _CO2eqFprntAvgRltvBaseUoM.PFMFootprintFxdPtDcmlQuantity                          as PFMFootprintQuantity,
      @Feature: 'BF:PFM_PROCESSINTEGRATION'
      @EndUserText.label: 'CO2e Footprint Unit'
      @ObjectModel.foreignKey.association: '_UnitOfMeasure'
      @Semantics.unitOfMeasure: true
      _CO2eqFprntAvgRltvBaseUoM.PFMFootprintUnit                                       as PFMFootprintUnit,

      //     @Consumption.hidden: true

      //     @Search: { defaultSearchElement: true, ranking: #HIGH , fuzzinessThreshold: 0.8 }

      //     cast ( Material.Material as odata_mm_matnr  preserving type  ) as MaterialWithAlphaForSearch,


      _Plant,
      _MaterialType,
      _ProductType,
      _MaterialGroup,
      // _BaseUnit,

      _BaseUnitOfMeasure                                                               as _BaseUnit,
      _UnitOfMeasure,
      _Material

}