C_OrdHdrItmRealTimeProdnCost

DDL: C_ORDHDRITMREALTIMEPRODNCOST SQL: CEBORDHIRTPRCST Type: view CONSUMPTION Package: ODATA_CO_RT_PRODUCTION_COSTS

Event-Based Order Header and Item Production Costs

C_OrdHdrItmRealTimeProdnCost is a Consumption CDS View that provides data about "Event-Based Order Header and Item Production Costs" in SAP S/4HANA. It reads from 1 data source (I_OrdHdrItmRealTimeProdnCost) and exposes 133 fields with key fields OrderID, OrderItem. It has 8 associations to related views. It is exposed through 1 OData service (ASQL_F4059). Part of development package ODATA_CO_RT_PRODUCTION_COSTS.

Data Sources (1)

SourceAliasJoin Type
I_OrdHdrItmRealTimeProdnCost I_OrdHdrItmRealTimeProdnCost from

Parameters (5)

NameTypeDefault
P_FromFiscalYearPeriod fins_fyearperiod
P_ToFiscalYearPeriod fins_fyearperiod
P_Ledger fins_ledger
P_PlanningCategory fcom_category
P_CurrencyRole fac_crcyrole

Associations (8)

CardinalityTargetAliasCondition
[0..1] I_UserContactCard _CreatedByUserContactCard $projection.CreatedByUser = _CreatedByUserContactCard.ContactCardID
[0..1] I_UserContactCard _LastChangedByUserContactCard $projection.LastChangedByUser = _LastChangedByUserContactCard.ContactCardID
[0..*] I_SystemStatusText _SystemStatusText $projection.OrderKeyStatus = _SystemStatusText.SystemStatus
[0..*] C_RealTimeOrderGroupStatusVH _OrderGroupStatus $projection.ControllingObjectStatus = _OrderGroupStatus.ControllingObjectStatus
[0..*] C_RealTmeOrdJointProductionT _JointProductionText $projection.MfgOrderHasMultipleItems = _JointProductionText.MfgOrderHasMultipleItems
[0..1] I_ProductionVersionBasic _ProductionVersion $projection.Material = _ProductionVersion.Product and $projection.Plant = _ProductionVersion.Plant and $projection.ProductionVersion = _ProductionVersion.ProductionVersion
[0..1] I_WBSElementBasicData _WBSElement _WBSElement.WBSElementInternalID = $projection.WBSElementInternalID
[0..1] I_OrdCombnCombinationIDText _CombnOrdCombinationIDText $projection.CombnOrdCombinationIdentifier = _CombnOrdCombinationIDText.CombnOrdCombinationIdentifier and Language = $session.system_language

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CEBORDHIRTPRCST view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ClientHandling.algorithm #SESSION_VARIABLE view
ClientHandling.type #CLIENT_DEPENDENT view
Metadata.allowExtensions true view
EndUserText.label Event-Based Order Header and Item Production Costs view
Metadata.ignorePropagatedAnnotations true view

OData Services (1)

ServiceBindingVersionContractRelease
ASQL_F4059 ASQL_F4059 C2 NOT_RELEASED

Fields (133)

KeyFieldSource TableSource FieldDescription
KEY OrderID Order ID
KEY OrderItem
OrderInternalID OrderInternalID Plan No.f.Oper.
ObjectInternalID ObjectInternalID Object number
InternalOrderText
OrderType OrderType Order Type
OrderCategory OrderCategory Order Category
IsMarkedForDeletion IsMarkedForDeletion Purch.org. data
ExternalOrder ExternalOrder Ext. order no.
OrderDescription OrderDescription
Plant Plant Valuation Area
CompanyCode CompanyCode Receiver Company Code
BaseUnit BaseUnit Unit of Measure
RatioUnit Unit of Measure
FromFiscalYearPeriod
ToFiscalYearPeriod
PlanningCategory
Ledger Ledger
ControllingArea ControllingArea Controlling Area
BusinessArea BusinessArea Business Area
ProfitCenter ProfitCenter Profit Center
ResponsibleCostCenter ResponsibleCostCenter Responsible Cost Center
WBSElementInternalID WBSElementInternalID WBS Internal ID
WBSElementExternalID
WBSDescription _WBSElement WBSDescription WBS Element Name
ProjectExternalID
ProjectDescription
SalesOrder SalesOrder SD Document
SalesOrderItem SalesOrderItem Sales Order Item
MfgOrderHasMultipleItems MfgOrderHasMultipleItems
ActualCostsCostingVariant ActualCostsCostingVariant Act. Costing Variant
PlannedCostsCostingVariant PlannedCostsCostingVariant Plnd Costing Variant
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
LastChangedByUser LastChangedByUser User Name
LastChangeDate LastChangeDate Time Stamp
TechnicalCompletionDate TechnicalCompletionDate
CombnOrdCombinationIdentifier CombnOrdCombinationIdentifier
CombnOrdCombinationIDText _CombnOrdCombinationIDText CombnOrdCombinationIDText
CombinedOrder
SuperiorOrder SuperiorOrder
MfgOrderIsPartOfCollvOrder MfgOrderIsPartOfCollvOrder
Material Vehicle Model
MaterialGroupName
MaterialGroup MaterialGroup Product Group
ProductHierarchy ProductHierarchy Prod.hierarchy
ProductHierarchyText
MRPPlant Plant
StorageLocation StorageLocation
ProductionVersion ProductionVersion Version ID
ValuationType ValuationType Valuation Type
ScheduledBasicEndDate ScheduledBasicEndDate Sched. finish
ScheduledReleaseDate ScheduledReleaseDate
ActualStartDate ActualStartDate Actual Start
ConfirmedEndDate ConfirmedEndDate
ActualDeliveryDate ActualDeliveryDate Delivery Date
ActualReleasedDate ActualReleasedDate
ControllingObjectStatus ControllingObjectStatus Status
OrderStatusShortText
OrderKeyStatus OrderKeyStatus
SystemStatusName
DisplayCurrency DisplayCurrency Display Currency
CreditActlCostInDspCrcy CreditActlCostInDspCrcy
DebitActlCostInDspCrcy DebitActlCostInDspCrcy
ActlCostInDspCrcy ActlCostInDspCrcy
DebitActlVarblCostInDspCrcy DebitActlVarblCostInDspCrcy
CrdtActlVarblCostIndDspCrcy CrdtActlVarblCostIndDspCrcy
ActlVarblCostInDspCrcy ActlVarblCostInDspCrcy
CrdtActlFxdCostInDspCrcy CrdtActlFxdCostInDspCrcy
DebitActlFxdCostInDspCrcy DebitActlFxdCostInDspCrcy
ActlFixedCostInDspCrcy ActlFixedCostInDspCrcy
CreditPlanCostInDspCrcy CreditPlanCostInDspCrcy
DebitPlanCostInDspCrcy DebitPlanCostInDspCrcy
CrdtPlnFxdCostInDspCrcy CrdtPlnFxdCostInDspCrcy
DebitPlnFxdCostInDspCrcy DebitPlnFxdCostInDspCrcy
CrdtPlnVarblCostInDspCrcy CrdtPlnVarblCostInDspCrcy
DebitPlnVarblCostInDspCrcy DebitPlnVarblCostInDspCrcy
PlanCostInDspCrcy PlanCostInDspCrcy
PlanFixedCostInDspCrcy PlanFixedCostInDspCrcy
PlanVarblCostInDspCrcy PlanVarblCostInDspCrcy
CrdtTargetCostInDspCrcy CrdtTargetCostInDspCrcy
DebitTargetCostInDspCrcy DebitTargetCostInDspCrcy
TargetCostInDspCrcy TargetCostInDspCrcy
CrdtPlanCtrlCostInDspCrcy CrdtPlanCtrlCostInDspCrcy
DebitPlanCtrlCostInDspCrcy DebitPlanCtrlCostInDspCrcy
PlanCtrlCostInDspCrcy PlanCtrlCostInDspCrcy
CrdtActlCtrlCostInDspCrcy CrdtActlCtrlCostInDspCrcy
DebitActlCtrlCostInDspCrcy DebitActlCtrlCostInDspCrcy
ActlCtrlCostInDspCrcy ActlCtrlCostInDspCrcy
CostVarianceInDspCrcy CostVarianceInDspCrcy
InptPrVarcAmtInDspCrcy InptPrVarcAmtInDspCrcy
InptQtyVarcAmtInDspCrcy InptQtyVarcAmtInDspCrcy
RsceUsgeVarcAmtInDspCrcy RsceUsgeVarcAmtInDspCrcy
OutpPrVarcAmtInDspCrcy OutpPrVarcAmtInDspCrcy
LotSizeVarcAmtInDspCrcy LotSizeVarcAmtInDspCrcy
RmngVarcAmtInDspCrcy RmngVarcAmtInDspCrcy
WIPCostInDspCrcy WIPCostInDspCrcy
UnrlzdCostRsrvAmtInDspCrcy UnrlzdCostRsrvAmtInDspCrcy
TotalWIPAmountInDspCrcy TotalWIPAmountInDspCrcy
PlanOutputQuantity PlanOutputQuantity
ActualOutputQuantity ActualOutputQuantity
DebitActlPlnDiffCostInDspCrcy DebitActlPlnDiffCostInDspCrcy
DebitActlPlanDiffPercent DebitActlPlanDiffPercent
DebitActlTgtDiffCostInDspCrcy DebitActlTgtDiffCostInDspCrcy
DebitActlTgtDiffPercent DebitActlTgtDiffPercent
DspCrcyActlTgtDiffPct DspCrcyActlTgtDiffPct
PlnCtrlTgtDiffCostInDspCrcy PlnCtrlTgtDiffCostInDspCrcy
DspCrcyPlnCtrlTgtDiffPct DspCrcyPlnCtrlTgtDiffPct
ActlCtrlTgtDiffCostInDspCrcy ActlCtrlTgtDiffCostInDspCrcy
DspCrcyActlCtrlTgtDiffPct DspCrcyActlCtrlTgtDiffPct
ActlPlanDiffOutputQuantity ActlPlanDiffOutputQuantity
ActlPlanDiffOutpQtyPercent ActlPlanDiffOutpQtyPercent
LedgerName
CompanyCodeName _CompanyCode CompanyCodeName Company Name
ControllingAreaName _ControllingArea ControllingAreaName Long Text
OrderTypeName
OrderCategoryName
PlantName _Plant PlantName Plant Name
MRPPlantName
MaterialName
StorageLocationName
ProductionVersionText _ProductionVersion ProductionVersionText
ProfitCenterName
ResponsibleCostCenterName
ActlCostsCostingVariantName
PlndCostsCostingVariantName
BusinessAreaName
InterestAmount
_CompanyCode _CompanyCode
_Material _Material
_CreatedByUserContactCard _CreatedByUserContactCard
_LastChangedByUserContactCard _LastChangedByUserContactCard
_JointProductionText _JointProductionText

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 C_OrdHdrItmRealTimeProdnCost.
-- 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: CEBORDHIRTPRCST
-- Parameters: P_FromFiscalYearPeriod : fins_fyearperiod, P_ToFiscalYearPeriod : fins_fyearperiod, P_Ledger : fins_ledger, P_PlanningCategory : fcom_category, P_CurrencyRole : fac_crcyrole

CREATE VIEW C_OrdHdrItmRealTimeProdnCost AS
SELECT
  cast(OrderID as fco_rtwip_production_order) AS OrderID,
  cast(ltrim(OrderItem, '0') as fco_order_item) AS OrderItem,
  OrderInternalID,
  ObjectInternalID,
  cast(InternalOrderText as fco_rt_ord_cst_dtl_int_ord_t) AS InternalOrderText,
  OrderType,
  OrderCategory,
  IsMarkedForDeletion,
  ExternalOrder,
  OrderDescription,
  Plant,
  CompanyCode,
  BaseUnit,
  cast(RatioUnit as fco_rt_prod_costs_prcntg_unit preserving type ) AS RatioUnit,
  :P_FromFiscalYearPeriod AS FromFiscalYearPeriod,
  :P_ToFiscalYearPeriod AS ToFiscalYearPeriod,
  :P_PlanningCategory AS PlanningCategory,
  cast(Ledger as fins_ledger) AS Ledger,
  ControllingArea,
  BusinessArea,
  ProfitCenter,
  ResponsibleCostCenter,
  WBSElementInternalID,
  cast(_WBSElement.WBSElementExternalID as fco_ebpr_wbs_element_ext_id) AS WBSElementExternalID,
  _WBSElement.WBSDescription AS WBSDescription,
  cast(_WBSElement._Project.ProjectExternalID as cats_cpr_extid) AS ProjectExternalID,
  _WBSElement._Project.ProjectDescription AS ProjectDescription,
  SalesOrder,
  SalesOrderItem,
  MfgOrderHasMultipleItems,
  ActualCostsCostingVariant,
  PlannedCostsCostingVariant,
  CreatedByUser,
  CreationDate,
  LastChangedByUser,
  LastChangeDate,
  TechnicalCompletionDate,
  CombnOrdCombinationIdentifier,
  _CombnOrdCombinationIDText.CombnOrdCombinationIDText AS CombnOrdCombinationIDText,
  cast(CombinedOrder as oc_combined_order) AS CombinedOrder,
  SuperiorOrder,
  MfgOrderIsPartOfCollvOrder,
  cast(Material as fco_rtwip_product preserving type ) AS Material,
  _ProductGroupText[1: Language = $session.system_language].MaterialGroupName AS MaterialGroupName,
  MaterialGroup,
  ProductHierarchy,
  cast(_ProductHierarchyText[1: Language = $session.system_language].ProductHierarchyText as producthierarchytext) AS ProductHierarchyText,
  cast(MRPPlant as fis_co_pwerk) AS MRPPlant,
  cast(StorageLocation as fis_lgort_d) AS StorageLocation,
  ProductionVersion,
  ValuationType,
  ScheduledBasicEndDate,
  ScheduledReleaseDate,
  ActualStartDate,
  ConfirmedEndDate,
  ActualDeliveryDate,
  ActualReleasedDate,
  ControllingObjectStatus,
  cast(_OrderGroupStatus[1: Language = $session.system_language].OrderStatusShortText as fco_status_name ) AS OrderStatusShortText,
  OrderKeyStatus,
  cast(_SystemStatusText[1: Language = $session.system_language].SystemStatusName as fco_status_name ) AS SystemStatusName,
  DisplayCurrency,
  CreditActlCostInDspCrcy,
  DebitActlCostInDspCrcy,
  ActlCostInDspCrcy,
  DebitActlVarblCostInDspCrcy,
  CrdtActlVarblCostIndDspCrcy,
  ActlVarblCostInDspCrcy,
  CrdtActlFxdCostInDspCrcy,
  DebitActlFxdCostInDspCrcy,
  ActlFixedCostInDspCrcy,
  CreditPlanCostInDspCrcy,
  DebitPlanCostInDspCrcy,
  CrdtPlnFxdCostInDspCrcy,
  DebitPlnFxdCostInDspCrcy,
  CrdtPlnVarblCostInDspCrcy,
  DebitPlnVarblCostInDspCrcy,
  PlanCostInDspCrcy,
  PlanFixedCostInDspCrcy,
  PlanVarblCostInDspCrcy,
  CrdtTargetCostInDspCrcy,
  DebitTargetCostInDspCrcy,
  TargetCostInDspCrcy,
  CrdtPlanCtrlCostInDspCrcy,
  DebitPlanCtrlCostInDspCrcy,
  PlanCtrlCostInDspCrcy,
  CrdtActlCtrlCostInDspCrcy,
  DebitActlCtrlCostInDspCrcy,
  ActlCtrlCostInDspCrcy,
  CostVarianceInDspCrcy,
  InptPrVarcAmtInDspCrcy,
  InptQtyVarcAmtInDspCrcy,
  RsceUsgeVarcAmtInDspCrcy,
  OutpPrVarcAmtInDspCrcy,
  LotSizeVarcAmtInDspCrcy,
  RmngVarcAmtInDspCrcy,
  WIPCostInDspCrcy,
  UnrlzdCostRsrvAmtInDspCrcy,
  TotalWIPAmountInDspCrcy,
  PlanOutputQuantity,
  ActualOutputQuantity,
  DebitActlPlnDiffCostInDspCrcy,
  DebitActlPlanDiffPercent,
  DebitActlTgtDiffCostInDspCrcy,
  DebitActlTgtDiffPercent,
  DspCrcyActlTgtDiffPct,
  PlnCtrlTgtDiffCostInDspCrcy,
  DspCrcyPlnCtrlTgtDiffPct,
  ActlCtrlTgtDiffCostInDspCrcy,
  DspCrcyActlCtrlTgtDiffPct,
  ActlPlanDiffOutputQuantity,
  ActlPlanDiffOutpQtyPercent,
  _LedgerText[1: Language = $session.system_language].LedgerName AS LedgerName,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  _ControllingArea.ControllingAreaName AS ControllingAreaName,
  _OrderTypeText[1: Language = $session.system_language].OrderTypeName AS OrderTypeName,
  _OrderCategoryText[1: Language = $session.system_language].OrderCategoryName AS OrderCategoryName,
  _Plant.PlantName AS PlantName,
  cast(_MRPPlant.PlantName as fco_rtwip_planning_plant_name) AS MRPPlantName,
  cast(_ProductText[1: Language = $session.system_language].ProductName as fco_rtwip_prod_desc) AS MaterialName,
  cast(_StorageLocation.StorageLocationName as fco_rtwip_storage_loc_name preserving type ) AS StorageLocationName,
  _ProductionVersion.ProductionVersionText AS ProductionVersionText,
  _ProfitCenterText[1: Language = $session.system_language ].ProfitCenterName AS ProfitCenterName,
  cast(_ResponsibleCostCenterText[1: Language = $session.system_language ].CostCenterName as fco_resp_cost_center_text) AS ResponsibleCostCenterName,
  cast(_ActlCostsCostingVariantText[1: Language = $session.system_language].CostingVariantName as fco_actl_costs_cost_var_name) AS ActlCostsCostingVariantName,
  cast(_PlndCostsCostingVariantText[1: Language = $session.system_language].CostingVariantName as fco_plnd_costs_cost_var_name) AS PlndCostsCostingVariantName,
  cast(_BusinessAreaText[1: Language = $session.system_language ].BusinessAreaName as fco_bus_area_text) AS BusinessAreaName,
  cast(0 as int_amount) AS InterestAmount
FROM I_OrdHdrItmRealTimeProdnCost
LEFT OUTER JOIN I_UserContactCard AS _CreatedByUserContactCard ON CreatedByUser = _CreatedByUserContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_UserContactCard AS _LastChangedByUserContactCard ON LastChangedByUser = _LastChangedByUserContactCard.ContactCardID  -- association [0..1]
LEFT OUTER JOIN I_SystemStatusText AS _SystemStatusText ON OrderKeyStatus = _SystemStatusText.SystemStatus  -- association [0..*]
LEFT OUTER JOIN C_RealTimeOrderGroupStatusVH AS _OrderGroupStatus ON ControllingObjectStatus = _OrderGroupStatus.ControllingObjectStatus  -- association [0..*]
LEFT OUTER JOIN C_RealTmeOrdJointProductionT AS _JointProductionText ON MfgOrderHasMultipleItems = _JointProductionText.MfgOrderHasMultipleItems  -- association [0..*]
LEFT OUTER JOIN I_ProductionVersionBasic AS _ProductionVersion ON Material = _ProductionVersion.Product AND Plant = _ProductionVersion.Plant AND ProductionVersion = _ProductionVersion.ProductionVersion  -- association [0..1]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElement ON _WBSElement.WBSElementInternalID = WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_OrdCombnCombinationIDText AS _CombnOrdCombinationIDText ON CombnOrdCombinationIdentifier = _CombnOrdCombinationIDText.CombnOrdCombinationIdentifier AND Language = $session.system_language  -- association [0..1]
;