A_MatlStkInAcctMod

DDL: A_MATLSTKINACCTMOD Type: view COMPOSITE

Material Stock

A_MatlStkInAcctMod is a Composite CDS View that provides data about "Material Stock" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 14 fields with key fields Material, Plant, StorageLocation, Batch, Supplier.

Data Sources (1)

SourceAliasJoin Type
I_MaterialStock_2 I_MaterialStock_2 from

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName AMATLSTKINACCMOD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
EndUserText.label Material Stock view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY Material Material
KEY Plant Plant
KEY StorageLocation StorageLocation
KEY Batch Batch
KEY Supplier Supplier
KEY Customer Customer
KEY WBSElementInternalID
KEY SDDocumentItem SDDocumentItem
KEY InventorySpecialStockType InventorySpecialStockType
KEY InventoryStockType InventoryStockType
MaterialBaseUnit MaterialBaseUnit
MatlWrhsStkQtyInMatlBaseUnit
_MaterialStock _MaterialStock
_MaterialSerialNumber _MaterialSerialNumber
@AbapCatalog: {
                sqlViewName: 'AMATLSTKINACCMOD',
                compiler.compareFilter: true,
                preserveKey: true
              }
@EndUserText.label: 'Material Stock'
@AccessControl: {
                  authorizationCheck: #CHECK,
                  personalData.blocking: #NOT_REQUIRED
                }
@ObjectModel: {
                usageType: {
                             sizeCategory: #XXL,
                             serviceQuality: #D,
                             dataClass: #TRANSACTIONAL
                           }
              }
@VDM: {
        viewType: #COMPOSITE,
        lifecycle.contract.type: #PUBLIC_REMOTE_API
      }
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true

define view A_MatlStkInAcctMod as select from I_MaterialStock_2
 
 association[1..1] to A_MaterialStock as _MaterialStock on $projection.Material =  _MaterialStock.Material
 association[1..*] to A_MaterialSerialNumber as _MaterialSerialNumber on $projection.Material =  _MaterialSerialNumber.Material
                                                             and $projection.Plant =  _MaterialSerialNumber.Plant
                                                             and $projection.Batch =  _MaterialSerialNumber.Batch
                                                             and $projection.InventoryStockType =  _MaterialSerialNumber.InventoryStockType
   
{
  key Material,
  key Plant,
      @ObjectModel.sapObjectNodeTypeReference: 'StorageLocation'
  key StorageLocation,
  key Batch,
  key Supplier,
  key Customer,
  key cast( WBSElementInternalID as mat_pspnr preserving type ) as WBSElementInternalID,   --I_MaterailStock_2 does a cast to a DE w/o conversion exit, for compatibility reason: cast back
  key SDDocument,
  key SDDocumentItem,
      @ObjectModel.sapObjectNodeTypeReference: 'InventorySpecialStockType'
  key InventorySpecialStockType,
      @ObjectModel.sapObjectNodeTypeReference: 'InventoryStockType'   
  key InventoryStockType,
@Semantics.unitOfMeasure: true  
      MaterialBaseUnit, 
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'  
      sum(MatlWrhsStkQtyInMatlBaseUnit) as MatlWrhsStkQtyInMatlBaseUnit,
      
      _MaterialStock,
      _MaterialSerialNumber
}
group by
      Material,
      Plant,
      StorageLocation,
      Batch,
      Supplier,
      Customer,
      WBSElementInternalID,
      SDDocument,
      SDDocumentItem,
      InventorySpecialStockType,
      InventoryStockType,
      MaterialBaseUnit
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALSTOCK_2"
],
"ASSOCIATED":
[
"A_MATERIALSERIALNUMBER",
"A_MATERIALSTOCK"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/