P_Materialledgercurtp_Bal
P_Materialledgercurtp_Bal is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_MatlLedgerValnCrcyRole, P_Acdoca_Cube) and exposes 99 fields with key fields rbukrs, rldnr, racct, gjahr, belnr. It has 4 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_MatlLedgerValnCrcyRole | _curtp | inner |
| P_Acdoca_Cube | it | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | P_TCURM | _TCURM | _TCURM.bwkrs_cus = '1' |
| [0..1] | I_MaterialValuation | _MaterialValuation | _MaterialValuation.CostEstimate = it.kalnr and _MaterialValuation.Material = it.matnr and _MaterialValuation.ValuationArea = it.bwkey |
| [0..1] | I_BusinessTransactionType | _BusinessTransactionType | it.bttype = _BusinessTransactionType.BusinessTransactionType |
| [1] | I_FiscalYearVariant | _FiscalYearVariant | $projection.periv = _FiscalYearVariant.FiscalYearVariant |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PMLCUTPBA | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (99)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | rbukrs | P_Acdoca_Cube | rbukrs | Company Code |
| KEY | rldnr | P_Acdoca_Cube | rldnr | Ledger (Compat.) |
| KEY | racct | P_Acdoca_Cube | racct | GL Account From |
| KEY | gjahr | P_Acdoca_Cube | gjahr | Settlement Year |
| KEY | belnr | P_Acdoca_Cube | belnr | SD Document |
| KEY | docln | P_Acdoca_Cube | docln | Matching Document Line Item |
| KEY | matnr | P_Acdoca_Cube | matnr | Vehicle Model |
| ktopl | P_Acdoca_Cube | ktopl | G/L Chart of Accounts | |
| blart | P_Acdoca_Cube | blart | Rep. rec. doc. type | |
| bwkey | P_Acdoca_Cube | bwkey | Valuation Area | |
| bwtar | P_Acdoca_Cube | bwtar | Valuation Type | |
| poper | P_Acdoca_Cube | poper | Posting periods | |
| ryear | P_Acdoca_Cube | ryear | Ref. Year1 | |
| budat | P_Acdoca_Cube | budat | Posting Date | |
| awref | P_Acdoca_Cube | awref | Reference Doc. | |
| awtyp | P_Acdoca_Cube | awtyp | Reference Document Type | |
| bldat | P_Acdoca_Cube | bldat | Journal Entry Date | |
| bttype | P_Acdoca_Cube | bttype | Business Transaction Type | |
| prctr | P_Acdoca_Cube | prctr | Profit Centers | |
| rcntr | P_Acdoca_Cube | rcntr | Cost Center | |
| segment | P_Acdoca_Cube | segment | Segment number | |
| usnam | P_Acdoca_Cube | usnam | User Name | |
| timestamp | P_Acdoca_Cube | timestamp | UTC Time Stamp in Short Form (YYYYMMDDhhmmss) | |
| fiscyearper | P_Acdoca_Cube | fiscyearper | Period/Year | |
| ebeln | P_Acdoca_Cube | ebeln | Source PurchDoc | |
| aufnr | P_Acdoca_Cube | aufnr | SettlementOrder | |
| ktosl | P_Acdoca_Cube | ktosl | Transaction | |
| bwkrs_cus | _TCURM | bwkrs_cus | Valuation area | |
| kokrs | P_Acdoca_Cube | kokrs | Org. Value | |
| kalnr | P_Acdoca_Cube | kalnr | ProdCostEst.No. | |
| sobkz | P_Acdoca_Cube | sobkz | Special Stock | |
| periv | P_Acdoca_Cube | periv | FYear Variant | |
| mlptyp | P_Acdoca_Cube | mlptyp | Orig. proc.cat. | |
| mlcateg | P_Acdoca_Cube | mlcateg | Category | |
| rhcur | P_Acdoca_Cube | rhcur | Local Currency | |
| hslendashsl | ||||
| hvkwrt | P_Acdoca_Cube | hvkwrt | Value SP LCrcy | |
| rkcur | P_Acdoca_Cube | rkcur | Ledger curr. | |
| kslendasksl | ||||
| rocur | P_Acdoca_Cube | rocur | Free Defined Crcy 1 | |
| oslendasosl | ||||
| rvcur | P_Acdoca_Cube | rvcur | Free Defined Crcy 4 | |
| vslendasvsl | ||||
| rbcur | P_Acdoca_Cube | rbcur | Free Defined Crcy 3 | |
| bslendasbsl | ||||
| rccur | P_Acdoca_Cube | rccur | Third Currency | |
| cslendascsl | ||||
| rdcur | P_Acdoca_Cube | rdcur | Free Defined Crcy 5 | |
| dslendasdsl | ||||
| recur | P_Acdoca_Cube | recur | Free Defined Crcy 6 | |
| eslendasesl | ||||
| rfcur | P_Acdoca_Cube | rfcur | Free Defined Crcy 7 | |
| fslendasfsl | ||||
| rgcur | P_Acdoca_Cube | rgcur | Free Defined Crcy 8 | |
| gslendasgsl | ||||
| rvunit | P_Acdoca_Cube | rvunit | Valuation UoM | |
| vmsl | P_Acdoca_Cube | vmsl | Val. quantity | |
| CurtpH | P_MatlLedgerValnCrcyRole | CompanyCodeCurrencyRole | ||
| CurtpK | P_MatlLedgerValnCrcyRole | GlobalCurrencyRole | ||
| CurtpO | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency1Role | ||
| CurtpV | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency2Role | ||
| CurtpB | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency3Role | ||
| CurtpC | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency4Role | ||
| CurtpD | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency5Role | ||
| CurtpE | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency6Role | ||
| CurtpF | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency7Role | ||
| CurtpG | P_MatlLedgerValnCrcyRole | FreeDefinedCurrency8Role | ||
| xobew | P_Acdoca_Cube | xobew | Vendor stk val. | |
| kzbws | P_Acdoca_Cube | kzbws | Valuation | |
| mat_kdauf | P_Acdoca_Cube | mat_kdauf | SD Doc of Inv. | |
| mat_kdpos | P_Acdoca_Cube | mat_kdpos | SD Item of Inv. | |
| mat_pspnr | P_Acdoca_Cube | mat_pspnr | WBSElem of Inv. | |
| mat_lifnr | P_Acdoca_Cube | mat_lifnr | Vendor of Inv. | |
| _GLAccountInChartOfAccounts | _GLAccountInChartOfAccounts | |||
| _ChartOfAccounts | _ChartOfAccounts | |||
| _Segment | _Segment | |||
| _Material | _Material | |||
| _CompanyCode | _CompanyCode | |||
| _ProfitCenter | _ProfitCenter | |||
| _CostCenter | _CostCenter | |||
| _CompanyCodeCurrency | _CompanyCodeCurrency | |||
| _FreeDefinedCurrency1 | _FreeDefinedCurrency1 | |||
| _FreeDefinedCurrency2 | _FreeDefinedCurrency2 | |||
| _FreeDefinedCurrency3 | _FreeDefinedCurrency3 | |||
| _FreeDefinedCurrency4 | _FreeDefinedCurrency4 | |||
| _FreeDefinedCurrency5 | _FreeDefinedCurrency5 | |||
| _FreeDefinedCurrency6 | _FreeDefinedCurrency6 | |||
| _FreeDefinedCurrency7 | _FreeDefinedCurrency7 | |||
| _FreeDefinedCurrency8 | _FreeDefinedCurrency8 | |||
| _GlobalCurrency | _GlobalCurrency | |||
| _CostSourceUnit | _CostSourceUnit | |||
| _ControllingArea | _ControllingArea | |||
| _Ledger | _Ledger | |||
| _FiscalYear | _FiscalYear | |||
| _FiscalYearVariant | _FiscalYearVariant | |||
| _JournalEntry | _JournalEntry | |||
| _MaterialValuation | _MaterialValuation | |||
| _BusinessTransactionType | _BusinessTransactionType | |||
| _Product | _Product |
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_Materialledgercurtp_Bal.
-- 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: PMLCUTPBA
CREATE VIEW P_Materialledgercurtp_Bal AS
SELECT
it.rbukrs AS rbukrs,
it.rldnr AS rldnr,
it.racct AS racct,
it.gjahr AS gjahr,
it.belnr AS belnr,
it.docln AS docln,
it.matnr AS matnr,
it.ktopl AS ktopl,
it.blart AS blart,
it.bwkey AS bwkey,
it.bwtar AS bwtar,
it.poper AS poper,
it.ryear AS ryear,
it.budat AS budat,
it.awref AS awref,
it.awtyp AS awtyp,
it.bldat AS bldat,
it.bttype AS bttype,
it.prctr AS prctr,
it.rcntr AS rcntr,
it.segment AS segment,
it.usnam AS usnam,
it.timestamp AS timestamp,
it.fiscyearper AS fiscyearper,
it.ebeln AS ebeln,
it.aufnr AS aufnr,
it.ktosl AS ktosl,
_TCURM.bwkrs_cus AS bwkrs_cus,
it.kokrs AS kokrs,
it.kalnr AS kalnr,
it.sobkz AS sobkz,
it.periv AS periv,
it.mlptyp AS mlptyp,
it.mlcateg AS mlcateg,
it.rhcur AS rhcur,
case CompanyCodeCurrencyRole when ' ' then cast(0 as fins_vhcur12) else it.hsl end as hsl AS hslendashsl,
it.hvkwrt AS hvkwrt,
it.rkcur AS rkcur,
case GlobalCurrencyRole when ' ' then cast(0 as fins_vkcur12) else it.ksl end as ksl AS kslendasksl,
it.rocur AS rocur,
case FreeDefinedCurrency1Role when ' ' then cast(0 as fins_vocur12) else it.osl end as osl AS oslendasosl,
it.rvcur AS rvcur,
case FreeDefinedCurrency2Role when ' ' then cast(0 as fins_vvcur12) else it.vsl end as vsl AS vslendasvsl,
it.rbcur AS rbcur,
case FreeDefinedCurrency3Role when ' ' then cast(0 as fins_vbcur12) else it.bsl end as bsl AS bslendasbsl,
it.rccur AS rccur,
case FreeDefinedCurrency4Role when ' ' then cast(0 as fins_vccur12) else it.csl end as csl AS cslendascsl,
it.rdcur AS rdcur,
case FreeDefinedCurrency5Role when ' ' then cast(0 as fins_vdcur12) else it.dsl end as dsl AS dslendasdsl,
it.recur AS recur,
case FreeDefinedCurrency6Role when ' ' then cast(0 as fins_vecur12) else it.esl end as esl AS eslendasesl,
it.rfcur AS rfcur,
case FreeDefinedCurrency7Role when ' ' then cast(0 as fins_vfcur12) else it.fsl end as fsl AS fslendasfsl,
it.rgcur AS rgcur,
case FreeDefinedCurrency8Role when ' ' then cast(0 as fins_vgcur12) else it.gsl end as gsl AS gslendasgsl,
it.rvunit AS rvunit,
it.vmsl AS vmsl,
_curtp.CompanyCodeCurrencyRole AS CurtpH,
_curtp.GlobalCurrencyRole AS CurtpK,
_curtp.FreeDefinedCurrency1Role AS CurtpO,
_curtp.FreeDefinedCurrency2Role AS CurtpV,
_curtp.FreeDefinedCurrency3Role AS CurtpB,
_curtp.FreeDefinedCurrency4Role AS CurtpC,
_curtp.FreeDefinedCurrency5Role AS CurtpD,
_curtp.FreeDefinedCurrency6Role AS CurtpE,
_curtp.FreeDefinedCurrency7Role AS CurtpF,
_curtp.FreeDefinedCurrency8Role AS CurtpG,
it.xobew AS xobew,
it.kzbws AS kzbws,
it.mat_kdauf AS mat_kdauf,
it.mat_kdpos AS mat_kdpos,
it.mat_pspnr AS mat_pspnr,
it.mat_lifnr AS mat_lifnr
FROM P_Acdoca_Cube AS it
INNER JOIN P_MatlLedgerValnCrcyRole AS _curtp ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_TCURM AS _TCURM ON _TCURM.bwkrs_cus = '1' -- association [0..1]
LEFT OUTER JOIN I_MaterialValuation AS _MaterialValuation ON _MaterialValuation.CostEstimate = it.kalnr AND _MaterialValuation.Material = it.matnr AND _MaterialValuation.ValuationArea = it.bwkey -- association [0..1]
LEFT OUTER JOIN I_BusinessTransactionType AS _BusinessTransactionType ON it.bttype = _BusinessTransactionType.BusinessTransactionType -- association [0..1]
LEFT OUTER JOIN I_FiscalYearVariant AS _FiscalYearVariant ON periv = _FiscalYearVariant.FiscalYearVariant -- association [1]
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- 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
- 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