P_EBOC_OrderAndItemCosts

DDL: P_EBOC_ORDERANDITEMCOSTS SQL: PEBOCHDITMCST Type: view COMPOSITE

P_EBOC_OrderAndItemCosts is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_EBOC_OrderAndItemCosts5) and exposes 105 fields with key fields CostElement, CtrlgOriginClassification, ControllingDebitCreditCode, MfgOrderBusTransactionType, OriginCostCenter. It has 10 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_EBOC_OrderAndItemCosts5 P_EBOC_OrderAndItemCosts5 from

Parameters (7)

NameTypeDefault
P_OrderID fis_order_number
P_OrderItem char4
P_FromFiscalYearPeriod fis_jahrper
P_ToFiscalYearPeriod fis_jahrper
P_Ledger fins_ledger
P_CostComponentStructure ck_elesmhk
P_CurrencyRole fac_crcyrole

Associations (10)

CardinalityTargetAliasCondition
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_MfgDebitCreditCode _MfgDebitCreditCode $projection.ControllingDebitCreditCode = _MfgDebitCreditCode.ManufacturingDebitCreditCode
[0..1] I_COProdnOrderBusTrans _COProdnOrderBusTrans $projection.MfgOrderBusTransactionType = _COProdnOrderBusTrans.MfgOrderBusTransactionType
[0..*] I_GLAccountText _GLAccountTxt $projection.ChartOfAccounts = _GLAccountTxt.ChartOfAccounts and $projection.CostElement = _GLAccountTxt.GLAccount
[0..*] I_CostComponentText _CostComponentTxt $projection.CostComponent = _CostComponentTxt.CostComponent and $projection.CostComponentStructure = _CostComponentTxt.CostComponentStructure
[0..*] I_CostCenterText _CostCenterText $projection.OriginCostCenter = _CostCenterText.CostCenter and $projection.ControllingArea = _CostCenterText.ControllingArea
[0..*] I_CostCenterText _PartnerCostCenterText $projection.PartnerCostCenter = _PartnerCostCenterText.CostCenter and $projection.ControllingArea = _PartnerCostCenterText.ControllingArea
[0..*] I_CostCenterActivityTypeText _CostCenterActivityTypeText $projection.ControllingArea = _CostCenterActivityTypeText.ControllingArea and $projection.OriginCostCtrActivityType = _CostCenterActivityTypeText.CostCtrActivityType
[0..*] I_CostCenterActivityTypeText _PrtrCostCenterActvtTypeText $projection.ControllingArea = _PrtrCostCenterActvtTypeText.ControllingArea and $projection.PartnerCostCtrActivityType = _PrtrCostCenterActvtTypeText.CostCtrActivityType
[0..*] I_ProfitCenter _ProfitCenter $projection.ControllingArea = _ProfitCenter.ControllingArea and $projection.ProfitCenter = _ProfitCenter.ProfitCenter

Annotations (6)

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

Fields (105)

KeyFieldSource TableSource FieldDescription
KEY CostElement CostElement G/L Account
KEY CtrlgOriginClassification
KEY ControllingDebitCreditCode ControllingDebitCreditCode Dr/Cr ind. CO
KEY MfgOrderBusTransactionType MfgOrderBusTransactionType
KEY OriginCostCenter OriginCostCenter
KEY OriginCostCtrActivityType OriginCostCtrActivityType
KEY OriginBusinessProcess OriginBusinessProcess
KEY OriginOrder OriginOrder
KEY CostOriginType CostOriginType
KEY OriginObject OriginObject Reference Document
KEY CostOriginGroup CostOriginGroup Origin Group
KEY PartnerCostCenter PartnerCostCenter Sender Cost Ctr
KEY PartnerCostCtrActivityType PartnerCostCtrActivityType Partner Cost Center Activity Type
KEY PartnerBusinessProcess PartnerBusinessProcess Part. Bus. Process
KEY PartnerOrder PartnerOrder Partner Order
KEY PartnerCostObject Partner With Partner
KEY UnitOfMeasure Unit Protected Qty
KEY Material Material Vehicle Model
KEY IsLotSizeIndependent IsLotSizeIndependent
KEY SubLedgerAcctLineItemType SubLedgerAcctLineItemType SLALineItemType
RatioUnit
DisplayCurrency DisplayCurrency Display Currency
ControllingArea ControllingArea Controlling Area
CompanyCode CompanyCode Receiver Company Code
ProfitCenter ProfitCenter Profit Center
ResponsibleCostCenter ResponsibleCostCenter Responsible Cost Center
OrderCategory OrderCategory Order Category
OrderType OrderType Order Type
OrderSettlementTriggerType OrderSettlementTriggerType
Plant Plant Valuation Area
SalesOrder SalesOrder SD Document
ChartOfAccounts ChartOfAccounts Node Class
ValidityDate
CreditActlCostInDspCrcy
DebitActlCostInDspCrcy
ActlCostInDspCrcy
CrdtActlFxdCostInDspCrcy
DebitActlFxdCostInDspCrcy
ActlFixedCostInDspCrcy
CrdtActlVarblCostInDspCrcy
DebitActlVarblCostInDspCrcy
ActlVarblCostInDspCrcy
ActualQtyInCostSourceUnit
CreditPlanCostInDspCrcy
DebitPlanCostInDspCrcy
PlanCostInDspCrcy
CrdtPlnFxdCostInDspCrcy
DebitPlnFxdCostInDspCrcy
PlanFixedCostInDspCrcy
CrdtPlnVarblCostInDspCrcy
DebitPlnVarblCostInDspCrcy
PlanVarblCostInDspCrcy
PlanQtyInCostSourceUnit
CrdtTargetCostInDspCrcy
DebitTargetCostInDspCrcy
TargetCostInDspCrcy
TargetQtyInCostSourceUnit Target Quantity
CrdtPlanCtrlCostInDspCrcy
DebitPlanCtrlCostInDspCrcy
PlanCtrlCostInDspCrcy
PlanCtrlQtyInCostSourceUnit
CrdtActlCtrlCostInDspCrcy
DebitActlCtrlCostInDspCrcy
ActlCtrlCostInDspCrcy
ActlCtrlQtyInCostSourceUnit
CostVarianceInDspCrcy
InptPrVarcAmtInDspCrcy
InptQtyVarcAmtInDspCrcy
RsceUsgeVarcAmtInDspCrcy
ScrapVarcAmtInDspCrcy
MixedPrVarcAmtInDspCrcy
OutpPrVarcAmtInDspCrcy
LotSizeVarcAmtInDspCrcy
RmngVarcAmtInDspCrcy
WIPCostInDspCrcy
UnrlzdCostRsrvAmtInDspCrcy
TotalWIPAmountInDspCrcy
WIPQuantity
DebitActlPlnDiffCostInDspCrcy
DebitActlPlanDiffPercent
ActlPlnDiffCostInDspCrcy
DspCrcyActlPlanDiffPct
ActlPlanDiffQuantity
ActlPlanDiffQtyPct
DebitActlTgtDiffCostInDspCrcy
DebitActlTgtDiffPercent
ActlTgtDiffCostInDspCrcy
ActlTgtDiffQuantity
DspCrcyActlTgtDiffPct
ActlTgtDiffQtyPct
PlnCtrlTgtDiffCostInDspCrcy
DspCrcyPlnCtrlTgtDiffPct
ActlCtrlTgtDiffCostInDspCrcy
DspCrcyActlCtrlTgtDiffPct
CostComponentStructure
_Material _Material
_MfgDebitCreditCode _MfgDebitCreditCode
_COProdnOrderBusTrans _COProdnOrderBusTrans
_GLAccountTxt _GLAccountTxt
_CostComponentTxt _CostComponentTxt
_CostCenterText _CostCenterText
_PartnerCostCenterText _PartnerCostCenterText
_CostCenterActivityTypeText _CostCenterActivityTypeText
_PrtrCostCenterActvtTypeText _PrtrCostCenterActvtTypeText
_ProfitCenter _ProfitCenter

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_EBOC_OrderAndItemCosts.
-- 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: PEBOCHDITMCST
-- Parameters: P_OrderID : fis_order_number, P_OrderItem : char4, P_FromFiscalYearPeriod : fis_jahrper, P_ToFiscalYearPeriod : fis_jahrper, P_Ledger : fins_ledger, P_CostComponentStructure : ck_elesmhk, P_CurrencyRole : fac_crcyrole

CREATE VIEW P_EBOC_OrderAndItemCosts AS
SELECT
  CostElement,
  cast(CtrlgOriginClassification as fis_kkb_herkz) AS CtrlgOriginClassification,
  ControllingDebitCreditCode,
  MfgOrderBusTransactionType,
  OriginCostCenter,
  OriginCostCtrActivityType,
  OriginBusinessProcess,
  OriginOrder,
  CostOriginType,
  OriginObject,
  CostOriginGroup,
  PartnerCostCenter,
  PartnerCostCtrActivityType,
  PartnerBusinessProcess,
  PartnerOrder,
  Partner AS PartnerCostObject,
  cast(UnitOfMeasure as co_meinh) AS UnitOfMeasure,
  Material,
  IsLotSizeIndependent,
  SubLedgerAcctLineItemType,
  cast('%' as msehi) AS RatioUnit,
  DisplayCurrency,
  ControllingArea,
  CompanyCode,
  ProfitCenter,
  ResponsibleCostCenter,
  OrderCategory,
  OrderType,
  OrderSettlementTriggerType,
  Plant,
  SalesOrder,
  ChartOfAccounts,
  $session.system_date AS ValidityDate,
  cast(CreditActlCostInDspCrcy as fis_cr_actlcost_in_dspcrcy) AS CreditActlCostInDspCrcy,
  cast(DebitActlCostInDspCrcy as fis_dr_actlcost_in_dspcrcy) AS DebitActlCostInDspCrcy,
  cast(ActlCostInDspCrcy as fis_actlcost_in_dspcrcy) AS ActlCostInDspCrcy,
  cast(CrdtActlFxdCostInDspCrcy as fis_cr_actlfxdcost_in_dspcrcy) AS CrdtActlFxdCostInDspCrcy,
  cast(DebitActlFxdCostInDspCrcy as fis_dr_actlfxdcost_in_dspcrcy) AS DebitActlFxdCostInDspCrcy,
  cast(ActlFixedCostInDspCrcy as fis_actlfixedcost_in_dspcrcy) AS ActlFixedCostInDspCrcy,
  cast(CrdtActlVarblCostInDspCrcy as fis_cr_actlvarblcost_indspcrcy) AS CrdtActlVarblCostInDspCrcy,
  cast(DebitActlVarblCostInDspCrcy as fis_dr_actlvarblcost_indspcrcy) AS DebitActlVarblCostInDspCrcy,
  cast(ActlVarblCostInDspCrcy as fis_actlvarblcost_in_dspcrcy) AS ActlVarblCostInDspCrcy,
  cast(ActualQuantity as fis_actlqty_in_costsrceunit) AS ActualQtyInCostSourceUnit,
  cast(CreditPlanCostInDspCrcy as fis_cr_plancost_in_dspcrcy) AS CreditPlanCostInDspCrcy,
  cast(DebitPlanCostInDspCrcy as fis_dr_plancost_in_dspcrcy) AS DebitPlanCostInDspCrcy,
  cast(PlanCostInDspCrcy as fis_plancost_in_dspcrcy) AS PlanCostInDspCrcy,
  cast(CrdtPlnFxdCostInDspCrcy as fis_cr_plnfxdcost_in_dspcrcy) AS CrdtPlnFxdCostInDspCrcy,
  cast(DebitPlnFxdCostInDspCrcy as fis_dr_plnfxdcost_in_dspcrcy) AS DebitPlnFxdCostInDspCrcy,
  cast(PlanFixedCostInDspCrcy as fis_planfixedcost_in_dspcrcy) AS PlanFixedCostInDspCrcy,
  cast(CrdtPlnVarblCostInDspCrcy as fis_cr_plnvarblcost_in_dspcrcy) AS CrdtPlnVarblCostInDspCrcy,
  cast(DebitPlnVarblCostInDspCrcy as fis_dr_plnvarblcost_in_dspcrcy) AS DebitPlnVarblCostInDspCrcy,
  cast(PlanVarblCostInDspCrcy as fis_planvarblcost_in_dspcrcy) AS PlanVarblCostInDspCrcy,
  cast(PlanQuantity as fis_planqty_in_costsrceunit) AS PlanQtyInCostSourceUnit,
  cast(CrdtTargetCostInDspCrcy as fis_cr_tgtcost_in_dspcrcy) AS CrdtTargetCostInDspCrcy,
  cast(DebitTargetCostInDspCrcy as fis_dr_tgtcost_in_dspcrcy) AS DebitTargetCostInDspCrcy,
  cast(TargetCostInDspCrcy as fis_tgtcost_in_dspcrcy) AS TargetCostInDspCrcy,
  cast(TargetQuantity as fis_tgtqty_in_costsrceunit) AS TargetQtyInCostSourceUnit,
  cast(CreditPlanCostInDspCrcy as fis_cr_planctrlcost_indspcrcy) AS CrdtPlanCtrlCostInDspCrcy,
  cast(DebitPlanCostInDspCrcy as fis_dr_planctrlcost_indspcrcy) AS DebitPlanCtrlCostInDspCrcy,
  cast(PlanCtrlCostInDspCrcy as fis_planctrlcost_in_dspcrcy) AS PlanCtrlCostInDspCrcy,
  cast(PlanControlQuantity as fis_plnctrlqty_incostsrceunit) AS PlanCtrlQtyInCostSourceUnit,
  cast(CreditActlCostInDspCrcy as fis_cr_actlctrlcost_indspcrcy) AS CrdtActlCtrlCostInDspCrcy,
  cast(DebitActlCostInDspCrcy as fis_dr_actlctrlcost_indspcrcy) AS DebitActlCtrlCostInDspCrcy,
  cast(ActlCtrlCostInDspCrcy as fis_actlctrlcost_in_dspcrcy) AS ActlCtrlCostInDspCrcy,
  cast(ActualControlQuantity as fis_actlctrlqty_incostsrceunit) AS ActlCtrlQtyInCostSourceUnit,
  cast(CostVarianceInDspCrcy as fco_eb_totalvarcamt_in_dspcrcy) AS CostVarianceInDspCrcy,
  cast(InptPrVarcAmtInDspCrcy as fis_inptprvarcamt_in_dspcrcy) AS InptPrVarcAmtInDspCrcy,
  cast(InptQtyVarcAmtInDspCrcy as fis_inptqtyvarcamt_in_dspcrcy) AS InptQtyVarcAmtInDspCrcy,
  cast(RsceUsgeVarcAmtInDspCrcy as fis_rsceusgevarcamt_in_dspcrcy) AS RsceUsgeVarcAmtInDspCrcy,
  cast(ScrapVarcAmtInDspCrcy as fis_scrapvarcamt_in_dspcrcy) AS ScrapVarcAmtInDspCrcy,
  cast(MixedPrVarcAmtInDspCrcy as fco_eb_mixprvarcamt_in_dspcrcy) AS MixedPrVarcAmtInDspCrcy,
  cast(OutpPrVarcAmtInDspCrcy as fis_outpprvarcamt_in_dspcrcy) AS OutpPrVarcAmtInDspCrcy,
  cast(LotSizeVarcAmtInDspCrcy as fis_lotsizevarcamt_in_dspcrcy) AS LotSizeVarcAmtInDspCrcy,
  cast(RmngVarcAmtInDspCrcy as fco_eb_rmngvarcamt_in_dspcrcy) AS RmngVarcAmtInDspCrcy,
  cast(WIPCostInDspCrcy as fis_wipcost_in_dspcrcy) AS WIPCostInDspCrcy,
  cast(UnrlzdCostRsrvAmtInDspCrcy as fis_abgruekfk) AS UnrlzdCostRsrvAmtInDspCrcy,
  cast((WIPCostInDspCrcy + UnrlzdCostRsrvAmtInDspCrcy) as abgbesges) AS TotalWIPAmountInDspCrcy,
  cast(WIPQuantity as fis_wip_quantity) AS WIPQuantity,
  cast(DebitActlPlnDiffCostInDspCrcy as fis_dractlplndiffcostindspcrcy ) AS DebitActlPlnDiffCostInDspCrcy,
  cast(DebitActlPlanDiffPercent as fis_dr_cocrcy_actlplndiffpct ) AS DebitActlPlanDiffPercent,
  cast(ActlPlnDiffCostInDspCrcy as fis_actlplndiffcost_in_dspcrcy) AS ActlPlnDiffCostInDspCrcy,
  cast(DspCrcyActlPlanDiffPct as fis_cocrcy_actlplndiffpct ) AS DspCrcyActlPlanDiffPct,
  cast(ActlPlanDiffQuantity as fis_actlplandiffquantity) AS ActlPlanDiffQuantity,
  cast(ActlPlanDiffQtyPct as fis_actlplandiffoutpqtypercent) AS ActlPlanDiffQtyPct,
  cast(DebitActlTgtDiffCostInDspCrcy as fis_dractltgtdiffcostindspcrcy) AS DebitActlTgtDiffCostInDspCrcy,
  cast(DebitActlTgtDiffPercent as fis_dr_cocrcy_actltgtdiffpct ) AS DebitActlTgtDiffPercent,
  cast(ActlTgtDiffCostInDspCrcy as fis_actltgtdiffcost_in_dspcrcy) AS ActlTgtDiffCostInDspCrcy,
  cast(ActlTgtDiffQuantity as fis_actltgtdiffqty) AS ActlTgtDiffQuantity,
  cast(DspCrcyActlTgtDiffPct as fis_dspcrcy_actltgtdiffpct ) AS DspCrcyActlTgtDiffPct,
  cast(ActlTgtDiffQtyPct as fis_actltgtdiffqtypct) AS ActlTgtDiffQtyPct,
  cast((PlanCtrlCostInDspCrcy - TargetCostInDspCrcy) as fis_plnctrltgtdiff_indspcrcy) AS PlnCtrlTgtDiffCostInDspCrcy,
  cast(0 as fis_dspcrcy_plnctrltgtdiffpct) AS DspCrcyPlnCtrlTgtDiffPct,
  cast((ActlCtrlCostInDspCrcy - TargetCostInDspCrcy) as fis_actlctrltgtdiff_indspcrcy) AS ActlCtrlTgtDiffCostInDspCrcy,
  cast(0 as fis_dspcrcy_actlctrltgtdiffpct) AS DspCrcyActlCtrlTgtDiffPct,
  cast( CostComponentStructure as ck_elesmhk) AS CostComponentStructure
FROM P_EBOC_OrderAndItemCosts5
LEFT OUTER JOIN I_Material AS _Material ON Material = _Material.Material  -- association [0..1]
LEFT OUTER JOIN I_MfgDebitCreditCode AS _MfgDebitCreditCode ON ControllingDebitCreditCode = _MfgDebitCreditCode.ManufacturingDebitCreditCode  -- association [0..1]
LEFT OUTER JOIN I_COProdnOrderBusTrans AS _COProdnOrderBusTrans ON MfgOrderBusTransactionType = _COProdnOrderBusTrans.MfgOrderBusTransactionType  -- association [0..1]
LEFT OUTER JOIN I_GLAccountText AS _GLAccountTxt ON ChartOfAccounts = _GLAccountTxt.ChartOfAccounts AND CostElement = _GLAccountTxt.GLAccount  -- association [0..*]
LEFT OUTER JOIN I_CostComponentText AS _CostComponentTxt ON CostComponent = _CostComponentTxt.CostComponent AND CostComponentStructure = _CostComponentTxt.CostComponentStructure  -- association [0..*]
LEFT OUTER JOIN I_CostCenterText AS _CostCenterText ON OriginCostCenter = _CostCenterText.CostCenter AND ControllingArea = _CostCenterText.ControllingArea  -- association [0..*]
LEFT OUTER JOIN I_CostCenterText AS _PartnerCostCenterText ON PartnerCostCenter = _PartnerCostCenterText.CostCenter AND ControllingArea = _PartnerCostCenterText.ControllingArea  -- association [0..*]
LEFT OUTER JOIN I_CostCenterActivityTypeText AS _CostCenterActivityTypeText ON ControllingArea = _CostCenterActivityTypeText.ControllingArea AND OriginCostCtrActivityType = _CostCenterActivityTypeText.CostCtrActivityType  -- association [0..*]
LEFT OUTER JOIN I_CostCenterActivityTypeText AS _PrtrCostCenterActvtTypeText ON ControllingArea = _PrtrCostCenterActvtTypeText.ControllingArea AND PartnerCostCtrActivityType = _PrtrCostCenterActvtTypeText.CostCtrActivityType  -- association [0..*]
LEFT OUTER JOIN I_ProfitCenter AS _ProfitCenter ON ControllingArea = _ProfitCenter.ControllingArea AND ProfitCenter = _ProfitCenter.ProfitCenter  -- association [0..*]
;