P_EBPC_TargetCost_F5
Event-Based Order Target Cost
P_EBPC_TargetCost_F5 is a Composite CDS View that provides data about "Event-Based Order Target Cost" in SAP S/4HANA. It reads from 6 data sources and exposes 12 fields with key fields OrderID, OrderItem, ObjectInternalID, OrderItem, ObjectInternalID. Part of development package ODATA_CO_RT_PRODUCTION_COSTS.
Data Sources (6)
| Source | Alias | Join Type |
|---|---|---|
| P_EBOrderActualOutputQty | P_EBOrderActualOutputQty | inner |
| P_EBOrderHdrAndItemValStrategy | P_EBOrderHdrAndItemValStrategy | from |
| P_EBOrderHdrAndItemValStrategy | P_EBOrderHdrAndItemValStrategy | union_all |
| P_EBPC_CostEstimate_F5_2 | P_EBPC_CostEstimate_F5_2 | inner |
| P_EBPC_CostEstimate_F5_2 | P_EBPC_CostEstimate_F5_2 | inner |
| P_EBPC_MfgOutputQuantity | P_EBPC_MfgOutputQuantity | inner |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_Ledger | fins_ledger | |
| P_FromFiscalYearPeriod | fis_jahrper | |
| P_ToFiscalYearPeriod | fis_jahrper | |
| P_CurrencyRole | fac_crcyrole |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OrderID | _TargetCostStrategy | OrderID | Order ID |
| KEY | OrderItem | _TargetCostStrategy | OrderItem | |
| KEY | ObjectInternalID | _TargetCostStrategy | ObjectInternalID | Object number |
| ValuationStrategy | _TargetCostStrategy | ValuationStrategy | ||
| CompanyCode | _TargetCostStrategy | CompanyCode | Receiver Company Code | |
| P_Ledger | ||||
| P_FromFiscalYearPeriod | ||||
| OrderID | Order ID | |||
| KEY | OrderItem | _TargetCostStrategy | OrderItem | |
| KEY | ObjectInternalID | _TargetCostStrategy | ObjectInternalID | Object number |
| ValuationStrategy | _TargetCostStrategy | ValuationStrategy | ||
| CompanyCode | _TargetCostStrategy | CompanyCode | Receiver Company Code |
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_EBPC_TargetCost_F5.
-- 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.
-- Parameters: P_Ledger : fins_ledger, P_FromFiscalYearPeriod : fis_jahrper, P_ToFiscalYearPeriod : fis_jahrper, P_CurrencyRole : fac_crcyrole
CREATE VIEW P_EBPC_TargetCost_F5 AS
SELECT
_TargetCostStrategy.OrderID AS OrderID,
_TargetCostStrategy.OrderItem AS OrderItem,
_TargetCostStrategy.ObjectInternalID AS ObjectInternalID,
_TargetCostStrategy.ValuationStrategy AS ValuationStrategy,
_TargetCostStrategy.CompanyCode AS CompanyCode,
sum( case when _CostEstimate.ControllingDebitCreditCode = 'H' or _CostEstimate.ControllingDebitCreditCode = 'S' then case when _CostEstimate.IsLotSizeIndependent = 'X' then _CostEstimate.AmountInDisplayCurrency else case when _CostEstimate.CostingLotSize <> 0 then cast( round(cast(division(cast(_ActualQuantity.ActualOutputQuantity as abap.dec(15, 3)), cast(_CostEstimate.CostingLotSize as abap.dec(15, 3)), 6) as abap.dec(14, 6)) * _CostEstimate.AmountInDisplayCurrency * -1, 2) as abap.dec( 23, 2 ) ) else 0 end end else 0 end ) as DebitTargetCostInDspCrcy AS P_Ledger,
P_CurrencyRole : $parameters.P_CurrencyRole) as _TargetCostStrategy inner join P_EBPC_MfgOutputQuantity( P_FromFiscalYearPeriod : $parameters.P_FromFiscalYearPeriod AS P_FromFiscalYearPeriod
FROM P_EBOrderHdrAndItemValStrategy
INNER JOIN P_EBOrderActualOutputQty ON /* join condition not captured in parsed metadata */
INNER JOIN P_EBPC_CostEstimate_F5_2 ON /* join condition not captured in parsed metadata */
INNER JOIN P_EBPC_MfgOutputQuantity ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_EBOrderHdrAndItemValStrategy
;
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