P_PCCTgtCstForMTOOnPlanCost
Target cost for MTO order based on order plan cost
P_PCCTgtCstForMTOOnPlanCost is a Consumption CDS View that provides data about "Target cost for MTO order based on order plan cost" in SAP S/4HANA. It reads from 4 data sources (I_ProductCostCtrlgOrderItem, P_COMFGOrderPlanCost, R_MatlPriceSpclStockValnStrgy, P_COMFGOrderOutputQuantities) and exposes 45 fields with key fields Ledger, ControllingObject, OrderID, OrderItem, ProducedProduct.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_ProductCostCtrlgOrderItem | _Order | inner |
| P_COMFGOrderPlanCost | _PlanCost | from |
| R_MatlPriceSpclStockValnStrgy | _SOPrice | inner |
| P_COMFGOrderOutputQuantities | P_COMFGOrderOutputQuantities | inner |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_FromFiscalYearPeriod | fis_jahrper | |
| P_ToFiscalYearPeriod | fis_jahrper |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPCCTGTMTOPLN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.type | #CLIENT_DEPENDENT | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Target cost for MTO order based on order plan cost | view |
Fields (45)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Ledger | P_COMFGOrderPlanCost | Ledger | Ledger |
| KEY | ControllingObject | P_COMFGOrderPlanCost | ControllingObject | Object number |
| KEY | OrderID | P_COMFGOrderPlanCost | OrderID | Order ID |
| KEY | OrderItem | P_COMFGOrderPlanCost | OrderItem | |
| KEY | ProducedProduct | ProducedProduct | ||
| KEY | Material | P_COMFGOrderPlanCost | Material | Vehicle Model |
| KEY | CostOriginGroup | CostOriginGroup | Origin Group | |
| KEY | Plant | P_COMFGOrderPlanCost | Plant | Valuation Area |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | FiscalPeriod | FiscalPeriod | Tax period | |
| KEY | FiscalYearPeriod | FiscalYearPeriod | Period/Year | |
| KEY | GLAccount | GLAccount | General Ledger | |
| KEY | CompanyCode | P_COMFGOrderPlanCost | CompanyCode | Receiver Company Code |
| KEY | ControllingArea | P_COMFGOrderPlanCost | ControllingArea | Controlling Area |
| KEY | WorkCenterInternalID | WorkCenterInternalID | Work Center | |
| KEY | OrderOperation | OrderOperation | Operation or Phase | |
| KEY | PlanningCategory | PlanningCategory | Plan Category | |
| KEY | BusinessTransactionType | BusinessTransactionType | Bus.transaction | |
| KEY | OriginCostCenter | OriginCostCenter | ||
| KEY | OriginCostCtrActivityType | OriginCostCtrActivityType | ||
| KEY | PartnerCostCenter | PartnerCostCenter | Sender Cost Ctr | |
| KEY | PartnerCostCtrActivityType | PartnerCostCtrActivityType | Partner Cost Center Activity Type | |
| KEY | CostEstimateValidityStartDate | CostEstimateValidityStartDate | ||
| KEY | CostEstimateValidityEndDate | CostEstimateValidityEndDate | ||
| KEY | AccountAssignmentType | AccountAssignmentType | Sndr AcctAssgmt Type | |
| KEY | ControllingDebitCreditCode | ControllingDebitCreditCode | Dr/Cr ind. CO | |
| KEY | PartnerAccountAssignmentType | PartnerAccountAssignmentType | Partner Account Assignment Type | |
| KEY | GlobalCurrency | GlobalCurrency | GM Billing Element: Global Currency | |
| KEY | CompanyCodeCurrency | P_COMFGOrderPlanCost | CompanyCodeCurrency | Local Currency |
| KEY | IsLotSizeIndependent | IsLotSizeIndependent | ||
| KEY | CostingLotSize | CostingLotSize | ||
| KEY | LotSizeUnit | LotSizeUnit | Lot Size Unit | |
| KEY | CostSourceUnit | CostSourceUnit | ||
| KEY | SalesOrder | P_COMFGOrderPlanCost | SalesOrder | SD Document |
| KEY | SalesOrderItem | P_COMFGOrderPlanCost | SalesOrderItem | Sales Order Item |
| ValuationStrategy | ||||
| FreeDefinedCurrency1 | FreeDefinedCurrency1 | Freely Defined Currency 1 | ||
| FreeDefinedCurrency2 | FreeDefinedCurrency2 | Freely Defined Currency 2 | ||
| FreeDefinedCurrency3 | FreeDefinedCurrency3 | Freely Defined Currency 3 | ||
| FreeDefinedCurrency4 | FreeDefinedCurrency4 | Freely Defined Currency 4 | ||
| FreeDefinedCurrency5 | FreeDefinedCurrency5 | Freely Defined Currency 5 | ||
| FreeDefinedCurrency6 | FreeDefinedCurrency6 | Freely Defined Currency 6 | ||
| FreeDefinedCurrency7 | FreeDefinedCurrency7 | Freely Defined Currency 7 | ||
| FreeDefinedCurrency8 | FreeDefinedCurrency8 | Freely Defined Currency 8 | ||
| quan233else0endendasTotalQuantity |
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_PCCTgtCstForMTOOnPlanCost.
-- 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: PPCCTGTMTOPLN
-- Parameters: P_FromFiscalYearPeriod : fis_jahrper, P_ToFiscalYearPeriod : fis_jahrper
CREATE VIEW P_PCCTgtCstForMTOOnPlanCost AS
SELECT
_PlanCost.Ledger AS Ledger,
_PlanCost.ControllingObject AS ControllingObject,
_PlanCost.OrderID AS OrderID,
_PlanCost.OrderItem AS OrderItem,
ProducedProduct,
_PlanCost.Material AS Material,
CostOriginGroup,
_PlanCost.Plant AS Plant,
FiscalYear,
FiscalPeriod,
FiscalYearPeriod,
GLAccount,
_PlanCost.CompanyCode AS CompanyCode,
_PlanCost.ControllingArea AS ControllingArea,
WorkCenterInternalID,
OrderOperation,
PlanningCategory,
BusinessTransactionType,
OriginCostCenter,
OriginCostCtrActivityType,
PartnerCostCenter,
PartnerCostCtrActivityType,
CostEstimateValidityStartDate,
CostEstimateValidityEndDate,
AccountAssignmentType,
ControllingDebitCreditCode,
PartnerAccountAssignmentType,
GlobalCurrency,
_PlanCost.CompanyCodeCurrency AS CompanyCodeCurrency,
IsLotSizeIndependent,
CostingLotSize,
LotSizeUnit,
CostSourceUnit,
_PlanCost.SalesOrder AS SalesOrder,
_PlanCost.SalesOrderItem AS SalesOrderItem,
'2' AS ValuationStrategy,
FreeDefinedCurrency1,
FreeDefinedCurrency2,
FreeDefinedCurrency3,
FreeDefinedCurrency4,
FreeDefinedCurrency5,
FreeDefinedCurrency6,
FreeDefinedCurrency7,
FreeDefinedCurrency8,
sum( case when IsLotSizeIndependent = 'X' then TotalQuantity else case when PlanOutputQuantity <> 0 then cast( round(cast(division(ActualOutputQuantity, PlanOutputQuantity, 6) as abap.dec(14, 6)) * TotalQuantity, 3) as abap.quan(23, 3) ) else 0 end end ) as TotalQuantity AS quan233else0endendasTotalQuantity
FROM P_COMFGOrderPlanCost AS _PlanCost
INNER JOIN P_COMFGOrderOutputQuantities ON /* join condition not captured in parsed metadata */
INNER JOIN I_ProductCostCtrlgOrderItem AS _Order ON /* join condition not captured in parsed metadata */
INNER JOIN R_MatlPriceSpclStockValnStrgy AS _SOPrice ON /* join condition not captured in parsed metadata */
;
Learn More
- 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
- S/4HANA CDS View Deprecation: What You Need to Know
- 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