A_MatlStkByKeyDteInAcctMod
API view by directly consuming I_MaterialStock
A_MatlStkByKeyDteInAcctMod is a Composite CDS View that provides data about "API view by directly consuming I_MaterialStock" in SAP S/4HANA. It reads from 1 data source (I_MaterialStock_2) and exposes 13 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 | sydate |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | AMATSTKBKDTINACT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| EndUserText.label | API view by directly consuming I_MaterialStock | 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 (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 |
@AbapCatalog: {
sqlViewName: 'AMATSTKBKDTINACT',
compiler.compareFilter: true,
preserveKey: true
}
@EndUserText.label: 'API view by directly consuming I_MaterialStock'
@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_MatlStkByKeyDteInAcctMod
with parameters
P_KeyDate : sydate
as select from I_MaterialStock_2
association[1..1] to A_MaterialStock as _MaterialStock on $projection.Material = _MaterialStock.Material
{
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
}
where
MatlDocLatestPostgDate <= $parameters.P_KeyDate
group by
Material,
Plant,
StorageLocation,
Batch,
Supplier,
Customer,
WBSElementInternalID,
SDDocument,
SDDocumentItem,
InventorySpecialStockType,
InventoryStockType,
MaterialBaseUnit
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