C_MaintCompPlantWithStockVH

DDL: C_MAINTCOMPPLANTWITHSTOCKVH Type: view_entity CONSUMPTION

Plant with stock

C_MaintCompPlantWithStockVH is a Consumption CDS View that provides data about "Plant with stock" in SAP S/4HANA. It reads from 1 data source (I_MaterialPlant) and exposes 6 fields with key fields Material, Plant.

Data Sources (1)

SourceAliasJoin Type
I_MaterialPlant material_plant from

Annotations (12)

NameValueLevelField
EndUserText.label Plant with stock view
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.dataCategory #VALUE_HELP view
ObjectModel.representativeKey Plant view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
Search.searchable true view
Consumption.ranked true view
VDM.viewType #CONSUMPTION view
UI.textArrangement #TEXT_LAST view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY Material I_MaterialPlant Material
KEY Plant I_MaterialPlant Plant
PlantName plant PlantName
UnrstrcdStkQuantityInBaseUnit Unrestricted Stock
UnrstrcdCsgnmtStkQtyInBaseUnt Unrestricted Consignment Stock
MaterialBaseUnit material MaterialBaseUnit
@EndUserText.label: 'Plant with stock'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel: {
  dataCategory: #VALUE_HELP,
  representativeKey: 'Plant',
  usageType.serviceQuality: #C,
  usageType.dataClass: #MIXED,
  usageType.sizeCategory : #XL
  }
@Search.searchable: true
@Consumption.ranked: true
@VDM.viewType: #CONSUMPTION
@UI.textArrangement: #TEXT_LAST
define view entity C_MaintCompPlantWithStockVH
  as select from            I_MaterialPlant            as material_plant
    left outer to one join  I_Material                 as material         on material_plant.Material = material.Material
    left outer to one join  I_Plant                    as plant            on material_plant.Plant = plant.Plant
    left outer to many join P_PlantAndStorLocWithStock as plant_with_stock on  material_plant.Material = plant_with_stock.Material
                                                                           and material_plant.Plant    = plant_with_stock.Plant

{
      @UI.hidden: true
  key material_plant.Material,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #HIGH
      @ObjectModel.text.element:[ 'PlantName' ]
      @UI.lineItem: [{importance: #HIGH, position: 10 }]
  key material_plant.Plant,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #MEDIUM
      @UI.lineItem: [{importance: #HIGH, position: 20 }]
      @Semantics.text: true
      plant.PlantName,

      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      @EndUserText.label: 'Unrestricted Stock'
      @UI.lineItem: [{importance: #HIGH, position: 30 }]
      sum(plant_with_stock.UnrstrcdStkQuantityInBaseUnit) as UnrstrcdStkQuantityInBaseUnit,

      @Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
      @EndUserText.label: 'Unrestricted Consignment Stock'
      @UI.lineItem: [{importance: #HIGH, position: 40 }]
      sum(plant_with_stock.UnrstrcdCsgnmtStkQtyInBaseUnt) as UnrstrcdCsgnmtStkQtyInBaseUnt,

      @UI.hidden: true
      material.MaterialBaseUnit
}
group by
  material_plant.Material,
  material_plant.Plant,
  plant.PlantName,
  material.MaterialBaseUnit
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIAL",
"I_MATERIALPLANT",
"I_PLANT",
"P_PLANTANDSTORLOCWITHSTOCK"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/