P_EBOC_COGM_OrderAndItemCosts

DDL: P_EBOC_COGM_ORDERANDITEMCOSTS SQL: PEBOCCOGMHDRITM Type: view COMPOSITE Package: ODATA_CO_RT_ORDER_COSTS_DETAIL

Event-Based Order Cost COGM Order and Item

P_EBOC_COGM_OrderAndItemCosts is a Composite CDS View that provides data about "Event-Based Order Cost COGM Order and Item" in SAP S/4HANA. It reads from 1 data source (P_EBOC_COGM_OrderAndItemCosts4) and exposes 35 fields with key fields CostElement, CtrlgOriginClassification, ControllingDebitCreditCode, CostOriginGroup, PartnerCostCenter. It has 7 associations to related views. Part of development package ODATA_CO_RT_ORDER_COSTS_DETAIL.

Data Sources (1)

SourceAliasJoin Type
P_EBOC_COGM_OrderAndItemCosts4 P_EBOC_COGM_OrderAndItemCosts4 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 (7)

CardinalityTargetAliasCondition
[0..1] I_Material _Material $projection.Material = _Material.Material
[0..1] I_MfgDebitCreditCode _MfgDebitCreditCode $projection.ControllingDebitCreditCode = _MfgDebitCreditCode.ManufacturingDebitCreditCode
[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 _PartnerCostCenterText $projection.PartnerCostCenter = _PartnerCostCenterText.CostCenter and $projection.ControllingArea = _PartnerCostCenterText.ControllingArea
[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 (7)

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

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY CostElement CostElement G/L Account
KEY CtrlgOriginClassification
KEY ControllingDebitCreditCode ControllingDebitCreditCode Dr/Cr ind. CO
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 UnitOfMeasure Unit Protected Qty
KEY Material Material Vehicle Model
KEY IsLotSizeIndependent IsLotSizeIndependent
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
Plant Plant Valuation Area
SalesOrder SalesOrder SD Document
ChartOfAccounts ChartOfAccounts Node Class
ValidityDate
DebitActlCostInDspCrcy
DebitPlanCostInDspCrcy
DebitTargetCostInDspCrcy
DebitActlTgtDiffCostInDspCrcy
CostComponentStructure
_Material _Material
_MfgDebitCreditCode _MfgDebitCreditCode
_GLAccountTxt _GLAccountTxt
_CostComponentTxt _CostComponentTxt
_PartnerCostCenterText _PartnerCostCenterText
_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_COGM_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: PEBOCCOGMHDRITM
-- 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_COGM_OrderAndItemCosts AS
SELECT
  CostElement,
  cast(CtrlgOriginClassification as fis_kkb_herkz) AS CtrlgOriginClassification,
  ControllingDebitCreditCode,
  CostOriginGroup,
  PartnerCostCenter,
  PartnerCostCtrActivityType,
  PartnerBusinessProcess,
  PartnerOrder,
  cast(UnitOfMeasure as co_meinh) AS UnitOfMeasure,
  Material,
  IsLotSizeIndependent,
  cast('%' as msehi) AS RatioUnit,
  DisplayCurrency,
  ControllingArea,
  CompanyCode,
  ProfitCenter,
  ResponsibleCostCenter,
  OrderCategory,
  OrderType,
  Plant,
  SalesOrder,
  ChartOfAccounts,
  $session.system_date AS ValidityDate,
  cast(DebitActlCostInDspCrcy as fis_dr_actlcost_in_dspcrcy) AS DebitActlCostInDspCrcy,
  cast(DebitPlanCostInDspCrcy as fis_dr_plancost_in_dspcrcy) AS DebitPlanCostInDspCrcy,
  cast(DebitTargetCostInDspCrcy as fis_dr_tgtcost_in_dspcrcy) AS DebitTargetCostInDspCrcy,
  cast(DebitActlTgtDiffCostInDspCrcy as fis_dractltgtdiffcostindspcrcy) AS DebitActlTgtDiffCostInDspCrcy,
  cast( CostComponentStructure as ck_elesmhk) AS CostComponentStructure
FROM P_EBOC_COGM_OrderAndItemCosts4
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_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 _PartnerCostCenterText ON PartnerCostCenter = _PartnerCostCenterText.CostCenter AND ControllingArea = _PartnerCostCenterText.ControllingArea  -- 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..*]
;