P_EBWIP_OrderCost2
P_EBWIP_OrderCost2 is a Composite CDS View in SAP S/4HANA. It reads from 4 data sources (I_LedgerCompanyCodeCrcyRolesVH, I_ProductCostCtrlgOrder, P_EBWIP_OrderCost1, P_EBWIP_WIP3) and exposes 27 fields with key fields CompanyCode, OrderID.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_LedgerCompanyCodeCrcyRolesVH | _LdgrCompCodeCrcy | inner |
| I_ProductCostCtrlgOrder | _OrderHeader | inner |
| P_EBWIP_OrderCost1 | P_EBWIP_OrderCost1 | from |
| P_EBWIP_WIP3 | P_EBWIP_WIP3 | inner |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | fins_fperiod_enddate | |
| P_Ledger | fins_ledger | |
| P_CurrencyRole | fac_crcyrole |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PEBWIPORDCST2 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (27)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | _OrderCost | CompanyCode | Receiver Company Code |
| KEY | OrderID | _OrderCost | OrderID | Order ID |
| ObjectInternalID | I_ProductCostCtrlgOrder | ObjectInternalID | Object number | |
| OrderDescription | OrderDescription | |||
| OrderType | OrderType | Order Type | ||
| OrderCategory | OrderCategory | Order Category | ||
| Material | _OrderCost | Material | Vehicle Model | |
| Plant | I_ProductCostCtrlgOrder | Plant | Valuation Area | |
| ProfitCenter | ProfitCenter | Profit Center | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| FunctionalArea | I_ProductCostCtrlgOrder | FunctionalArea | Sendr Fctl Area | |
| StorageLocation | _RepresentativeOrderItem | StorageLocation | StorageLocation | |
| MRPArea | _RepresentativeOrderItem | MRPArea | MRP Area | |
| MRPPlant | _RepresentativeOrderItem | MRPPlant | Plant | |
| MfgOrderHasMultipleItems | MfgOrderHasMultipleItems | |||
| DisplayCurrency | I_LedgerCompanyCodeCrcyRolesVH | Currency | Valuation Crcy | |
| WIPCostInDspCrcy | WIPCostInDspCrcy | |||
| ReservesUnrealizedCostsAmount | ReservesUnrealizedCostsAmount | |||
| ProducedAmountInDspCrcy | ||||
| CompletedQuantityToDate | ||||
| ActualOutputQuantity | ||||
| curr232else0endasPlanCostAmountInDspCrcy | ||||
| UnitOfMeasure | _RepresentativeOrderItem | BaseUnit | Unit of Measure | |
| CreatedByUser | I_ProductCostCtrlgOrder | CreatedByUser | User Name | |
| CreationDate | I_ProductCostCtrlgOrder | CreationDate | Time Stamp | |
| LastChangedByUser | I_ProductCostCtrlgOrder | LastChangedByUser | User Name | |
| LastChangeDate | I_ProductCostCtrlgOrder | LastChangeDate | Time Stamp |
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_EBWIP_OrderCost2.
-- 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: PEBWIPORDCST2
-- Parameters: P_KeyDate : fins_fperiod_enddate, P_Ledger : fins_ledger, P_CurrencyRole : fac_crcyrole
CREATE VIEW P_EBWIP_OrderCost2 AS
SELECT
_OrderCost.CompanyCode AS CompanyCode,
_OrderCost.OrderID AS OrderID,
_OrderHeader.ObjectInternalID AS ObjectInternalID,
OrderDescription,
OrderType,
OrderCategory,
_OrderCost.Material AS Material,
_OrderHeader.Plant AS Plant,
ProfitCenter,
ControllingArea,
_OrderHeader.FunctionalArea AS FunctionalArea,
_RepresentativeOrderItem.StorageLocation AS StorageLocation,
_RepresentativeOrderItem.MRPArea AS MRPArea,
_RepresentativeOrderItem.MRPPlant AS MRPPlant,
MfgOrderHasMultipleItems,
_LdgrCompCodeCrcy.Currency AS DisplayCurrency,
WIPCostInDspCrcy,
ReservesUnrealizedCostsAmount,
coalesce(ProducedAmountInDspCrcy, 0) AS ProducedAmountInDspCrcy,
coalesce(CompletedQuantityToDate, 0) AS CompletedQuantityToDate,
coalesce(ActualOutputQuantity, 0) AS ActualOutputQuantity,
case when CostingLotSize <> 0 and OrderCategory <> '05' then cast( _mce_wip.LotSizeIndependentCosts + ( round(cast(division((_RepresentativeOrderItem.ItemQuantity - _RepresentativeOrderItem.MfgOrderItemPlannedScrapQty), CostingLotSize, 6) as abap.dec(14, 6)) * _mce_wip.PlanCostInDspCrcy, 2) ) as abap.curr( 23, 2 ) ) else 0 end as PlanCostAmountInDspCrcy AS curr232else0endasPlanCostAmountInDspCrcy,
_RepresentativeOrderItem.BaseUnit AS UnitOfMeasure,
_OrderHeader.CreatedByUser AS CreatedByUser,
_OrderHeader.CreationDate AS CreationDate,
_OrderHeader.LastChangedByUser AS LastChangedByUser,
_OrderHeader.LastChangeDate AS LastChangeDate
FROM P_EBWIP_OrderCost1
INNER JOIN I_ProductCostCtrlgOrder AS _OrderHeader ON /* join condition not captured in parsed metadata */
INNER JOIN P_EBWIP_WIP3 ON /* join condition not captured in parsed metadata */
INNER JOIN I_LedgerCompanyCodeCrcyRolesVH AS _LdgrCompCodeCrcy 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