P_PCCORDERSPCLSTOCKVALSTRATEGY
Manufacturing Order Valuation Strategy
P_PCCORDERSPCLSTOCKVALSTRATEGY is a CDS View in S/4HANA. Manufacturing Order Valuation Strategy. It contains 5 fields. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_COMFGOrderTargetCube | view | from | COMPOSITE | Target Costs Cube for Manufacturing Orders |
| P_COMFGOrderTargetCube | view | union_all | COMPOSITE | Target Costs Cube for Manufacturing Orders |
Fields (5)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | OrderCategory | OrderCategory | 1 |
| KEY | OrderID | OrderID | 1 |
| KEY | OrderItem | OrderItem | 1 |
| KEY | OrderType | OrderType | 1 |
| KEY | Plant | Plant | 1 |
@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'
)