P_RealTmeWrkInProcRltvHistory1

DDL: P_REALTMEWRKINPROCRLTVHISTORY1 SQL: PRTWIPHISTRLTV1 Type: view COMPOSITE

P_RealTmeWrkInProcRltvHistory1 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 24 fields with key fields OrderID, CompanyCode.

Data Sources (4)

SourceAliasJoin 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)

NameTypeDefault
P_KeyDate fins_fperiod_enddate
P_Ledger fins_ledger
P_CurrencyRole fac_crcyrole

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PRTWIPHISTRLTV1 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
Metadata.ignorePropagatedAnnotations true view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY OrderID I_ProductCostCtrlgOrder OrderID Order ID
KEY CompanyCode I_ProductCostCtrlgOrder CompanyCode Receiver Company Code
OrderDescription OrderDescription
OrderType OrderType Order Type
OrderCategory OrderCategory Order Category
Material Material Vehicle Model
Plant I_ProductCostCtrlgOrder Plant Valuation Area
ProfitCenter ProfitCenter Profit Center
ControllingArea ControllingArea Controlling Area
FunctionalArea 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
curr232else0endasPlanCostAmountInDspCrcy
ProducedAmountInDspCrcy
RatioUnit
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
LastChangedByUser LastChangedByUser User Name
LastChangeDate LastChangeDate Time Stamp
OrderIsRefurbishmentOrder I_ProductCostCtrlgOrder OrderIsRefurbishmentOrder Refurbishment

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_RealTmeWrkInProcRltvHistory1.
-- 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: PRTWIPHISTRLTV1
-- Parameters: P_KeyDate : fins_fperiod_enddate, P_Ledger : fins_ledger, P_CurrencyRole : fac_crcyrole

CREATE VIEW P_RealTmeWrkInProcRltvHistory1 AS
SELECT
  _OrderHeader.OrderID AS OrderID,
  _OrderHeader.CompanyCode AS CompanyCode,
  OrderDescription,
  OrderType,
  OrderCategory,
  Material,
  _OrderHeader.Plant AS Plant,
  ProfitCenter,
  ControllingArea,
  FunctionalArea,
  _RepresentativeOrderItem.StorageLocation AS StorageLocation,
  _RepresentativeOrderItem.MRPArea AS MRPArea,
  _RepresentativeOrderItem.MRPPlant AS MRPPlant,
  MfgOrderHasMultipleItems,
  _LdgrCompCodeCrcy.Currency AS DisplayCurrency,
  WIPCostInDspCrcy,
  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,
  coalesce( ProducedAmountInDspCrcy, 0 ) AS ProducedAmountInDspCrcy,
  cast('%' as msehi) AS RatioUnit,
  CreatedByUser,
  CreationDate,
  LastChangedByUser,
  LastChangeDate,
  _OrderHeader.OrderIsRefurbishmentOrder AS OrderIsRefurbishmentOrder
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 */
;