C_COProductCostByOrder2
CO Product Cost By Order
C_COProductCostByOrder2 is a Consumption CDS View that provides data about "CO Product Cost By Order" in SAP S/4HANA. It reads from 1 data source (I_COProductCostByOrder) and exposes 40 fields with key field OrderID. It has 1 association to related views. Part of development package ODATA_PRODUCTION_COST_ANALYSIS.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_COProductCostByOrder | I_COProductCostByOrder | from |
Parameters (7)
| Name | Type | Default |
|---|---|---|
| P_FromFiscalYearPeriod | fins_fyearperiod | |
| P_ToFiscalYearPeriod | fins_fyearperiod | |
| P_PlanningCategory | fcom_category | |
| P_ResultAnalysisVersion | versn_abgr | |
| P_CostComponentGroup | char100 | |
| P_Language | sylangu | |
| P_CurrencyRole | fac_crcyrole |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_MaterialText | _MaterialText | $projection.Material = _MaterialText.Material |
Annotations (19)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CFIPRDTCOSTBYOR2 | view | |
| ClientHandling.type | #CLIENT_DEPENDENT | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | CO Product Cost By Order | view | |
| Search.searchable | true | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.lifecycle.status | #DEPRECATED | view | |
| VDM.lifecycle.successor | C_ProductCostByOrderQuery | view | |
| UI.headerInfo.typeName | Order | view | |
| UI.headerInfo.typeNamePlural | Orders | view | |
| UI.headerInfo.title.value | OrderID | view | |
| UI.headerInfo.description.value | MaterialName | view |
Fields (40)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OrderID | OrderID | Order ID | |
| ObjectInternalID | ObjectInternalID | Object number | ||
| OrderType | OrderType | Order Type | ||
| OrderCategory | OrderCategory | Order Category | ||
| ExternalOrder | ExternalOrder | Ext. order no. | ||
| OrderDescription | OrderDescription | |||
| Plant | Plant | Valuation Area | ||
| ProductionUnit | Unit of Measure | |||
| ControllingArea | ControllingArea | Controlling Area | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| BusinessArea | BusinessArea | Business Area | ||
| ProfitCenter | ProfitCenter | Profit Center | ||
| ResponsibleCostCenter | ResponsibleCostCenter | Responsible Cost Center | ||
| SalesOrder | SalesOrder | SD Document | ||
| MfgOrderHasMultipleItems | MfgOrderHasMultipleItems | |||
| ActualCostsCostingVariant | ActualCostsCostingVariant | Act. Costing Variant | ||
| CreatedByUser | CreatedByUser | User Name | ||
| CreationDate | CreationDate | Time Stamp | ||
| LastChangedByUser | LastChangedByUser | User Name | ||
| LastChangeDate | LastChangeDate | Time Stamp | ||
| TechnicalCompletionDate | TechnicalCompletionDate | |||
| Material | Material | Vehicle Model | ||
| MRPPlant | Plant | |||
| StorageLocation | StorageLocation | |||
| ProductionVersion | ProductionVersion | Version ID | ||
| ScheduledBasicEndDate | ScheduledBasicEndDate | Sched. finish | ||
| ScheduledReleaseDate | ScheduledReleaseDate | |||
| ActualStartDate | ActualStartDate | Actual Start | ||
| ConfirmedEndDate | ConfirmedEndDate | |||
| ActualReleasedDate | ActualReleasedDate | |||
| ControllingObjectStatus | ControllingObjectStatus | Status | ||
| ActualOutputQuantity | ActualOutputQuantity | |||
| PlanOutputQuantity | PlanOutputQuantity | |||
| ActlPlanDiffOutputQuantity | ||||
| MaterialName | ||||
| _CompanyCode | _CompanyCode | |||
| _Material | _Material | |||
| _CreatedByContactCard | _CreatedByContactCard | |||
| _LastChangedByUserContactCard | _LastChangedByUserContactCard | |||
| _MaterialText | _MaterialText |
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_COProductCostByOrder2.
-- 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: CFIPRDTCOSTBYOR2
-- Parameters: P_FromFiscalYearPeriod : fins_fyearperiod, P_ToFiscalYearPeriod : fins_fyearperiod, P_PlanningCategory : fcom_category, P_ResultAnalysisVersion : versn_abgr, P_CostComponentGroup : char100, P_Language : sylangu, P_CurrencyRole : fac_crcyrole
CREATE VIEW C_COProductCostByOrder2 AS
SELECT
OrderID,
ObjectInternalID,
OrderType,
OrderCategory,
ExternalOrder,
OrderDescription,
Plant,
cast(BaseUnit as fis_meinh) AS ProductionUnit,
ControllingArea,
CompanyCode,
BusinessArea,
ProfitCenter,
ResponsibleCostCenter,
SalesOrder,
MfgOrderHasMultipleItems,
ActualCostsCostingVariant,
CreatedByUser,
CreationDate,
LastChangedByUser,
LastChangeDate,
TechnicalCompletionDate,
Material,
cast(MRPPlant as fis_co_pwerk) AS MRPPlant,
cast(StorageLocation as fis_lgort_d) AS StorageLocation,
ProductionVersion,
ScheduledBasicEndDate,
ScheduledReleaseDate,
ActualStartDate,
ConfirmedEndDate,
ActualReleasedDate,
ControllingObjectStatus,
ActualOutputQuantity,
PlanOutputQuantity,
cast(ActlPlanDiffOutputQuantity as fis_actlplandiffoutputquantity) AS ActlPlanDiffOutputQuantity,
cast(_Material._Text[1: Language = $parameters.P_Language].MaterialName as fis_material_text) AS MaterialName
FROM I_COProductCostByOrder
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON Material = _MaterialText.Material -- association [0..*]
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA