I_DistrActualCost
Distributed actual cost
I_DistrActualCost is a Composite CDS View that provides data about "Distributed actual cost" in SAP S/4HANA. It reads from 1 data source (I_DistrAccountingData) and exposes 32 fields with key fields ControllingObject, PartnerControllingObject, CostElement, ControllingKeySubNumber, ControllingBusTransacType. It has 10 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DistrAccountingData | I_DistrAccountingData | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Material | _Material | $projection.Material = _Material.Material |
| [0..1] | I_Plant | _Plant | $projection.Plant = _Plant.Plant |
| [0..1] | I_Currency | _TransCurrency | $projection.TransactionCurrency = _TransCurrency.Currency |
| [0..1] | I_Currency | _ControllingObjectCurrency | $projection.ControllingObjectCurrency = _ControllingObjectCurrency.Currency |
| [0..1] | I_Currency | _ControllingAreaCurrency | $projection.ControllingAreaCurrency = _ControllingAreaCurrency.Currency |
| [0..1] | I_UnitOfMeasure | _DistrdTotMatlQtyUnit | $projection.DistrdTotalMaterialQtyUnit = _DistrdTotMatlQtyUnit.UnitOfMeasure |
| [0..1] | I_ProductCostCtrlgOrderItem | _OrderItem | $projection.OrderID = _OrderItem.OrderID and _OrderItem.OrderItem = '0001' |
| [0..1] | I_CostElement | _CostElement | $projection.ControllingArea = _CostElement.ControllingArea and $projection.CostElement = _CostElement.CostElement |
| [0..1] | I_PurchasingDocumentItem | _POItem | $projection.PurchasingDocument = _POItem.PurchasingDocument and $projection.PurchasingDocumentItem = _POItem.PurchasingDocumentItem |
| [0..1] | I_ControllingArea | _ControllingArea | $projection.ControllingArea = _ControllingArea.ControllingArea |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Distributed actual cost | 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 (32)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ControllingObject | ControllingObject | Object number | |
| KEY | PartnerControllingObject | PartnerControllingObject | Partner Object | |
| KEY | CostElement | CostElement | G/L Account | |
| KEY | ControllingKeySubNumber | ControllingKeySubNumber | Origin group order | |
| KEY | ControllingBusTransacType | ControllingBusTransacType | CO Bus. Transaction | |
| KEY | PurchasingDocument | PurchasingDocument | Purchasing Document | |
| KEY | PurchasingDocumentItem | PurchasingDocumentItem | Purchasing Doc. Item | |
| KEY | OriginSenderObject | OriginSenderObject | Source Object | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | Material | Material | Vehicle Model | |
| ControllingArea | ControllingArea | Controlling Area | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| OrderID | OrderID | Order ID | ||
| AmountInTransactionCurrency | Pt Crcy Amt | |||
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| AmountInCtrlgObjectCurrency | ||||
| ControllingObjectCurrency | ControllingObjectCurrency | CO Object Currency | ||
| AmountInCtrlgAreaCrcy | ||||
| ControllingAreaCurrency | ControllingAreaCurrency | Transaction Currency | ||
| DistrdTotalMaterialQuantity | ||||
| DistributionPostingDate | ||||
| LastChangeDateTime | ||||
| _Material | _Material | |||
| _Plant | _Plant | |||
| _TransCurrency | _TransCurrency | |||
| _ControllingObjectCurrency | _ControllingObjectCurrency | |||
| _ControllingAreaCurrency | _ControllingAreaCurrency | |||
| _DistrdTotMatlQtyUnit | _DistrdTotMatlQtyUnit | |||
| _OrderItem | _OrderItem | |||
| _CostElement | _CostElement | |||
| _POItem | _POItem | |||
| _ControllingArea | _ControllingArea |
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_DistrActualCost.
-- 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_DistrActualCost AS
SELECT
ControllingObject,
PartnerControllingObject,
CostElement,
ControllingKeySubNumber,
ControllingBusTransacType,
PurchasingDocument,
PurchasingDocumentItem,
OriginSenderObject,
Plant,
Material,
ControllingArea,
CompanyCode,
OrderID,
sum( cast(AmountInTransactionCurrency as abap.dec( 23, 2 )) * -1 ) AS AmountInTransactionCurrency,
TransactionCurrency,
sum( cast(AmountInCtrlgObjectCurrency as abap.dec( 23, 2 )) * -1 ) AS AmountInCtrlgObjectCurrency,
ControllingObjectCurrency,
sum( cast(AmountInCtrlgAreaCrcy as abap.dec( 23, 2 )) * -1 ) AS AmountInCtrlgAreaCrcy,
ControllingAreaCurrency,
sum( DistrdTotalMaterialQuantity * -1 ) AS DistrdTotalMaterialQuantity,
max(DistributionPostingDate) AS DistributionPostingDate,
cast(max(I_DistrAccountingData.LastChangeDateTime) as timestampl) AS LastChangeDateTime
FROM I_DistrAccountingData
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant -- association [0..1]
LEFT OUTER JOIN I_Currency AS _TransCurrency ON TransactionCurrency = _TransCurrency.Currency -- association [0..1]
LEFT OUTER JOIN I_Currency AS _ControllingObjectCurrency ON ControllingObjectCurrency = _ControllingObjectCurrency.Currency -- association [0..1]
LEFT OUTER JOIN I_Currency AS _ControllingAreaCurrency ON ControllingAreaCurrency = _ControllingAreaCurrency.Currency -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _DistrdTotMatlQtyUnit ON DistrdTotalMaterialQtyUnit = _DistrdTotMatlQtyUnit.UnitOfMeasure -- association [0..1]
LEFT OUTER JOIN I_ProductCostCtrlgOrderItem AS _OrderItem ON OrderID = _OrderItem.OrderID AND _OrderItem.OrderItem = '0001' -- association [0..1]
LEFT OUTER JOIN I_CostElement AS _CostElement ON ControllingArea = _CostElement.ControllingArea AND CostElement = _CostElement.CostElement -- association [0..1]
LEFT OUTER JOIN I_PurchasingDocumentItem AS _POItem ON PurchasingDocument = _POItem.PurchasingDocument AND PurchasingDocumentItem = _POItem.PurchasingDocumentItem -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea -- 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