@AbapCatalog.sqlViewName : 'PMFGORDTGTAPSBO'
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.buffering.status: #NOT_ALLOWED
@Metadata.ignorePropagatedAnnotations: true
@VDM.private:true
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
//@EndUserText.label : 'Target Costs Cube for Manufacturing Orders'
//On -the-fly target cost calculation only for manufacturing orders with order category 10/40
define view P_COMfgOrderTgtCostByObject
with parameters
//From /To fiscal year period should restrict actual output quantity only
//While plan cost and standard costs should be independent of fiscal year period
P_FromFiscalYearPeriod : fis_jahrper,
P_ToFiscalYearPeriod : fis_jahrper,
P_PlanningCategory : fcom_category
as select from P_COMFGOrderTargetCube(
P_FromFiscalYearPeriod : $parameters .P_FromFiscalYearPeriod,
P_ToFiscalYearPeriod : $parameters .P_ToFiscalYearPeriod,
P_PlanningCategory : $parameters .P_PlanningCategory )
{
key ControllingObject,
key OrderID,
//key CostOriginGroup,
// key CostSourceUnit,
// key GlobalCurrency,
// key CompanyCodeCurrency,
// sum( CreditTargetCostInGlobalCrcy ) as CreditTargetCostInGlobalCrcy,
// sum( DebitTargetCostInGlobalCrcy ) as DebitTargetCostInGlobalCrcy,
// sum( CreditTargetCostInCoCodeCrcy ) as CreditTargetCostInCoCodeCrcy,
// sum( DebitTargetCostInCoCodeCrcy ) as DebitTargetCostInCoCodeCrcy
sum( 0) as CreditTargetCostInGlobalCrcy,
sum( 0 ) as DebitTargetCostInGlobalCrcy,
sum( 0 ) as CreditTargetCostInCoCodeCrcy,
sum( 0 ) as DebitTargetCostInCoCodeCrcy
} //calculate either target costs @plan or target costs @standard costs
group by
ControllingObject,
OrderID
//CostOriginGroup,
// CostSourceUnit,
// GlobalCurrency,
// CompanyCodeCurrency
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"P_COMFGORDERTARGETCUBE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_COMfgOrderTgtCostByObject view