P_MatlLdgrDocItmExceptPrevMnth

DDL: P_MATLLDGRDOCITMEXCEPTPREVMNTH Type: view_entity COMPOSITE

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.

Data Sources (1)

SourceAliasJoin Type
I_PriceChangeDocumentItem I_PriceChangeDocumentItem from

Associations (2)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;