P_MltplMatlStk_L3C
P_MltplMatlStk_L3C is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_MltplMatlStk_L2) and exposes 31 fields with key fields Material, Plant, StorageLocation, Batch, Supplier. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_MltplMatlStk_L2 | P_MltplMatlStk_L2 | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_EndDate | sydate |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | R_MaterialStockValueByKeyDate | _MaterialStockValueByKeyDate | $projection.CostEstimate = _MaterialStockValueByKeyDate.CostEstimate and $projection.CompanyCode = _MaterialStockValueByKeyDate.ValuationArea and $projection.Material = _MaterialStockValueByKeyDate.Product and $projection.MaterialBaseUnit = _MaterialStockValueByKeyDate.BaseUnit and $projection.CostEstimate <> '000000000000' |
| [0..1] | I_CurrentMatlPriceByCostEst | _CurrentInvtryPrice | $projection.CostEstimate = _CurrentInvtryPrice.CostEstimate and $projection.CompanyCode = _CurrentInvtryPrice.ValuationArea and $projection.Material = _CurrentInvtryPrice.Material and $projection.CostEstimate <> '000000000000' |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Material | Material | Vehicle Model | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | StorageLocation | StorageLocation | StorageLocation | |
| KEY | Batch | Batch | Lot No. | |
| KEY | Supplier | Supplier | Supplier | |
| KEY | SDDocument | SDDocument | SD Document | |
| KEY | SDDocumentItem | SDDocumentItem | ||
| KEY | WBSElementInternalID | WBSElementInternalID | WBS Internal ID | |
| KEY | Customer | Customer | Sold-to Party | |
| KEY | ResourceID | ResourceID | Vehicle ID | |
| KEY | InventorySpecialStockType | InventorySpecialStockType | Special Stock Type | |
| KEY | CostEstimate | CostEstimate | Cost EstimateNo | |
| ValuationAreaType | ||||
| ValuationareaisConpanyCodeCompanyCode | ||||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| InventoryValuationType | InventoryValuationType | Valuation Type | ||
| Currency | Currency | Valuation Crcy | ||
| VltdUnrestrictedUseStkQty | VltdUnrestrictedUseStkQty | |||
| QualityInspectionStockQuantity | QualityInspectionStockQuantity | |||
| ReturnsBlockedStockQuantity | ReturnsBlockedStockQuantity | |||
| TransferStockStorageLocQty | TransferStockStorageLocQty | |||
| TransferStockPlantQuantity | TransferStockPlantQuantity | |||
| StockInTransitQuantity | StockInTransitQuantity | Stk in Transit | ||
| BlockedStockQuantity | BlockedStockQuantity | |||
| RestrictedStockQuantity | RestrictedStockQuantity | |||
| TiedEmptiesStockQuantity | TiedEmptiesStockQuantity | |||
| GoodsReceiptBlockedStockQty | GoodsReceiptBlockedStockQty | Val. GR Blocked Stck | ||
| dec232asInventoryPrice | ||||
| dec50endasMaterialPriceUnitQty | ||||
| AmountInCompanyCodeCurrency | ||||
| InventoryQty |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_MltplMatlStk_L3C.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_EndDate : sydate
CREATE VIEW P_MltplMatlStk_L3C AS
SELECT
Material,
Plant,
StorageLocation,
Batch,
Supplier,
SDDocument,
SDDocumentItem,
WBSElementInternalID,
Customer,
ResourceID,
InventorySpecialStockType,
CostEstimate,
cast('3' as bwkrs_cus) AS ValuationAreaType,
MaterialBaseUnit,
InventoryValuationType,
Currency,
VltdUnrestrictedUseStkQty,
QualityInspectionStockQuantity,
ReturnsBlockedStockQuantity,
TransferStockStorageLocQty,
TransferStockPlantQuantity,
StockInTransitQuantity,
BlockedStockQuantity,
RestrictedStockQuantity,
TiedEmptiesStockQuantity,
GoodsReceiptBlockedStockQty,
case when _CurrentInvtryPrice.MaterialPriceUnitQty = 0 then cast(1 as abap.dec( 5, 0 )) when _CurrentInvtryPrice.MaterialPriceUnitQty is null then cast(1 as abap.dec( 5, 0 )) else cast(_CurrentInvtryPrice.MaterialPriceUnitQty as abap.dec( 5, 0 )) end as MaterialPriceUnitQty AS dec50endasMaterialPriceUnitQty,
cast(_MaterialStockValueByKeyDate( P_EndDate: $parameters.P_EndDate ).AmountInCompanyCodeCurrency as abap.dec(23,2)) AS AmountInCompanyCodeCurrency,
cast(_MaterialStockValueByKeyDate( P_EndDate: $parameters.P_EndDate ).InventoryQty as abap.dec(16,5)) AS InventoryQty
FROM P_MltplMatlStk_L2
LEFT OUTER JOIN R_MaterialStockValueByKeyDate AS _MaterialStockValueByKeyDate ON CostEstimate = _MaterialStockValueByKeyDate.CostEstimate AND CompanyCode = _MaterialStockValueByKeyDate.ValuationArea AND Material = _MaterialStockValueByKeyDate.Product AND MaterialBaseUnit = _MaterialStockValueByKeyDate.BaseUnit AND CostEstimate <> '000000000000' -- association [0..1]
LEFT OUTER JOIN I_CurrentMatlPriceByCostEst AS _CurrentInvtryPrice ON CostEstimate = _CurrentInvtryPrice.CostEstimate AND CompanyCode = _CurrentInvtryPrice.ValuationArea AND Material = _CurrentInvtryPrice.Material AND CostEstimate <> '000000000000' -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA