P_EBOrderHdrItmProdnCost2v2

DDL: P_EBORDERHDRITMPRODNCOST2V2 SQL: PEBORDHAIPC2V2 Type: view COMPOSITE Package: ODATA_CO_RT_PRODUCTION_COSTS

Event-Based Order Header and Item Production Cost 2 v2

P_EBOrderHdrItmProdnCost2v2 is a Composite CDS View that provides data about "Event-Based Order Header and Item Production Cost 2 v2" in SAP S/4HANA. It reads from 1 data source (P_EBOrderHdrItmProdnCost1v2) and exposes 86 fields with key fields OrderID, OrderItem. Part of development package ODATA_CO_RT_PRODUCTION_COSTS.

Data Sources (1)

SourceAliasJoin Type
P_EBOrderHdrItmProdnCost1v2 P_EBOrderHdrItmProdnCost1v2 from

Parameters (4)

NameTypeDefault
P_Ledger fins_ledger
P_FromFiscalYearPeriod fins_fyearperiod
P_ToFiscalYearPeriod fins_fyearperiod
P_CurrencyRole fis_curtp

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PEBORDHAIPC2V2 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (86)

KeyFieldSource TableSource FieldDescription
KEY OrderID OrderID Order ID
KEY OrderItem OrderItem
OrderInternalID OrderInternalID Plan No.f.Oper.
ObjectInternalID ObjectInternalID Object number
OrderType OrderType Order Type
OrderCategory OrderCategory Order Category
ExternalOrder ExternalOrder Ext. order no.
OrderDescription OrderDescription
Plant Plant Valuation Area
CompanyCode CompanyCode Receiver Company Code
BaseUnit BaseUnit Unit of Measure
RatioUnit RatioUnit Unit of Measure
Ledger Ledger Ledger
ControllingArea ControllingArea Controlling Area
BusinessArea BusinessArea Business Area
ProfitCenter ProfitCenter Profit Center
ResponsibleCostCenter ResponsibleCostCenter Responsible Cost Center
WBSElementInternalID WBSElementInternalID WBS Internal ID
ProductionVersion ProductionVersion Version ID
ValuationType ValuationType Valuation Type
SalesOrder SalesOrder SD Document
SalesOrderItem SalesOrderItem Sales Order Item
Material Material Vehicle Model
MRPPlant MRPPlant Plant
StorageLocation StorageLocation StorageLocation
ProductionUnit ProductionUnit
IsMarkedForDeletion IsMarkedForDeletion Purch.org. data
MfgOrderHasMultipleItems MfgOrderHasMultipleItems
CombnOrdCombinationIdentifier CombnOrdCombinationIdentifier
CombinedOrder CombinedOrder
SuperiorOrder SuperiorOrder
MfgOrderIsPartOfCollvOrder MfgOrderIsPartOfCollvOrder
ActualCostsCostingVariant ActualCostsCostingVariant Act. Costing Variant
PlannedCostsCostingVariant PlannedCostsCostingVariant Plnd Costing Variant
PlannedReleaseDate PlannedReleaseDate
PlannedCompletionDate PlannedCompletionDate
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
LastChangedByUser LastChangedByUser User Name
LastChangeDate LastChangeDate Time Stamp
TechnicalCompletionDate TechnicalCompletionDate
ScheduledBasicEndDate ScheduledBasicEndDate Sched. finish
ScheduledReleaseDate ScheduledReleaseDate
ActualStartDate ActualStartDate Actual Start
ConfirmedEndDate ConfirmedEndDate
ActualDeliveryDate ActualDeliveryDate Delivery Date
ActualReleasedDate ActualReleasedDate
ControllingObjectStatus ControllingObjectStatus Status
OrderKeyStatus OrderKeyStatus
DisplayCurrency DisplayCurrency Display Currency
ValidityDate
CreditActlCostInDspCrcy
DebitActlCostInDspCrcy
ActlCostInDspCrcy
CrdtActlFxdCostInDspCrcy
DebitActlFxdCostInDspCrcy
ActlFixedCostInDspCrcy
DebitActlVarblCostInDspCrcy
CrdtActlVarblCostIndDspCrcy
CreditPlanCostInDspCrcy
DebitPlanCostInDspCrcy
CrdtPlnFxdCostInDspCrcy
DebitPlnFxdCostInDspCrcy
DebitPlnVarblCostInDspCrcy
CrdtPlnVarblCostInDspCrcy
PlanCostInDspCrcy
PlanFixedCostInDspCrcy
CrdtTargetCostInDspCrcy
DebitTargetCostInDspCrcy
TargetCostInDspCrcy
ActlCtrlCostInDspCrcy
WIPCostInDspCrcy
UnrlzdCostRsrvAmtInDspCrcy
TotalWIPAmountInDspCrcy
CostVarianceInDspCrcy
InptPrVarcAmtInDspCrcy InptPrVarcAmtInDspCrcy
InptQtyVarcAmtInDspCrcy InptQtyVarcAmtInDspCrcy
RsceUsgeVarcAmtInDspCrcy RsceUsgeVarcAmtInDspCrcy
OutpPrVarcAmtInDspCrcy OutpPrVarcAmtInDspCrcy
LotSizeVarcAmtInDspCrcy LotSizeVarcAmtInDspCrcy
RmngVarcAmtInDspCrcy RmngVarcAmtInDspCrcy
DebitActlPlnDiffCostInDspCrcy
DebitActlTgtDiffCostInDspCrcy
PlanOutputQuantity
ActualOutputQuantity
ActlPlanDiffOutputQuantity

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_EBOrderHdrItmProdnCost2v2.
-- 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: PEBORDHAIPC2V2
-- Parameters: P_Ledger : fins_ledger, P_FromFiscalYearPeriod : fins_fyearperiod, P_ToFiscalYearPeriod : fins_fyearperiod, P_CurrencyRole : fis_curtp

CREATE VIEW P_EBOrderHdrItmProdnCost2v2 AS
SELECT
  OrderID,
  OrderItem,
  OrderInternalID,
  ObjectInternalID,
  OrderType,
  OrderCategory,
  ExternalOrder,
  OrderDescription,
  Plant,
  CompanyCode,
  BaseUnit,
  RatioUnit,
  Ledger,
  ControllingArea,
  BusinessArea,
  ProfitCenter,
  ResponsibleCostCenter,
  WBSElementInternalID,
  ProductionVersion,
  ValuationType,
  SalesOrder,
  SalesOrderItem,
  Material,
  MRPPlant,
  StorageLocation,
  ProductionUnit,
  IsMarkedForDeletion,
  MfgOrderHasMultipleItems,
  CombnOrdCombinationIdentifier,
  CombinedOrder,
  SuperiorOrder,
  MfgOrderIsPartOfCollvOrder,
  ActualCostsCostingVariant,
  PlannedCostsCostingVariant,
  PlannedReleaseDate,
  PlannedCompletionDate,
  CreatedByUser,
  CreationDate,
  LastChangedByUser,
  LastChangeDate,
  TechnicalCompletionDate,
  ScheduledBasicEndDate,
  ScheduledReleaseDate,
  ActualStartDate,
  ConfirmedEndDate,
  ActualDeliveryDate,
  ActualReleasedDate,
  ControllingObjectStatus,
  OrderKeyStatus,
  DisplayCurrency,
  cast(substring( cast(tstmp_current_utctimestamp() as abap.char( 17 ) ), 1, 8 ) as abap.dats ) AS ValidityDate,
  cast(CreditActlCostInDspCrcy as fis_cr_actlcost_in_dspcrcy) AS CreditActlCostInDspCrcy,
  cast(DebitActlCostInDspCrcy as fis_dr_actlcost_in_dspcrcy) AS DebitActlCostInDspCrcy,
  cast(CreditActlCostInDspCrcy + DebitActlCostInDspCrcy as fis_actlcost_in_dspcrcy ) AS ActlCostInDspCrcy,
  cast(CrdtActlFxdCostInDspCrcy as fis_cr_actlfxdcost_in_dspcrcy) AS CrdtActlFxdCostInDspCrcy,
  cast(DebitActlFixedCostInDspCrcy as fis_dr_actlfxdcost_in_dspcrcy) AS DebitActlFxdCostInDspCrcy,
  cast(CrdtActlFxdCostInDspCrcy + DebitActlFixedCostInDspCrcy as fis_actlfixedcost_in_dspcrcy) AS ActlFixedCostInDspCrcy,
  cast(DebitActlCostInDspCrcy - DebitActlFixedCostInDspCrcy as fis_dr_actlvarblcost_indspcrcy) AS DebitActlVarblCostInDspCrcy,
  cast(CreditActlCostInDspCrcy - CrdtActlFxdCostInDspCrcy as fis_cr_actlvarblcost_indspcrcy) AS CrdtActlVarblCostIndDspCrcy,
  cast(CreditPlanCostInDspCrcy as fis_cr_plancost_in_dspcrcy) AS CreditPlanCostInDspCrcy,
  cast(DebitPlanCostInDspCrcy as fis_dr_plancost_in_dspcrcy) AS DebitPlanCostInDspCrcy,
  cast(CreditPlanFxdCostInDspCrcy as fis_cr_plnfxdcost_in_dspcrcy) AS CrdtPlnFxdCostInDspCrcy,
  cast(DebitPlanFxdCostInDspCrcy as fis_dr_plnfxdcost_in_dspcrcy) AS DebitPlnFxdCostInDspCrcy,
  cast(DebitPlanCostInDspCrcy - DebitPlanFxdCostInDspCrcy as fis_dr_plnvarblcost_in_dspcrcy) AS DebitPlnVarblCostInDspCrcy,
  cast(CreditPlanCostInDspCrcy - CreditPlanFxdCostInDspCrcy as fis_cr_plnvarblcost_in_dspcrcy) AS CrdtPlnVarblCostInDspCrcy,
  cast(DebitPlanCostInDspCrcy + CreditPlanCostInDspCrcy as fis_plancost_in_dspcrcy) AS PlanCostInDspCrcy,
  cast(DebitPlanFxdCostInDspCrcy + CreditPlanFxdCostInDspCrcy as fis_planfixedcost_in_dspcrcy) AS PlanFixedCostInDspCrcy,
  cast(CrdtTargetCostInDspCrcy as fis_cr_tgtcost_in_dspcrcy) AS CrdtTargetCostInDspCrcy,
  cast(DebitTargetCostInDspCrcy as fis_dr_tgtcost_in_dspcrcy) AS DebitTargetCostInDspCrcy,
  cast((CrdtTargetCostInDspCrcy + DebitTargetCostInDspCrcy) as fis_tgtcost_in_dspcrcy) AS TargetCostInDspCrcy,
  cast((CreditActlCostInDspCrcy + DebitActlCostInDspCrcy) as fis_actlctrlcost_in_dspcrcy) AS ActlCtrlCostInDspCrcy,
  cast(WIPCostInDspCrcy as fis_wipcost_in_dspcrcy) AS WIPCostInDspCrcy,
  cast(UnrlzdCostRsrvAmtInDspCrcy as fis_abgruekfk) AS UnrlzdCostRsrvAmtInDspCrcy,
  cast((WIPCostInDspCrcy + UnrlzdCostRsrvAmtInDspCrcy) as fco_eb_totalwipamt_in_dspcrcy) AS TotalWIPAmountInDspCrcy,
  cast(CostVarianceInDspCrcy as fco_eb_totalvarcamt_in_dspcrcy) AS CostVarianceInDspCrcy,
  InptPrVarcAmtInDspCrcy,
  InptQtyVarcAmtInDspCrcy,
  RsceUsgeVarcAmtInDspCrcy,
  OutpPrVarcAmtInDspCrcy,
  LotSizeVarcAmtInDspCrcy,
  RmngVarcAmtInDspCrcy,
  cast((DebitActlCostInDspCrcy - DebitPlanCostInDspCrcy) as fis_dractlplndiffcostindspcrcy) AS DebitActlPlnDiffCostInDspCrcy,
  cast((DebitActlCostInDspCrcy - DebitTargetCostInDspCrcy) as fis_dractltgtdiffcostindspcrcy) AS DebitActlTgtDiffCostInDspCrcy,
  cast(PlanOutputQuantity as fis_plan_output_quantity) AS PlanOutputQuantity,
  cast(ActualOutputQuantity as fis_actual_output_quantity) AS ActualOutputQuantity,
  cast((ActualOutputQuantity - PlanOutputQuantity) as fis_actlplandiffoutputquantity) AS ActlPlanDiffOutputQuantity
FROM P_EBOrderHdrItmProdnCost1v2
;