P_MaterialLedgerDocument

DDL: P_MATERIALLEDGERDOCUMENT SQL: PMLDOC Type: view COMPOSITE Package: ODATA_ML_MATLVCA_DISP

Material Ledger Document

P_MaterialLedgerDocument is a Composite CDS View that provides data about "Material Ledger Document" in SAP S/4HANA. It reads from 1 data source (mldoc) and exposes 70 fields with key fields docref, LedgerValuationCurrencyRole. Part of development package ODATA_ML_MATLVCA_DISP.

Data Sources (1)

SourceAliasJoin Type
mldoc mldoc from

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMLDOC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (70)

KeyFieldSource TableSource FieldDescription
KEY docref docref Orig.docum.num.
KEY LedgerValuationCurrencyRole curtp Valuation Area
Ledger rldnr Ledger (Compat.)
runref runref Costing Run Ref.
CostEstimate kalnr ProdCostEst.No.
FiscalYearPeriod jahrper Year / Period
jahrper_wip jahrper_wip Year / Period of WIP
current_per current_per Curr. Year / Period
xabr xabr Costing Doc.
glvor glvor Bus.transaction
vgart vgart Transactn Type
posart posart Item type
categ categ Category
ProcessCategory ptyp Visibility (I/E/V/C)
bewartgrp bewartgrp Mvmt Type Group
ProcurementAlternative bvalt PrcrmntAlt/Proc
ProductionProcess process Trans.
pkalnr pkalnr CE No. of Output
ValuationQuantity quant Trans. Qty Val. Unit
ValuationQuantityUnit meins Valuation Unit
InventoryAmtInCCCrcy stval Trs. Invent. Value
PriceDifferenceAmtInCCCrcy prd Price Difference
ExchRateDiffAmtInCoCodeCrcy kdm Exch.Rate Diff.
tpprd tpprd Prdif fr. Tansf.Pr.
altval altval Alt. Inventory Value
Currency waers Transaction Currency
lbkum lbkum Valuated stock
salk3 salk3 Total Value
salkv salkv Value/MA price
stprs stprs Standard price
pvprs pvprs Per. Unit Price
peinh peinh Unit of measure
xekrel xekrel Rel. f. Purch. Acct.
xplrel xplrel Rel. f. Price Lim.
plqty plqty Price Limiter Qty
markup markup Markup/markdown
xtprel xtprel Transfer Price Rel.
vkwrt vkwrt SalVal inc. VAT
vksal vksal Value at Sales Price
eqnum eqnum Field
timestamp timestamp UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
PostingDate budat Posting Date
cyclenr cyclenr Cycle Number
aufnr aufnr SettlementOrder
aufps aufps Order item no.
belnr belnr SD Document
kjahr kjahr Year
posnr posnr WBS Element
awtyp awtyp Reference Document Type
awsys awsys Logical System
aworg aworg Refer. Org.Unit
awref awref Reference Doc.
awitem awitem Ref. Doc. Line Item
awitgrp awitgrp Ref. Item Group
usnam usnam User Name
tcode tcode Undefined range (can be used for patch levels)
mlvnr mlvnr ML Transactn No
vgabe vgabe Transact. Type
hrkft hrkft Origin group order
kstar kstar Settlement CE
bwart bwart Valuation Type
Plant werks Receiving Plant
storno storno Reversal
bstmg bstmg Quantity withdrawn for settlement
bstme bstme Unit.Order
arewr arewr Ord.GRIR.Val
reewr reewr Ord.Set.Value
xkdm_nact xkdm_nact Capitalize E.R.Diffs
_dataaging _dataaging Data Aging
kongr kongr Reason

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_MaterialLedgerDocument.
-- 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.
-- SQL view name: PMLDOC

CREATE VIEW P_MaterialLedgerDocument AS
SELECT
  docref,
  curtp AS LedgerValuationCurrencyRole,
  rldnr AS Ledger,
  runref,
  kalnr AS CostEstimate,
  jahrper AS FiscalYearPeriod,
  jahrper_wip,
  current_per,
  xabr,
  glvor,
  vgart,
  posart,
  categ,
  ptyp AS ProcessCategory,
  bewartgrp,
  bvalt AS ProcurementAlternative,
  process AS ProductionProcess,
  pkalnr,
  quant AS ValuationQuantity,
  meins AS ValuationQuantityUnit,
  stval AS InventoryAmtInCCCrcy,
  prd AS PriceDifferenceAmtInCCCrcy,
  kdm AS ExchRateDiffAmtInCoCodeCrcy,
  tpprd,
  altval,
  waers AS Currency,
  lbkum,
  salk3,
  salkv,
  stprs,
  pvprs,
  peinh,
  xekrel,
  xplrel,
  plqty,
  markup,
  xtprel,
  vkwrt,
  vksal,
  eqnum,
  timestamp,
  budat AS PostingDate,
  cyclenr,
  aufnr,
  aufps,
  belnr,
  kjahr,
  posnr,
  awtyp,
  awsys,
  aworg,
  awref,
  awitem,
  awitgrp,
  usnam,
  tcode,
  mlvnr,
  vgabe,
  hrkft,
  kstar,
  bwart,
  werks AS Plant,
  storno,
  bstmg,
  bstme,
  arewr,
  reewr,
  xkdm_nact,
  kongr
FROM mldoc
;