P_EBPAO_TR_TotalVariance3

DDL: P_EBPAO_TR_TOTALVARIANCE3 SQL: PEBPAOTRTOTVARC3 Type: view COMPOSITE

P_EBPAO_TR_TotalVariance3 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_EBPAO_OrderContextForHdrOnly, P_EBPAO_TR_TotalVariance2) and exposes 11 fields with key fields CompanyCode, OrderID, OrderType, OrderCategory, ControllingArea.

Data Sources (2)

SourceAliasJoin Type
P_EBPAO_OrderContextForHdrOnly OrderContext from
P_EBPAO_TR_TotalVariance2 P_EBPAO_TR_TotalVariance2 inner

Parameters (4)

NameTypeDefault
P_Ledger fins_ledger
P_FromFiscalYearPeriod fins_fyearperiod
P_ToFiscalYearPeriod fins_fyearperiod
P_CurrencyRole fac_crcyrole

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PEBPAOTRTOTVARC3 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_EBPAO_OrderContextForHdrOnly CompanyCode
KEY OrderID P_EBPAO_OrderContextForHdrOnly OrderID
KEY OrderType P_EBPAO_OrderContextForHdrOnly OrderType
KEY OrderCategory P_EBPAO_OrderContextForHdrOnly OrderCategory
KEY ControllingArea P_EBPAO_OrderContextForHdrOnly ControllingArea
KEY Plant P_EBPAO_OrderContextForHdrOnly Plant
KEY StorageLocation P_EBPAO_OrderContextForHdrOnly StorageLocation
KEY ProfitCenter P_EBPAO_OrderContextForHdrOnly ProfitCenter
KEY Product P_EBPAO_OrderContextForHdrOnly Product
KEY ProductGroup P_EBPAO_OrderContextForHdrOnly ProductGroup
CostVarianceInDspCrcy
@AbapCatalog.sqlViewName: 'PEBPAOTRTOTVARC3'

@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@ClientHandling.algorithm: #SESSION_VARIABLE

@AccessControl.authorizationCheck: #NOT_REQUIRED

@VDM.private: true
@VDM.viewType: #COMPOSITE

define view P_EBPAO_TR_TotalVariance3
  with parameters
    P_Ledger               : fins_ledger,
    P_FromFiscalYearPeriod : fins_fyearperiod,
    P_ToFiscalYearPeriod   : fins_fyearperiod,
    P_CurrencyRole         : fac_crcyrole
  as select from P_EBPAO_OrderContextForHdrOnly                                        as OrderContext
    inner join   P_EBPAO_TR_TotalVariance2( P_Ledger               : :P_Ledger,
                                            P_FromFiscalYearPeriod : :P_FromFiscalYearPeriod,
                                            P_ToFiscalYearPeriod   : :P_ToFiscalYearPeriod,
                                            P_CurrencyRole         : :P_CurrencyRole ) as VarianceCost on  OrderContext.CompanyCode = VarianceCost.CompanyCode
                                                                                                       and OrderContext.OrderID     = VarianceCost.OrderID
{
  key OrderContext.CompanyCode,
  key OrderContext.OrderID,
  key OrderContext.OrderType,
  key OrderContext.OrderCategory,
  key OrderContext.ControllingArea,
  key OrderContext.Plant,
  key OrderContext.StorageLocation,
  key OrderContext.ProfitCenter,
  key OrderContext.Product,
  key OrderContext.ProductGroup,

      /* Variances */
      sum(VarianceCost.AmountInDisplayCurrency) as CostVarianceInDspCrcy
}
group by
  OrderContext.CompanyCode,
  OrderContext.OrderID,
  OrderContext.OrderType,
  OrderContext.OrderCategory,
  OrderContext.ControllingArea,
  OrderContext.Plant,
  OrderContext.StorageLocation,
  OrderContext.ProfitCenter,
  OrderContext.Product,
  OrderContext.ProductGroup
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_EBPAO_ORDERCONTEXTFORHDRONLY",
"P_EBPAO_TR_TOTALVARIANCE2"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/