I_WorkCenterProductCost

DDL: I_WORKCENTERPRODUCTCOST SQL: IFIPRODCOSTBYWC Type: view COMPOSITE Package: ODATA_WORKCENTER_COST

Interface View for Product Cost by Work Center

I_WorkCenterProductCost is a Composite CDS View that provides data about "Interface View for Product Cost by Work Center" in SAP S/4HANA. It reads from 1 data source (P_WorkCenterProductCost) and exposes 66 fields with key fields OrderID, OrderOperation, Ledger, WorkCenterInternalID, GLAccount. It has 16 associations to related views. Part of development package ODATA_WORKCENTER_COST.

Data Sources (1)

SourceAliasJoin Type
P_WorkCenterProductCost P_WorkCenterProductCost from

Parameters (4)

NameTypeDefault
P_FromFiscalYearPeriod fis_jahrper
P_ToFiscalYearPeriod fis_jahrper
P_PlanningCategory fcom_category
P_CurrencyRole fac_crcyrole

Associations (16)

CardinalityTargetAliasCondition
[0..1] I_ProductCostCtrlgOrder _CtrlgOrder $projection.OrderID = _CtrlgOrder.OrderID
[0..1] I_ProductCostCtrlgOrderItem _RepresentativeOrderItem $projection.OrderID = _RepresentativeOrderItem.OrderID and _RepresentativeOrderItem.OrderItem = '0001'
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_WorkCenter _WorkCenter $projection.WorkCenterInternalID = _WorkCenter.WorkCenterInternalID and _WorkCenter.WorkCenterTypeCode = 'A'
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_GLAccount _GLAccount $projection.GLAccount = _GLAccount.GLAccount and $projection.CompanyCode = _GLAccount.CompanyCode
[0..*] I_CostCenter _CostCenter $projection.PartnerCostCenter = _CostCenter.CostCenter and $projection.ControllingArea = _CostCenter.ControllingArea
[0..*] I_CostCenterActivityType _ActivityType $projection.PartnerCostCtrActivityType = _ActivityType.CostCtrActivityType and $projection.ControllingArea = _ActivityType.ControllingArea
[0..1] I_UnitOfMeasure _Unit $projection.UnitOfMeasure = _Unit.UnitOfMeasure
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[0..1] I_Plant _Plant $projection.Plant = _Plant.Plant
[0..1] I_ProductionOrderOperation _ProdnOrdOp $projection.OrderID = _ProdnOrdOp.OrderID and $projection.OrderOperation = _ProdnOrdOp.OrderOperation
[0..1] I_ProcessOrderOperation _ProcOrdOp $projection.OrderID = _ProcOrdOp.OrderID and $projection.OrderOperation = _ProcOrdOp.OrderOperation
[0..1] I_MfgOrderCategory _OrderCategory $projection.ordercategory = _OrderCategory.ManufacturingOrderCategory
[0..1] I_OrderType _OrderType $projection.ordertype = _OrderType.OrderType
[0..1] I_Ledger _Ledger $projection.Ledger = _Ledger.Ledger

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName IFIPRODCOSTBYWC view
ClientHandling.type #CLIENT_DEPENDENT view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey WorkCenterInternalID view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
Metadata.ignorePropagatedAnnotations true view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Interface View for Product Cost by Work Center view

Fields (66)

KeyFieldSource TableSource FieldDescription
KEY OrderID _costs OrderID Order ID
KEY OrderOperation
KEY Ledger Ledger Ledger
KEY WorkCenterInternalID WorkCenterInternalID Work Center
KEY GLAccount General Ledger
KEY Material
KEY PartnerCostCtrActivityType
KEY UnitOfMeasure Unit Protected Qty
WorkCenter
ControllingArea _costs ControllingArea Controlling Area
CompanyCode _costs CompanyCode Receiver Company Code
ProfitCenter _CtrlgOrder ProfitCenter Profit Center
Plant _costs Plant Valuation Area
OrderDescription _CtrlgOrder OrderDescription
OrderCategory _CtrlgOrder OrderCategory Order Category
OrderType _CtrlgOrder OrderType Order Type
BusinessArea _CtrlgOrder BusinessArea Business Area
ResponsibleCostCenter _CtrlgOrder ResponsibleCostCenter Responsible Cost Center
ReferenceOrder _CtrlgOrder ReferenceOrder Reference Order
MfgOrderHasMultipleItems _CtrlgOrder MfgOrderHasMultipleItems
OrderIsEventBasedPosting _CtrlgOrder OrderIsEventBasedPosting
MRPPlant _RepresentativeOrderItem MRPPlant Plant
SalesOrder _RepresentativeOrderItem SalesOrder SD Document
ValidityDate
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
CompanyCodeCurrency _costs CompanyCodeCurrency Local Currency
DisplayCurrency DisplayCurrency Display Currency
DebitPlanCostInCtrlgAreaCrcy
DebitPlnFxdCostInCtrlgAreaCrcy
DebitPlnVarblCostInCOCrcy
DebitPlanCostInCoCodeCrcy
DebitPlanFixedCostInCoCodeCrcy
DebitPlanVarblCostInCoCodeCrcy
DebitPlanCostInDspCrcy
DebitPlnFxdCostInDspCrcy
DebitPlnVarblCostInDspCrcy
DebitActlCostInCtrlgAreaCrcy
DebitActlFxdCostInCOCrcy
DebitActlVarblCostInCOCrcy
DebitActlCostInCoCodeCrcy
DebitActlFixedCostInCoCodeCrcy
DebitActlVarblCostInCoCodeCrcy
DebitActlCostInDspCrcy
DebitActlFxdCostInDspCrcy
DebitActlVarblCostInDspCrcy
DebitActlPlnDiffCostInCOCrcy
DebitActlPlnDiffCostInCCCrcy
DebitActlPlnDiffCostInDspCrcy
ActualQtyInCostSourceUnit
PlanQtyInCostSourceUnit
ActlPlanDiffQuantity
_CtrlgOrder _CtrlgOrder
_CompanyCode _CompanyCode
_WorkCenter _WorkCenter
_Material _Material
_GLAccount _GLAccount
_CostCenter _CostCenter
_ActivityType _ActivityType
_ControllingArea _ControllingArea
_Unit _Unit
_Plant _Plant
_ProdnOrdOp _ProdnOrdOp
_ProcOrdOp _ProcOrdOp
_OrderCategory _OrderCategory
_Ledger _Ledger
_OrderType _OrderType

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 I_WorkCenterProductCost.
-- 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: IFIPRODCOSTBYWC
-- Parameters: P_FromFiscalYearPeriod : fis_jahrper, P_ToFiscalYearPeriod : fis_jahrper, P_PlanningCategory : fcom_category, P_CurrencyRole : fac_crcyrole

CREATE VIEW I_WorkCenterProductCost AS
SELECT
  _costs.OrderID AS OrderID,
  cast(COALESCE(OrderOperation, '') as fis_vornr) AS OrderOperation,
  Ledger,
  WorkCenterInternalID,
  cast(GLAccount as fis_saknr) AS GLAccount,
  cast(COALESCE(_costs.Material, '') as matnr) AS Material,
  cast(COALESCE(PartnerCostCtrActivityType, '') as lstar) AS PartnerCostCtrActivityType,
  cast(UnitOfMeasure as co_meinh) AS UnitOfMeasure,
  cast(COALESCE(_WorkCenter.WorkCenter, '') as pph_arbpl) AS WorkCenter,
  _costs.ControllingArea AS ControllingArea,
  _costs.CompanyCode AS CompanyCode,
  _CtrlgOrder.ProfitCenter AS ProfitCenter,
  _costs.Plant AS Plant,
  _CtrlgOrder.OrderDescription AS OrderDescription,
  _CtrlgOrder.OrderCategory AS OrderCategory,
  _CtrlgOrder.OrderType AS OrderType,
  _CtrlgOrder.BusinessArea AS BusinessArea,
  _CtrlgOrder.ResponsibleCostCenter AS ResponsibleCostCenter,
  _CtrlgOrder.ReferenceOrder AS ReferenceOrder,
  _CtrlgOrder.MfgOrderHasMultipleItems AS MfgOrderHasMultipleItems,
  _CtrlgOrder.OrderIsEventBasedPosting AS OrderIsEventBasedPosting,
  _RepresentativeOrderItem.MRPPlant AS MRPPlant,
  _RepresentativeOrderItem.SalesOrder AS SalesOrder,
  cast(substring( cast(tstmp_current_utctimestamp() as abap.char( 17 ) ), 1, 8 ) as abap.dats ) AS ValidityDate,
  GlobalCurrency,
  _costs.CompanyCodeCurrency AS CompanyCodeCurrency,
  DisplayCurrency,
  cast(DebitPlanCostInCtrlgAreaCrcy as fis_dr_plancost_in_cocrcy) AS DebitPlanCostInCtrlgAreaCrcy,
  cast(DebitPlnFxdCostInCtrlgAreaCrcy as fis_dr_plnfxdcost_in_cocrcy ) AS DebitPlnFxdCostInCtrlgAreaCrcy,
  cast((DebitPlanCostInCtrlgAreaCrcy - DebitPlnFxdCostInCtrlgAreaCrcy) as fis_dr_plnvarblcost_in_cocrcy) AS DebitPlnVarblCostInCOCrcy,
  cast(DebitPlanCostInCoCodeCurrency as fis_dr_plancost_in_cccrcy) AS DebitPlanCostInCoCodeCrcy,
  cast(DebitPlnFxdCostInCoCodeCrcy as fis_dr_planfxdcost_in_cccrcy) AS DebitPlanFixedCostInCoCodeCrcy,
  cast((DebitPlanCostInCoCodeCurrency - DebitPlnFxdCostInCoCodeCrcy) as fis_dr_plnvarblcost_in_cccrcy) AS DebitPlanVarblCostInCoCodeCrcy,
  cast(DebitPlanCostInDspCrcy as fis_dr_plancost_in_dspcrcy) AS DebitPlanCostInDspCrcy,
  cast(DebitPlnFxdCostInDspCrcy as fis_dr_plnfxdcost_in_dspcrcy ) AS DebitPlnFxdCostInDspCrcy,
  cast((DebitPlanCostInDspCrcy - DebitPlnFxdCostInDspCrcy) as fis_dr_plnvarblcost_in_dspcrcy) AS DebitPlnVarblCostInDspCrcy,
  cast(DebitActlCostInCtrlgAreaCrcy as fis_dr_actlcost_in_cocrcy) AS DebitActlCostInCtrlgAreaCrcy,
  cast(DebitActlFxdCostInCOCrcy as fis_dr_actlfxdcost_in_cocrcy) AS DebitActlFxdCostInCOCrcy,
  cast((DebitActlCostInCtrlgAreaCrcy - DebitActlFxdCostInCOCrcy) as fis_actlvarblcost_in_cocrcy) AS DebitActlVarblCostInCOCrcy,
  cast(DebitActualCostInCoCodeCrcy as fis_dr_actlcost_in_cccrcy) AS DebitActlCostInCoCodeCrcy,
  cast(DebitActlFxdCostInCoCodeCrcy as fis_dr_actlfxdcost_in_cccrcy) AS DebitActlFixedCostInCoCodeCrcy,
  cast((DebitActualCostInCoCodeCrcy - DebitActlFxdCostInCoCodeCrcy) as fis_dr_actlvarblcost_incccrcy) AS DebitActlVarblCostInCoCodeCrcy,
  cast(DebitActlCostInDspCrcy as fis_dr_actlcost_in_dspcrcy) AS DebitActlCostInDspCrcy,
  cast(DebitActlFxdCostInDspCrcy as fis_dr_actlfxdcost_in_dspcrcy) AS DebitActlFxdCostInDspCrcy,
  cast((DebitActlCostInDspCrcy - DebitActlFxdCostInDspCrcy) as fis_dr_actlvarblcost_indspcrcy) AS DebitActlVarblCostInDspCrcy,
  cast((DebitActlCostInCtrlgAreaCrcy - DebitPlanCostInCtrlgAreaCrcy) as fis_dr_actlplndiffcostincocrcy) AS DebitActlPlnDiffCostInCOCrcy,
  cast((DebitActualCostInCoCodeCrcy - DebitPlanCostInCoCodeCurrency) as fis_dractlplndiffcostincccrcy) AS DebitActlPlnDiffCostInCCCrcy,
  cast((DebitActlCostInDspCrcy - DebitPlanCostInDspCrcy) as fis_dr_actlplndiffcostincocrcy) AS DebitActlPlnDiffCostInDspCrcy,
  cast(ActualTotalQuantity as fis_actlqty_in_costsrceunit) AS ActualQtyInCostSourceUnit,
  cast(PlanTotalQuantity as fis_planqty_in_costsrceunit) AS PlanQtyInCostSourceUnit,
  cast((ActualTotalQuantity - PlanTotalQuantity) as fis_actlplandiffquantity) AS ActlPlanDiffQuantity
FROM P_WorkCenterProductCost
LEFT OUTER JOIN I_ProductCostCtrlgOrder AS _CtrlgOrder ON OrderID = _CtrlgOrder.OrderID  -- association [0..1]
LEFT OUTER JOIN I_ProductCostCtrlgOrderItem AS _RepresentativeOrderItem ON OrderID = _RepresentativeOrderItem.OrderID AND _RepresentativeOrderItem.OrderItem = '0001'  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_WorkCenter AS _WorkCenter ON WorkCenterInternalID = _WorkCenter.WorkCenterInternalID AND _WorkCenter.WorkCenterTypeCode = 'A'  -- association [0..1]
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [0..1]
LEFT OUTER JOIN I_GLAccount AS _GLAccount ON GLAccount = _GLAccount.GLAccount AND CompanyCode = _GLAccount.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON PartnerCostCenter = _CostCenter.CostCenter AND ControllingArea = _CostCenter.ControllingArea  -- association [0..*]
LEFT OUTER JOIN I_CostCenterActivityType AS _ActivityType ON PartnerCostCtrActivityType = _ActivityType.CostCtrActivityType AND ControllingArea = _ActivityType.ControllingArea  -- association [0..*]
LEFT OUTER JOIN I_UnitOfMeasure AS _Unit ON UnitOfMeasure = _Unit.UnitOfMeasure  -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea  -- association [0..1]
LEFT OUTER JOIN I_Plant AS _Plant ON Plant = _Plant.Plant  -- association [0..1]
LEFT OUTER JOIN I_ProductionOrderOperation AS _ProdnOrdOp ON OrderID = _ProdnOrdOp.OrderID AND OrderOperation = _ProdnOrdOp.OrderOperation  -- association [0..1]
LEFT OUTER JOIN I_ProcessOrderOperation AS _ProcOrdOp ON OrderID = _ProcOrdOp.OrderID AND OrderOperation = _ProcOrdOp.OrderOperation  -- association [0..1]
LEFT OUTER JOIN I_MfgOrderCategory AS _OrderCategory ON ordercategory = _OrderCategory.ManufacturingOrderCategory  -- association [0..1]
LEFT OUTER JOIN I_OrderType AS _OrderType ON ordertype = _OrderType.OrderType  -- association [0..1]
LEFT OUTER JOIN I_Ledger AS _Ledger ON Ledger = _Ledger.Ledger  -- association [0..1]
;