P_PCCOrderSpclStockValStrategy
Manufacturing Order Valuation Strategy
P_PCCOrderSpclStockValStrategy is a Composite CDS View that provides data about "Manufacturing Order Valuation Strategy" in SAP S/4HANA. It reads from 4 data sources (I_Ledger, P_ProductCostCtrlgOrderAndItem, R_MatlPriceSpclStockValnStrgy, P_ProductCostCtrlgOrderAndItem) and exposes 19 fields with key fields OrderID, OrderItem, ObjectInternalID, OrderItem, ObjectInternalID. Part of development package ODATA_PRODUCTION_COST_ANALYSIS.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_Ledger | _ledger | inner |
| P_ProductCostCtrlgOrderAndItem | _OrderAndItem | union |
| R_MatlPriceSpclStockValnStrgy | _ValuationStrategy | inner |
| P_ProductCostCtrlgOrderAndItem | P_ProductCostCtrlgOrderAndItem | from |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPCCORDVALSTR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OrderID | OrderID | ||
| KEY | OrderItem | OrderItem | ||
| KEY | ObjectInternalID | ObjectInternalID | ||
| Plant | Plant | |||
| Material | Material | |||
| OrderCategory | OrderCategory | |||
| OrderType | OrderType | |||
| SalesOrder | SalesOrder | |||
| SalesOrderItem | SalesOrderItem | |||
| OrderID | ||||
| KEY | OrderItem | P_ProductCostCtrlgOrderAndItem | OrderItem | |
| KEY | ObjectInternalID | ObjectInternalID | ||
| Plant | P_ProductCostCtrlgOrderAndItem | Plant | ||
| Material | P_ProductCostCtrlgOrderAndItem | Material | ||
| OrderCategory | P_ProductCostCtrlgOrderAndItem | OrderCategory | ||
| OrderType | P_ProductCostCtrlgOrderAndItem | OrderType | ||
| SalesOrder | P_ProductCostCtrlgOrderAndItem | SalesOrder | ||
| SalesOrderItem | P_ProductCostCtrlgOrderAndItem | SalesOrderItem | ||
| ValuationStrategy | CurPlanProjSlsOrdValnStrategy |
@AbapCatalog.sqlViewName: 'PPCCORDVALSTR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
// For Old Production Cost Analysis, only support leading ledger.
// The strategy only base on company code currency
define view P_PCCOrderSpclStockValStrategy
// MTS
as select from P_ProductCostCtrlgOrderAndItem
{
key OrderID,
key OrderItem,
key ObjectInternalID,
Plant,
Material,
OrderCategory,
OrderType,
SalesOrder,
SalesOrderItem,
cast('3' as ck_lbwst) as ValuationStrategy
}
where
(
InventorySpecialStockType = ''
or(
InventorySpecialStockType = 'E'
and InventorySpecialStockValnType = 'A'
)
)
and IsFixedPriceCoProduct = ''
and( // exclude Joint-Production Header
OrderItem is not initial // Order Item
or MfgOrderHasMultipleItems = '' // Not Joint-Production
)
and ActualReleasedDate is not initial // filters Released Orders only
and(
OrderCategory = '10'
or OrderCategory = '40'
)
and(
OrderIsEventBasedPosting = ''
or OrderIsEventBasedPosting = 'M'
)
// MTO
union select from P_ProductCostCtrlgOrderAndItem as _OrderAndItem
inner join R_MatlPriceSpclStockValnStrgy as _ValuationStrategy on _OrderAndItem.Plant = _ValuationStrategy.Plant
and _OrderAndItem.Material = _ValuationStrategy.Material
and _OrderAndItem.ValuationType = _ValuationStrategy.ValuationType
and _OrderAndItem.SalesOrder = _ValuationStrategy.SalesOrder
and _OrderAndItem.SalesOrderItem = _ValuationStrategy.SalesOrderItem
inner join I_Ledger as _ledger on _ledger.Ledger = _ValuationStrategy.Ledger
and _ledger.IsLeadingLedger = 'X'
{
key _OrderAndItem.OrderID,
key _OrderAndItem.OrderItem,
key ObjectInternalID,
_OrderAndItem.Plant,
_OrderAndItem.Material,
_OrderAndItem.OrderCategory,
_OrderAndItem.OrderType,
_OrderAndItem.SalesOrder,
_OrderAndItem.SalesOrderItem,
CurPlanProjSlsOrdValnStrategy as ValuationStrategy
}
where
(
InventorySpecialStockType = 'E'
and InventorySpecialStockValnType = 'M'
)
and IsFixedPriceCoProduct = ''
and CurrencyRole = '10'
and CurPlanProjSlsOrdValnStrategy is not initial
and MatlPrcValdtyEndFsclYearPeriod = '9999012'
and( // exclude Joint-Production Header
OrderItem is not initial // Order Item
or MfgOrderHasMultipleItems = '' // Not Joint-Production
)
and ActualReleasedDate is not initial // filters Released Orders only
and(
OrderCategory = '10'
or OrderCategory = '40'
)
and(
OrderIsEventBasedPosting = ''
or OrderIsEventBasedPosting = 'M'
)
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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