P_SrlNmbrStockDiffMatlStock
Material Stock Quantity
P_SrlNmbrStockDiffMatlStock is a Composite CDS View that provides data about "Material Stock Quantity" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 16 fields with key fields Material, Plant, Batch, StorageLocation, InventoryStockType. It has 1 association to related views. Part of development package ODATA_LO_SN_STOCK_QUANTITIES.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialStock_2 | I_MaterialStock_2 | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_ProductPlant | _MaterialPlant | $projection.Material = _MaterialPlant.Product and $projection.Plant = _MaterialPlant.Plant |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Material Stock Quantity | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | ||
| KEY | Plant | Plant | ||
| KEY | Batch | Batch | ||
| KEY | StorageLocation | StorageLocation | ||
| KEY | InventoryStockType | InventoryStockType | ||
| KEY | InventorySpecialStockType | InventorySpecialStockType | ||
| KEY | Supplier | Supplier | ||
| KEY | SDDocument | SDDocument | ||
| KEY | SDDocumentItem | SDDocumentItem | ||
| KEY | WBSElementInternalID | WBSElementInternalID | ||
| KEY | Customer | Customer | ||
| KEY | SpecialStockIdfgStockOwner | SpecialStockIdfgStockOwner | ||
| KEY | MaterialBaseUnit | MaterialBaseUnit | ||
| CompanyCode | CompanyCode | |||
| MatlWrhsStkQtyInMatlBaseUnit | ||||
| SerialNumberProfile | _MaterialPlant | SerialNumberProfile |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Material Stock Quantity'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view entity P_SrlNmbrStockDiffMatlStock
as select from I_MaterialStock_2
association [1..1] to I_ProductPlant as _MaterialPlant on $projection.Material = _MaterialPlant.Product
and $projection.Plant = _MaterialPlant.Plant
{
key Material,
key Plant,
key Batch,
key StorageLocation,
key InventoryStockType,
key InventorySpecialStockType,
key Supplier,
key SDDocument,
key SDDocumentItem,
key WBSElementInternalID,
key Customer,
key SpecialStockIdfgStockOwner,
key MaterialBaseUnit,
CompanyCode,
@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit'
cast(sum(MatlWrhsStkQtyInMatlBaseUnit) as nsdm_stock_qty) as MatlWrhsStkQtyInMatlBaseUnit,
_MaterialPlant.SerialNumberProfile
}
group by
Material,
Plant,
Batch,
StorageLocation,
InventoryStockType,
InventorySpecialStockType,
Supplier,
SDDocument,
SDDocumentItem,
WBSElementInternalID,
Customer,
SpecialStockIdfgStockOwner,
MaterialBaseUnit,
CompanyCode,
_MaterialPlant.SerialNumberProfile
having
_MaterialPlant.SerialNumberProfile <> ''
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA