@AbapCatalog.sqlViewName: 'PSDSPPPDI'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_SPP_PredictionDimension
as select distinct from I_BillingDocExtdItemBasic
left outer join P_SPP_PredictionPeriod
on CalendarDate = CalendarDate
{
SalesOrganization,
DistributionChannel,
Division,
SoldToParty,
CustomerGroup,
Material,
MaterialGroup,
BillingDocumentType
}
where StatisticalValueControl = ''
and BillingDocumentCategory != 'P'
and BillingDocumentIsTemporary = ''
and OverallBillingStatus <> 'C'
and ( SDDocumentCategory = 'M' // Invoice
or SDDocumentCategory = 'N' // Invoice Canceled
or SDDocumentCategory = 'O' // Credit Memo
or SDDocumentCategory = 'P' // Debit Memo
or SDDocumentCategory = 'S' // Credit Memo Canceled
or SDDocumentCategory = 'U' // Pro Forma Invoice
or SDDocumentCategory = '5' // Intercompany Invoice
or SDDocumentCategory = '6' // Intercompany Credit Memo
)
and BillingDocumentDate >= PredictionStartDate2
and BillingDocumentDate < PredictionEndDate
and NetAmount != 0
and NetAmount is not null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCEXTDITEMBASIC",
"P_SPP_PREDICTIONPERIOD"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/