I_DistrAccountingData
Distribution cost data
I_DistrAccountingData is a Composite CDS View that provides data about "Distribution cost data" in SAP S/4HANA. It reads from 3 data sources (acdoca, tka01, finsc_cmp_versnc) and exposes 36 fields with key fields Ledger, CompanyCode, FiscalYear, AccountingDocument, GLAccountLineItem.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| acdoca | a | from |
| tka01 | t | inner |
| finsc_cmp_versnc | v | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Distribution cost data | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (36)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Ledger | acdoca | rldnr | Ledger (Compat.) |
| KEY | CompanyCode | acdoca | rbukrs | Company Code |
| KEY | FiscalYear | acdoca | gjahr | Settlement Year |
| KEY | AccountingDocument | acdoca | belnr | SD Document |
| KEY | GLAccountLineItem | acdoca | docln | Matching Document Line Item |
| CostElement | acdoca | racct | GL Account From | |
| ControllingArea | acdoca | kokrs | Org. Value | |
| FiscalYearPostingPeriod | acdoca | poper | Posting periods | |
| ControllingBusTransacType | acdoca | vrgng | Bus.Transaction | |
| OrderID | acdoca | aufnr | SettlementOrder | |
| wsl3endasAmountInTransactionCurrency | ||||
| TransactionCurrency | acdoca | rwcur | Transaction Currency | |
| kslendasAmountInCtrlgObjectCurrency | ||||
| rco_ocurendasControllingObjectCurrency | ||||
| hslendasAmountInCtrlgAreaCrcy | ||||
| ControllingAreaCurrency | tka01 | waers | Transaction Currency | |
| DistrdTotalMaterialQuantity | acdoca | vmsl | Val. quantity | |
| DistrdTotalMaterialQtyUnit | acdoca | rvunit | Valuation UoM | |
| PurchasingDocument | acdoca | ebeln | Source PurchDoc | |
| PurchasingDocumentItem | acdoca | ebelp | Item pur. doc. | |
| Material | acdoca | matnr | Vehicle Model | |
| Plant | acdoca | werks | Receiving Plant | |
| ControllingObject | acdoca | objnr | Val. Obj. No. | |
| ControllingKeySubNumber | acdoca | hrkft | Origin group order | |
| PartnerControllingObject | acdoca | parob1 | Partner Object | |
| PartnerCompanyCode | acdoca | pbukrs | Partner CoCode | |
| OriginSenderObject | acdoca | uspob | Source Object | |
| OriginCostCtrActivityType | acdoca | ulstar | OrigAct. | |
| ControllingDebitCreditCode | ||||
| ControllingObjectType | acdoca | accasty | Object Type | |
| ControllingDocument | acdoca | co_belnr | Document Number | |
| ControllingDocumentItem | acdoca | co_buzei | Posting Row | |
| WBSElementInternalID | ||||
| DistributionPostingDate | acdoca | budat | Posting Date | |
| ChartOfAccounts | acdoca | ktopl | G/L Chart of Accounts | |
| LastChangeDateTime | acdoca | timestamp | UTC Time Stamp in Short Form (YYYYMMDDhhmmss) |
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 I_DistrAccountingData.
-- 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 I_DistrAccountingData AS
SELECT
a.rldnr AS Ledger,
a.rbukrs AS CompanyCode,
a.gjahr AS FiscalYear,
a.belnr AS AccountingDocument,
a.docln AS GLAccountLineItem,
a.racct AS CostElement,
a.kokrs AS ControllingArea,
a.poper AS FiscalYearPostingPeriod,
a.vrgng AS ControllingBusTransacType,
a.aufnr AS OrderID,
case v.wtgbtr when 'WSL' then a.wsl when 'WSL2' then a.wsl2 when 'WSL3' then a.wsl3 end as AmountInTransactionCurrency AS wsl3endasAmountInTransactionCurrency,
a.rwcur AS TransactionCurrency,
case v.wogbtr when 'CO_OSL' then a.co_osl when 'HSL' then a.hsl when 'OSL' then a.osl when 'VSL' then a.vsl when 'BSL' then a.bsl when 'CSL' then a.csl when 'DSL' then a.dsl when 'ESL' then a.esl when 'FSL' then a.fsl when 'GSL' then a.gsl when 'KSL' then a.ksl end as AmountInCtrlgObjectCurrency AS kslendasAmountInCtrlgObjectCurrency,
case when ( a.rco_ocur is null or a.rco_ocur = '' or t.xwbuk = 'X' ) then a.rhcur else a.rco_ocur end as ControllingObjectCurrency AS rco_ocurendasControllingObjectCurrency,
case v.wkgbtr when 'KSL' then a.ksl when 'OSL' then a.osl when 'VSL' then a.vsl when 'BSL' then a.bsl when 'CSL' then a.csl when 'DSL' then a.dsl when 'ESL' then a.esl when 'FSL' then a.fsl when 'GSL' then a.gsl when 'HSL' then a.hsl end as AmountInCtrlgAreaCrcy AS hslendasAmountInCtrlgAreaCrcy,
t.waers AS ControllingAreaCurrency,
a.vmsl AS DistrdTotalMaterialQuantity,
a.rvunit AS DistrdTotalMaterialQtyUnit,
a.ebeln AS PurchasingDocument,
a.ebelp AS PurchasingDocumentItem,
a.matnr AS Material,
a.werks AS Plant,
a.objnr AS ControllingObject,
a.hrkft AS ControllingKeySubNumber,
a.parob1 AS PartnerControllingObject,
a.pbukrs AS PartnerCompanyCode,
a.uspob AS OriginSenderObject,
a.ulstar AS OriginCostCtrActivityType,
cast(a.co_beknz as co_belkz preserving type) AS ControllingDebitCreditCode,
a.accasty AS ControllingObjectType,
a.co_belnr AS ControllingDocument,
a.co_buzei AS ControllingDocumentItem,
cast ( a.ps_psp_pnr as ps_s4_pspnr preserving type ) AS WBSElementInternalID,
a.budat AS DistributionPostingDate,
a.ktopl AS ChartOfAccounts,
a.timestamp AS LastChangeDateTime
FROM acdoca AS a
INNER JOIN finsc_cmp_versnc AS v ON /* join condition not captured in parsed metadata */
INNER JOIN tka01 AS t ON /* join condition not captured in parsed metadata */
;
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