P_EBPC_COGM_CCGroup

DDL: P_EBPC_COGM_CCGROUP SQL: PEBPRCOGMCCG Type: view COMPOSITE

P_EBPC_COGM_CCGroup is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_LedgerCompanyCodeCrcyRolesVH, P_CoEvtBsdOrderKeyStatus, P_EBPC_COGM_CCGroup5) and exposes 82 fields with key fields Ledger, CompanyCode, OrderID. It has 1 association to related views.

Data Sources (3)

SourceAliasJoin Type
I_LedgerCompanyCodeCrcyRolesVH _LdgrCompCodeCrcy inner
P_CoEvtBsdOrderKeyStatus _OrderKeyStatus inner
P_EBPC_COGM_CCGroup5 P_EBPC_COGM_CCGroup5 from

Parameters (5)

NameTypeDefault
P_Ledger fins_ledger
P_FromFiscalYearPeriod fins_fyearperiod
P_ToFiscalYearPeriod fins_fyearperiod
P_CurrencyRole fis_curtp
P_CostComponentStructure ck_elesmhk

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_ProductCostCtrlgOrderItem _RepresentativeOrderItem _Costs.OrderID = _RepresentativeOrderItem.OrderID and _RepresentativeOrderItem.OrderItem = '0001'

Annotations (8)

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

Fields (82)

KeyFieldSource TableSource FieldDescription
KEY Ledger I_LedgerCompanyCodeCrcyRolesVH Ledger Ledger
KEY CompanyCode _Costs CompanyCode Receiver Company Code
KEY OrderID _Costs OrderID Order ID
OrderDescription OrderDescription
ObjectInternalID ObjectInternalID Object number
Material
Plant Plant Valuation Area
ControllingArea ControllingArea Controlling Area
ControllingObjectStatus
OrderKeyStatus
OrderCategory OrderCategory Order Category
OrderType OrderType Order Type
ProfitCenter ProfitCenter Profit Center
BusinessArea BusinessArea Business Area
ResponsibleCostCenter ResponsibleCostCenter Responsible Cost Center
ActualCostsCostingVariant ActualCostsCostingVariant Act. Costing Variant
PlannedCostsCostingVariant PlannedCostsCostingVariant Plnd Costing Variant
ExternalOrder ExternalOrder Ext. order no.
ActualOutputQuantity
BaseUnit
ScheduledBasicEndDate ScheduledBasicEndDate Sched. finish
ScheduledReleaseDate ScheduledReleaseDate
ActualStartDate ActualStartDate Actual Start
ConfirmedEndDate ConfirmedEndDate
ActualDeliveryDate ActualDeliveryDate Delivery Date
ActualReleasedDate ActualReleasedDate
TechnicalCompletionDate TechnicalCompletionDate
MRPPlant
StorageLocation
ProductionVersion _RepresentativeOrderItem ProductionVersion Version ID
SalesOrder _RepresentativeOrderItem SalesOrder SD Document
SalesOrderItem _RepresentativeOrderItem SalesOrderItem Sales Order Item
WBSElementInternalID
ValuationType _RepresentativeOrderItem ValuationType Valuation Type
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
LastChangedByUser LastChangedByUser User Name
LastChangeDate LastChangeDate Time Stamp
DisplayCurrency I_LedgerCompanyCodeCrcyRolesVH Currency Valuation Crcy
TotalAmountInDisplayCrcy
MfgOrderHasMultipleItems MfgOrderHasMultipleItems
CostCompGrp1AmountInDC CostCompGrp1AmountInDC
CostCompGrp2AmountInDC CostCompGrp2AmountInDC
CostCompGrp3AmountInDC CostCompGrp3AmountInDC
CostCompGrp4AmountInDC CostCompGrp4AmountInDC
CostCompGrp5AmountInDC CostCompGrp5AmountInDC
CostCompGrp6AmountInDC CostCompGrp6AmountInDC
CostCompGrp7AmountInDC CostCompGrp7AmountInDC
CostCompGrp8AmountInDC CostCompGrp8AmountInDC
CostCompGrp9AmountInDC CostCompGrp9AmountInDC
CostCompGrp10AmountInDC CostCompGrp10AmountInDC
CostCompGrp11AmountInDC CostCompGrp11AmountInDC
CostCompGrp12AmountInDC CostCompGrp12AmountInDC
CostCompGrp13AmountInDC CostCompGrp13AmountInDC
CostCompGrp14AmountInDC CostCompGrp14AmountInDC
CostCompGrp15AmountInDC CostCompGrp15AmountInDC
CostCompGrp16AmountInDC CostCompGrp16AmountInDC
CostCompGrp17AmountInDC CostCompGrp17AmountInDC
CostCompGrp18AmountInDC CostCompGrp18AmountInDC
CostCompGrp19AmountInDC CostCompGrp19AmountInDC
CostCompGrp20AmountInDC CostCompGrp20AmountInDC
CostCompGrp21AmountInDC CostCompGrp21AmountInDC
CostCompGrp22AmountInDC CostCompGrp22AmountInDC
CostCompGrp23AmountInDC CostCompGrp23AmountInDC
CostCompGrp24AmountInDC CostCompGrp24AmountInDC
CostCompGrp25AmountInDC CostCompGrp25AmountInDC
CostCompGrp26AmountInDC CostCompGrp26AmountInDC
CostCompGrp27AmountInDC CostCompGrp27AmountInDC
CostCompGrp28AmountInDC CostCompGrp28AmountInDC
CostCompGrp29AmountInDC CostCompGrp29AmountInDC
CostCompGrp30AmountInDC CostCompGrp30AmountInDC
CostCompGrp31AmountInDC CostCompGrp31AmountInDC
CostCompGrp32AmountInDC CostCompGrp32AmountInDC
CostCompGrp33AmountInDC CostCompGrp33AmountInDC
CostCompGrp34AmountInDC CostCompGrp34AmountInDC
CostCompGrp35AmountInDC CostCompGrp35AmountInDC
CostCompGrp36AmountInDC CostCompGrp36AmountInDC
CostCompGrp37AmountInDC CostCompGrp37AmountInDC
CostCompGrp38AmountInDC CostCompGrp38AmountInDC
CostCompGrp39AmountInDC CostCompGrp39AmountInDC
CostCompGrp40AmountInDC CostCompGrp40AmountInDC
_RepresentativeOrderItem _RepresentativeOrderItem

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_EBPC_COGM_CCGroup.
-- 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: PEBPRCOGMCCG
-- Parameters: P_Ledger : fins_ledger, P_FromFiscalYearPeriod : fins_fyearperiod, P_ToFiscalYearPeriod : fins_fyearperiod, P_CurrencyRole : fis_curtp, P_CostComponentStructure : ck_elesmhk

CREATE VIEW P_EBPC_COGM_CCGroup AS
SELECT
  _LdgrCompCodeCrcy.Ledger AS Ledger,
  _Costs.CompanyCode AS CompanyCode,
  _Costs.OrderID AS OrderID,
  OrderDescription,
  ObjectInternalID,
  cast(_RepresentativeOrderItem.Material as fco_rtwip_product preserving type) AS Material,
  Plant,
  ControllingArea,
  cast(_OrderKeyStatus.ControllingObjectStatus as fco_current_order_status) AS ControllingObjectStatus,
  cast(_OrderKeyStatus.StatusCode as fco_current_order_key_status) AS OrderKeyStatus,
  OrderCategory,
  OrderType,
  ProfitCenter,
  BusinessArea,
  ResponsibleCostCenter,
  ActualCostsCostingVariant,
  PlannedCostsCostingVariant,
  ExternalOrder,
  cast(_ActualOutpQty.ActualOutputQuantity as fis_actual_output_quantity) AS ActualOutputQuantity,
  cast(_RepresentativeOrderItem.BaseUnit as fis_meinh) AS BaseUnit,
  ScheduledBasicEndDate,
  ScheduledReleaseDate,
  ActualStartDate,
  ConfirmedEndDate,
  ActualDeliveryDate,
  ActualReleasedDate,
  TechnicalCompletionDate,
  cast(_RepresentativeOrderItem.MRPPlant as fis_co_pwerk) AS MRPPlant,
  cast(_RepresentativeOrderItem.StorageLocation as fis_lgort_d) AS StorageLocation,
  _RepresentativeOrderItem.ProductionVersion AS ProductionVersion,
  _RepresentativeOrderItem.SalesOrder AS SalesOrder,
  _RepresentativeOrderItem.SalesOrderItem AS SalesOrderItem,
  cast(_RepresentativeOrderItem.WBSElementInternalID as fco_ebpr_wbs_element_int_id preserving type ) AS WBSElementInternalID,
  _RepresentativeOrderItem.ValuationType AS ValuationType,
  CreatedByUser,
  CreationDate,
  LastChangedByUser,
  LastChangeDate,
  _LdgrCompCodeCrcy.Currency AS DisplayCurrency,
  cast (_Costs.TotalAmountInDisplayCrcy as fis_actlcost_in_dspcrcy) AS TotalAmountInDisplayCrcy,
  MfgOrderHasMultipleItems,
  CostCompGrp1AmountInDC,
  CostCompGrp2AmountInDC,
  CostCompGrp3AmountInDC,
  CostCompGrp4AmountInDC,
  CostCompGrp5AmountInDC,
  CostCompGrp6AmountInDC,
  CostCompGrp7AmountInDC,
  CostCompGrp8AmountInDC,
  CostCompGrp9AmountInDC,
  CostCompGrp10AmountInDC,
  CostCompGrp11AmountInDC,
  CostCompGrp12AmountInDC,
  CostCompGrp13AmountInDC,
  CostCompGrp14AmountInDC,
  CostCompGrp15AmountInDC,
  CostCompGrp16AmountInDC,
  CostCompGrp17AmountInDC,
  CostCompGrp18AmountInDC,
  CostCompGrp19AmountInDC,
  CostCompGrp20AmountInDC,
  CostCompGrp21AmountInDC,
  CostCompGrp22AmountInDC,
  CostCompGrp23AmountInDC,
  CostCompGrp24AmountInDC,
  CostCompGrp25AmountInDC,
  CostCompGrp26AmountInDC,
  CostCompGrp27AmountInDC,
  CostCompGrp28AmountInDC,
  CostCompGrp29AmountInDC,
  CostCompGrp30AmountInDC,
  CostCompGrp31AmountInDC,
  CostCompGrp32AmountInDC,
  CostCompGrp33AmountInDC,
  CostCompGrp34AmountInDC,
  CostCompGrp35AmountInDC,
  CostCompGrp36AmountInDC,
  CostCompGrp37AmountInDC,
  CostCompGrp38AmountInDC,
  CostCompGrp39AmountInDC,
  CostCompGrp40AmountInDC
FROM P_EBPC_COGM_CCGroup5
INNER JOIN P_CoEvtBsdOrderKeyStatus AS _OrderKeyStatus ON /* join condition not captured in parsed metadata */
INNER JOIN I_LedgerCompanyCodeCrcyRolesVH AS _LdgrCompCodeCrcy ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ProductCostCtrlgOrderItem AS _RepresentativeOrderItem ON _Costs.OrderID = _RepresentativeOrderItem.OrderID AND _RepresentativeOrderItem.OrderItem = '0001'  -- association [0..1]
;