P_SPP_PredictionDimension

DDL: P_SPP_PREDICTIONDIMENSION SQL: PSDSPPPDI Type: view COMPOSITE

P_SPP_PredictionDimension is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_SPP_PredictionPeriod) and exposes 8 fields.

Data Sources (1)

SourceAliasJoin Type
P_SPP_PredictionPeriod P_SPP_PredictionPeriod left_outer

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PSDSPPPDI view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (8)

KeyFieldSource TableSource FieldDescription
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
Division Division
SoldToParty SoldToParty
CustomerGroup CustomerGroup
Material Material
MaterialGroup MaterialGroup
BillingDocumentType BillingDocumentType
@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":""
}
}*/