P_MatlLdgrDocItmExceptPrevMnth
Document Items for the current month
P_MatlLdgrDocItmExceptPrevMnth is a Composite CDS View that provides data about "Document Items for the current month" in SAP S/4HANA. It reads from 1 data source (I_PriceChangeDocumentItem) and exposes 50 fields with key fields MaterialLedgerDocument, MaterialLedgerDocumentYear, DocumentItemNumber, Ledger, CurrencyRole. It has 2 associations to related views. Part of development package ODATA_ML_DSPMATLPRCHGDOCS.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PriceChangeDocumentItem | I_PriceChangeDocumentItem | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_MaterialLedgerDocItmPrevMnth | _PreviousMonth | $projection.MaterialLedgerDocument = _PreviousMonth.MaterialLedgerDocument and $projection.MaterialLedgerDocumentYear = _PreviousMonth.MaterialLedgerDocumentYear and $projection.DocumentItemNumber = _PreviousMonth.DocumentItemNumber and $projection.Ledger = _PreviousMonth.Ledger and $projection.CurrencyRole = _PreviousMonth.CurrencyRole |
| [0..1] | I_WBSElementBasicData | _WBSElementBasicData | $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Document Items for the current month | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (50)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | MaterialLedgerDocument | MaterialLedgerDocument | ||
| KEY | MaterialLedgerDocumentYear | MaterialLedgerDocumentYear | ||
| KEY | DocumentItemNumber | DocumentItemNumber | Item | |
| KEY | Ledger | Ledger | Ledger | |
| KEY | CurrencyRole | CurrencyRole | Curr./Val. Type | |
| CompanyCode | CompanyCode | Receiver Company Code | ||
| ValuationArea | ValuationArea | Valuation Area | ||
| ProdCostEstNumber | ProdCostEstNumber | ProdCostEst.No. | ||
| SourceDocumentItem | SourceDocumentItem | |||
| Product | Product | Product Sold | ||
| ValuationType | ValuationType | Valuation Type | ||
| MaterialBaseUnit | MaterialBaseUnit | Valuation Unit | ||
| Division | Division | Internal Division ID | ||
| BusinessArea | BusinessArea | Business Area | ||
| ValuationAreaGroup | ValuationAreaGroup | |||
| ChartOfAccounts | ChartOfAccounts | Node Class | ||
| PriceDeterminationControl | PriceDeterminationControl | Price Determ. | ||
| MaterialLedgerItemType | MaterialLedgerItemType | |||
| MaterialLedgerUpdateStructure | MaterialLedgerUpdateStructure | |||
| MaterialLedgerProcessType | MaterialLedgerProcessType | |||
| SalesDocument | SalesDocument | SD Document | ||
| SalesDocumentItem | SalesDocumentItem | Sales Document Item | ||
| InventorySpecialStockSupplier | InventorySpecialStockSupplier | |||
| InvtryValnSpecialStockType | InvtryValnSpecialStockType | |||
| WBSElementInternalID | WBSElementInternalID | WBS Internal ID | ||
| PostingDate | PostingDate | Posting Date for GR | ||
| MaterialLedgerPeriodType | MaterialLedgerPeriodType | |||
| PreviousInventoryQuantity | PreviousInventoryQuantity | |||
| ValuationClass | ValuationClass | Valuation Class | ||
| FiscalYear | FiscalYear | G/L Fiscal Year | ||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| InventoryPrice | InventoryPrice | Price | ||
| MovingAveragePrice | MovingAveragePrice | Per. Unit Price | ||
| StandardPrice | StandardPrice | Standard price | ||
| ProductPriceControl | ProductPriceControl | Price control | ||
| MaterialPriceUnitQty | MaterialPriceUnitQty | Price unit | ||
| PriceChangeCause | PriceChangeCause | |||
| Currency | Currency | Valuation Crcy | ||
| PreviousProductPriceControl | PreviousProductPriceControl | |||
| PreviousStandardPrice | PreviousStandardPrice | |||
| PreviousMovingAveragePrice | PreviousMovingAveragePrice | |||
| PreviousInventoryPrice | PreviousInventoryPrice | |||
| InventoryAmountChangeAmount | InventoryAmountChangeAmount | |||
| PrevInvtryPriceInventoryAmount | PrevInvtryPriceInventoryAmount | |||
| MvgAvgPrInvtryAmtChangeAmount | MvgAvgPrInvtryAmtChangeAmount | |||
| PrevMvgAvgPriceInventoryAmount | PrevMvgAvgPriceInventoryAmount | |||
| PreviousMaterialPriceUnitQty | PreviousMaterialPriceUnitQty | |||
| MatlLdgrPriceRevaluationAmount | MatlLdgrPriceRevaluationAmount | |||
| MatlLdgrExchRateRevalAmount | MatlLdgrExchRateRevalAmount | |||
| _WBSElementBasicData | _WBSElementBasicData |
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_MatlLdgrDocItmExceptPrevMnth.
-- 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.
CREATE VIEW P_MatlLdgrDocItmExceptPrevMnth AS
SELECT
MaterialLedgerDocument,
MaterialLedgerDocumentYear,
DocumentItemNumber,
Ledger,
CurrencyRole,
CompanyCode,
ValuationArea,
ProdCostEstNumber,
SourceDocumentItem,
Product,
ValuationType,
MaterialBaseUnit,
Division,
BusinessArea,
ValuationAreaGroup,
ChartOfAccounts,
PriceDeterminationControl,
MaterialLedgerItemType,
MaterialLedgerUpdateStructure,
MaterialLedgerProcessType,
SalesDocument,
SalesDocumentItem,
InventorySpecialStockSupplier,
InvtryValnSpecialStockType,
WBSElementInternalID,
PostingDate,
MaterialLedgerPeriodType,
PreviousInventoryQuantity,
ValuationClass,
FiscalYear,
FiscalPeriod,
InventoryPrice,
MovingAveragePrice,
StandardPrice,
ProductPriceControl,
MaterialPriceUnitQty,
PriceChangeCause,
Currency,
PreviousProductPriceControl,
PreviousStandardPrice,
PreviousMovingAveragePrice,
PreviousInventoryPrice,
InventoryAmountChangeAmount,
PrevInvtryPriceInventoryAmount,
MvgAvgPrInvtryAmtChangeAmount,
PrevMvgAvgPriceInventoryAmount,
PreviousMaterialPriceUnitQty,
MatlLdgrPriceRevaluationAmount,
MatlLdgrExchRateRevalAmount
FROM I_PriceChangeDocumentItem
LEFT OUTER JOIN P_MaterialLedgerDocItmPrevMnth AS _PreviousMonth ON MaterialLedgerDocument = _PreviousMonth.MaterialLedgerDocument AND MaterialLedgerDocumentYear = _PreviousMonth.MaterialLedgerDocumentYear AND DocumentItemNumber = _PreviousMonth.DocumentItemNumber AND Ledger = _PreviousMonth.Ledger AND CurrencyRole = _PreviousMonth.CurrencyRole -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElementBasicData ON WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID -- 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