I_FldLogsReturnsMaterialStock
Returns Material Stock
I_FldLogsReturnsMaterialStock is a Composite CDS View that provides data about "Returns Material Stock" in SAP S/4HANA. It reads from 2 data sources (I_FldLogsPlantBasic, I_FldLogsMatlDocumentRecord) and exposes 8 fields with key fields Material, FldLogsRemotePlant, RemoteStorageLocation, WBSElementInternalID.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_FldLogsPlantBasic | _FldLogsPlant | inner |
| I_FldLogsMatlDocumentRecord | _MaterialStock | from |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| EndUserText.label | Returns Material Stock | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (8)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | I_FldLogsMatlDocumentRecord | StockIdentifyingMaterial | |
| KEY | FldLogsRemotePlant | I_FldLogsMatlDocumentRecord | Plant | |
| KEY | RemoteStorageLocation | I_FldLogsMatlDocumentRecord | StockIdfgStorageLocation | |
| KEY | WBSElementInternalID | I_FldLogsMatlDocumentRecord | SpecialStockIdfgWBSElement | |
| MatlWrhsStkQtyOnPlantLvl | ||||
| StockUnit | I_FldLogsMatlDocumentRecord | MaterialBaseUnit | ||
| Batch | I_FldLogsMatlDocumentRecord | Batch | ||
| ValuationType | I_FldLogsMatlDocumentRecord | ValuationType |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Returns Material Stock'
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL
}
@VDM.viewType: #COMPOSITE
define view entity I_FldLogsReturnsMaterialStock
as select from I_FldLogsMatlDocumentRecord as _MaterialStock
inner join I_FldLogsPlantBasic as _FldLogsPlant on _FldLogsPlant.Plant = _MaterialStock.Plant
and _MaterialStock.InventoryStockType = '01'
and _MaterialStock.StockIdfgStorageLocation <> ''
{
key _MaterialStock.StockIdentifyingMaterial as Material,
key _MaterialStock.Plant as FldLogsRemotePlant,
key _MaterialStock.StockIdfgStorageLocation as RemoteStorageLocation,
key _MaterialStock.SpecialStockIdfgWBSElement as WBSElementInternalID,
@Semantics.quantity.unitOfMeasure: 'StockUnit'
sum(_MaterialStock.MatlStkChangeQtyInBaseUnit) as MatlWrhsStkQtyOnPlantLvl,
_MaterialStock.MaterialBaseUnit as StockUnit,
_MaterialStock.Batch as Batch,
_MaterialStock.ValuationType as ValuationType
}
group by
_MaterialStock.StockIdentifyingMaterial,
_MaterialStock.Plant,
_MaterialStock.StockIdfgStorageLocation,
_MaterialStock.MaterialBaseUnit,
_MaterialStock.SpecialStockIdfgWBSElement,
_MaterialStock.Batch,
_MaterialStock.ValuationType
having
sum(_MaterialStock.MatlStkChangeQtyInBaseUnit) > 0
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FLDLOGSMATLDOCUMENTRECORD",
"I_FLDLOGSPLANTBASIC"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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