P_MatlStkAtKeyDateInAltUoM1
P_MatlStkAtKeyDateInAltUoM1 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 18 fields with key fields Material, Plant, StorageLocation, Batch, Supplier.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_MaterialStock_2 | I_MaterialStock_2 | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | vdm_v_key_date |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMATSTKDATEAUOM1 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (18)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | ||
| KEY | Plant | Plant | ||
| KEY | StorageLocation | StorageLocation | ||
| KEY | Batch | Batch | ||
| KEY | Supplier | Supplier | ||
| KEY | SDDocument | SDDocument | ||
| KEY | SDDocumentItem | SDDocumentItem | ||
| KEY | WBSElementInternalID | |||
| KEY | SpecialStockIdfgStockOwner | SpecialStockIdfgStockOwner | ||
| KEY | InventoryStockType | InventoryStockType | ||
| KEY | InventorySpecialStockType | InventorySpecialStockType | ||
| KEY | MaterialBaseUnit | MaterialBaseUnit | ||
| CompanyCode | CompanyCode | |||
| FiscalYearVariant | FiscalYearVariant | |||
| MatlWrhsStkQtyInMatlBaseUnit | ||||
| MatlCnsmpnQtyInMatlBaseUnit | ||||
| MatlStkIncrQtyInMatlBaseUnit | ||||
| MatlStkDecrQtyInMatlBaseUnit |
@AbapCatalog: {
sqlViewName: 'PMATSTKDATEAUOM1',
compiler.compareFilter: true,
preserveKey: true
}
@ObjectModel: {
usageType: {
sizeCategory: #XXL,
serviceQuality: #D,
dataClass:#TRANSACTIONAL
}
}
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
viewType: #COMPOSITE,
private: true
}
/*+[hideWarning] { "IDS" : [ "KEY_CHECK" ] } */
define view P_MatlStkAtKeyDateInAltUoM1 with parameters
P_KeyDate : vdm_v_key_date
as select from I_MaterialStock_2
{
// Stock Identifier
key Material,
key Plant,
key StorageLocation,
key Batch,
key Supplier,
key SDDocument,
key SDDocumentItem,
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 Customer,
key SpecialStockIdfgStockOwner,
key InventoryStockType,
key InventorySpecialStockType,
// Units
@Semantics.unitOfMeasure: true
key MaterialBaseUnit,
CompanyCode,
FiscalYearVariant,
// Quantities
sum(MatlWrhsStkQtyInMatlBaseUnit) as MatlWrhsStkQtyInMatlBaseUnit,
sum(MatlCnsmpnQtyInMatlBaseUnit) as MatlCnsmpnQtyInMatlBaseUnit,
sum(MatlStkIncrQtyInMatlBaseUnit) as MatlStkIncrQtyInMatlBaseUnit,
sum(MatlStkDecrQtyInMatlBaseUnit) as MatlStkDecrQtyInMatlBaseUnit
}
where MatlDocLatestPostgDate <= $parameters.P_KeyDate
group by Material, Plant, StorageLocation, Batch, Supplier, SDDocument, SDDocumentItem, WBSElementInternalID, Customer,
SpecialStockIdfgStockOwner, InventoryStockType, InventorySpecialStockType, MaterialBaseUnit, CompanyCode, FiscalYearVariant
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