I_SalesAnalyticsCube

DDL: I_SALESANALYTICSCUBE SQL: ISDSLSANACUBE Type: view COMPOSITE

Analytics - Sales Volume and Open Sales

I_SalesAnalyticsCube is a Composite CDS View (Cube) that provides data about "Analytics - Sales Volume and Open Sales" in SAP S/4HANA. It reads from 1 data source (P_SalesAnalytics) and exposes 81 fields with key fields SalesDocument, SalesDocumentItem, ScheduleLine, BillingPlan, BillingPlanItem. It has 8 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_SalesAnalytics P_SalesAnalytics from

Parameters (2)

NameTypeDefault
P_ExchangeRateType kurst
P_DisplayCurrency vdm_v_display_currency

Associations (8)

CardinalityTargetAliasCondition
[0..1] I_Currency _DisplayCurrency $projection.DisplayCurrency = _DisplayCurrency.Currency
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[0..1] I_ShippingPoint _ShippingPoint $projection.ShippingPoint = _ShippingPoint.ShippingPoint
[0..1] I_BillingDocumentType _BillingDocumentType $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
[0..1] I_SDDocumentObject _SDDocumentObject $projection.SDDocumentObject = _SDDocumentObject.SDDocumentObject
[0..1] E_SalesDocumentItemBasic _Extension $projection.SalesDocument = _Extension.SalesDocument and $projection.SalesDocumentItem = _Extension.SalesDocumentItem
[0..1] E_DeliveryDocumentItem _DelivDocItemExtension $projection.DeliveryDocument = _DelivDocItemExtension.DeliveryDocument and $projection.DeliveryDocumentItem = _DelivDocItemExtension.DeliveryDocumentItem
[0..1] E_BillingDocumentItem _BillgDocItemExtension $projection.BillingDocument = _BillgDocItemExtension.BillingDocument and $projection.BillingDocumentItem = _BillgDocItemExtension.BillingDocumentItem

Annotations (15)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
EndUserText.label Analytics - Sales Volume and Open Sales view
Analytics.dataCategory #CUBE view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
Metadata.allowExtensions true view
AbapCatalog.sqlViewName ISDSLSANACUBE view
AbapCatalog.compiler.compareFilter true view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor I_SalesAnalyticsCube_1 view

Fields (81)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument
KEY SalesDocumentItem SalesDocumentItem
KEY ScheduleLine ScheduleLine
KEY BillingPlan BillingPlan
KEY BillingPlanItem BillingPlanItem
KEY DeliveryDocument DeliveryDocument
KEY DeliveryDocumentItem DeliveryDocumentItem
KEY BillingDocument BillingDocument
KEY BillingDocumentItem BillingDocumentItem
SoldToParty SoldToParty
SoldToPartyName SoldToPartyName
CustomerGroup CustomerGroup
Customer
SDDocumentCategory SDDocumentCategory
SDDocumentObject SDDocumentObject
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
Division Division
SalesOffice SalesOffice
SalesGroup SalesGroup
SalesDistrict SalesDistrict
Material Material
OriginallyRequestedMaterial OriginallyRequestedMaterial
InternationalArticleNumber InternationalArticleNumber
ProductHierarchyNode ProductHierarchyNode
MaterialGroup MaterialGroup
ProfitCenter ProfitCenter
BillingDocumentDateYear
BillingDocDateYearQuarter
BillingDocDateYearMonth
SalesDocumentType SalesDocumentType
DCLCheckforSalesDocumentShippingPoint
DCLCheckforDeliveryBillingDocumentType
CalendarDate
OpnSOForOrdReltdInvcsNetAmount OpnSOForOrdReltdInvcsNetAmount
OpnSOForOrdReltdInvcsNetAmtDC OpnSOForOrdReltdInvcsNetAmtDC
OpnSlsOrdsForOrdReltdInvcsQty OpnSlsOrdsForOrdReltdInvcsQty
OpnRetsForOrdReltdInvcsNetAmt OpnRetsForOrdReltdInvcsNetAmt
OpnRetsOrdReltdInvcsNetAmtInDC OpnRetsOrdReltdInvcsNetAmtInDC
OpnRetsForOrdReltdInvcsQty OpnRetsForOrdReltdInvcsQty
OpenSlsOrdersForDelivNetAmount OpenSlsOrdersForDelivNetAmount
OpnSlsOrdsForDelivAmtInDspCrcy OpnSlsOrdsForDelivAmtInDspCrcy
OpnSlsOrdrsForDelivQuantity OpnSlsOrdrsForDelivQuantity
OpnSlsOrdsForInvcPlansNetAmt OpnSlsOrdsForInvcPlansNetAmt
OpnSlsOrdsForInvcPlansNetAmtDC OpnSlsOrdsForInvcPlansNetAmtDC
OpnOutbDelivsForInvcNetAmt OpnOutbDelivsForInvcNetAmt
OpnOutbDelivsForInvcNetAmtInDC OpnOutbDelivsForInvcNetAmtInDC
OpnOutbDelivsForInvcQty OpnOutbDelivsForInvcQty
ShpdNotInvcdDelivsNetAmount ShpdNotInvcdDelivsNetAmount
2018newforCE1808SalesVolumeNetAmount
SlsVolumeNetAmtInDspCrcy SlsVolumeNetAmtInDspCrcy
SalesVolumeQuantity SalesVolumeQuantity
SalesProfitMarginNetAmount SalesProfitMarginNetAmount
SlsProfitMargNetAmtInDspCrcy SlsProfitMargNetAmtInDspCrcy
CustomerCreditMemoNetAmount CustomerCreditMemoNetAmount
CustCrdtMemoNetAmtInDspCrcy CustCrdtMemoNetAmtInDspCrcy
CustCreditMemoQuantity CustCreditMemoQuantity
DisplayCurrency
TransactionCurrency TransactionCurrency
StatisticsCurrency StatisticsCurrency
BaseUnit BaseUnit
_BillingDocumentType _BillingDocumentType
_SDDocumentObject _SDDocumentObject
_DisplayCurrency _DisplayCurrency
_StatisticsCurrency _StatisticsCurrency
_TransactionCurrency _TransactionCurrency
_BaseUnit _BaseUnit
_DistributionChannel _DistributionChannel
_Division _Division
_Material _Material
_MaterialGroup _MaterialGroup
_OriginallyRequestedMaterial _OriginallyRequestedMaterial
_SalesDistrict _SalesDistrict
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_SalesOrganization _SalesOrganization
_SoldToParty _SoldToParty
_ShippingPoint _ShippingPoint
_CustomerGroup _CustomerGroup
_Customer _Customer
_SDDocumentCategory _SDDocumentCategory
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@EndUserText.label: 'Analytics - Sales Volume and Open Sales'
@Analytics.dataCategory: #CUBE
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck:#CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@Metadata.allowExtensions: true
@AbapCatalog.sqlViewName: 'ISDSLSANACUBE'
@AbapCatalog.compiler.compareFilter: true

@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API 
@VDM.lifecycle.status:        #DEPRECATED
@VDM.lifecycle.successor:     'I_SalesAnalyticsCube_1'



///////////////////////////////////////////////////

// IMPORTANT NOTE  (23.2.2018)                   //

//                                               //

//The usage of this cube/query is deprecated.    //

//                                               //

//Please use query C_SalesAnalyticsQry_1         //

//  I_SalesAnalyticsCube_1 instead               //

//which fully supports cds extensibility.        //

//Extensibility now allows to handle the three   //

//SDDocuments: Orders, Deliveries and Invoices.  //

//                                               //

//Background: it was not feasible to change the  //

//            old/existing extensibility         //

//            registration                       //

///////////////////////////////////////////////////


define view I_SalesAnalyticsCube
with parameters
    P_ExchangeRateType : kurst,
    P_DisplayCurrency  : vdm_v_display_currency
  
as select from          P_SalesAnalytics(P_ExchangeRateType:$parameters.P_ExchangeRateType, P_DisplayCurrency: $parameters.P_DisplayCurrency)      as PSA
left outer to one join  I_CalendarDate        as Period                      on PSA.CalendarDate = Period.CalendarDate
association [0..1] to   I_Currency            as _DisplayCurrency            on  $projection.DisplayCurrency = _DisplayCurrency.Currency
association [0..1] to   I_Customer            as _Customer                   on  $projection.Customer = _Customer.Customer
association [0..1] to   I_ShippingPoint       as _ShippingPoint              on  $projection.ShippingPoint = _ShippingPoint.ShippingPoint
association [0..1] to   I_BillingDocumentType as _BillingDocumentType        on  $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
association [0..1] to   I_SDDocumentObject    as _SDDocumentObject           on  $projection.SDDocumentObject   = _SDDocumentObject.SDDocumentObject

//Extensibility

association [0..1] to E_SalesDocumentItemBasic  as _Extension    
                   on  $projection.SalesDocument = _Extension.SalesDocument and $projection.SalesDocumentItem = _Extension.SalesDocumentItem
                   
association [0..1] to E_DeliveryDocumentItem    as _DelivDocItemExtension    
                   on  $projection.DeliveryDocument = _DelivDocItemExtension.DeliveryDocument and $projection.DeliveryDocumentItem = _DelivDocItemExtension.DeliveryDocumentItem
    
association [0..1] to E_BillingDocumentItem     as _BillgDocItemExtension    
                   on  $projection.BillingDocument = _BillgDocItemExtension.BillingDocument and $projection.BillingDocumentItem = _BillgDocItemExtension.BillingDocumentItem
{
//key

  key SalesDocument,
  key SalesDocumentItem,
  key ScheduleLine,
  key BillingPlan,
  key BillingPlanItem,
  key DeliveryDocument,
  key DeliveryDocumentItem,
  key BillingDocument,
  key BillingDocumentItem,

//Dimensions


  //Customer

  @ObjectModel.foreignKey.association: '_SoldToParty'
  SoldToParty,
  SoldToPartyName,   
  CustomerGroup,
  @ObjectModel.foreignKey.association: '_Customer'
  cast (SoldToParty as kunnr) as Customer,
  
  // ----- Category -----

  @ObjectModel.foreignKey.association: '_SDDocumentCategory'
  SDDocumentCategory,  
  @ObjectModel.foreignKey.association: '_SDDocumentObject'
  SDDocumentObject, 

  //Organization

  @ObjectModel.foreignKey.association: '_SalesOrganization'
  SalesOrganization,
  @ObjectModel.foreignKey.association: '_DistributionChannel'
  DistributionChannel,
  @ObjectModel.foreignKey.association: '_Division'
  Division,
  
  //Team View

  @ObjectModel.foreignKey.association: '_SalesOffice'
  SalesOffice,
  @ObjectModel.foreignKey.association: '_SalesGroup'
  SalesGroup,
  
  //Geographics

  @ObjectModel.foreignKey.association: '_SalesDistrict'
  SalesDistrict,
  
  //Product

  @ObjectModel.foreignKey.association: '_Material'
  Material,
  @ObjectModel.foreignKey.association: '_OriginallyRequestedMaterial'
  OriginallyRequestedMaterial,
  InternationalArticleNumber,
  ProductHierarchyNode,
  @ObjectModel.foreignKey.association: '_MaterialGroup'
  MaterialGroup,
  ProfitCenter,
  
  //Time Period

  @Semantics.calendar.year
  cast(Period.CalendarYear as billing_document_date_year)       as         BillingDocumentDateYear,
  @Semantics.calendar.yearQuarter
  cast(Period.YearQuarter as billing_doc_date_year_quarter)     as         BillingDocDateYearQuarter,
  @Semantics.calendar.yearMonth
  cast(Period.YearMonth as billing_doc_date_year_month)         as         BillingDocDateYearMonth,


  // Misc (for DCL, I_CalenderDate-join)

  SalesDocumentType,    -- DCL Check for SalesDocument
  @ObjectModel.foreignKey.association: '_ShippingPoint'
  ShippingPoint,        -- DCL Check for Delivery
  BillingDocumentType,  -- DCL Check for Billing
  PSA.CalendarDate,     -- for joining I_calendarDate & CurrencyConversion
  CreationDate,     
  
  cast( case when SDDocumentCategory = 'C'
  then SalesDocument
  --else ''
  end as vdm_sales_order ) as SalesOrder,
      

//Measures

  //Measures Sales Document Item

  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  OpnSOForOrdReltdInvcsNetAmount,
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  OpnSOForOrdReltdInvcsNetAmtDC,
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  OpnSlsOrdsForOrdReltdInvcsQty,

  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  OpnRetsForOrdReltdInvcsNetAmt ,
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  OpnRetsOrdReltdInvcsNetAmtInDC ,
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  OpnRetsForOrdReltdInvcsQty ,


  //Measures Schedule Line

  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  OpenSlsOrdersForDelivNetAmount,
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  OpnSlsOrdsForDelivAmtInDspCrcy,
  
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  OpnSlsOrdrsForDelivQuantity,
  
 //Measures for Billing Plan Due Date 

  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  OpnSlsOrdsForInvcPlansNetAmt,
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  OpnSlsOrdsForInvcPlansNetAmtDC,
 
  //Measures Delivery Document Item

  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  OpnOutbDelivsForInvcNetAmt, 
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  OpnOutbDelivsForInvcNetAmtInDC, 
     
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  OpnOutbDelivsForInvcQty,
  
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  ShpdNotInvcdDelivsNetAmount,              --AT 25.4.2018: new for CE1808
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  ShpdNotInvcdDelivsNetAmtInDC,             --AT 25.4.2018: new for CE1808
  
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  ShpdNotInvcdDelivsQuantity,               --AT 25.4.2018: new for CE1808
  
  //Measures Billing Document Item

  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  SalesVolumeNetAmount, 
  
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  SlsVolumeNetAmtInDspCrcy,  
  
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  SalesVolumeQuantity,
  
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  SalesProfitMarginNetAmount, 
  
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  SlsProfitMargNetAmtInDspCrcy, 
    
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  CustomerCreditMemoNetAmount, 
  
  @DefaultAggregation: #SUM
  @Semantics.amount.currencyCode: 'DisplayCurrency'
  CustCrdtMemoNetAmtInDspCrcy,
  
  @DefaultAggregation: #SUM
  @Semantics.quantity.unitOfMeasure: 'BaseUnit'
  CustCreditMemoQuantity,
  
  @Semantics.currencyCode: true
  @ObjectModel.foreignKey.association: '_DisplayCurrency'
  cast(:P_DisplayCurrency as vdm_v_display_currency)   as         DisplayCurrency,
  @Semantics.currencyCode: true
  @ObjectModel.foreignKey.association: '_TransactionCurrency'
  TransactionCurrency,
  @Semantics.currencyCode: true
  @ObjectModel.foreignKey.association: '_StatisticsCurrency'
  StatisticsCurrency,
  @Semantics.unitOfMeasure: true
  @ObjectModel.foreignKey.association: '_BaseUnit'
  BaseUnit,

//Associations

  _BillingDocumentType,
  _SDDocumentObject,
  _DisplayCurrency,
  _StatisticsCurrency,
  _TransactionCurrency,
  _BaseUnit,
  _DistributionChannel,
  _Division,
  _Material,
  _MaterialGroup,
  _OriginallyRequestedMaterial,
  _SalesDistrict,
  _SalesOffice,
  _SalesGroup,
  _SalesOrganization,
  _SoldToParty,
  _ShippingPoint,
  _CustomerGroup,
  _Customer,
  _SDDocumentCategory

}
                                                                                             
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CALENDARDATE",
"P_SALESANALYTICS"
],
"ASSOCIATED":
[
"E_BILLINGDOCUMENTITEM",
"E_DELIVERYDOCUMENTITEM",
"E_SALESDOCUMENTITEMBASIC",
"I_BILLINGDOCUMENTTYPE",
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERGROUP",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_MATERIAL",
"I_MATERIALGROUP",
"I_SALESDISTRICT",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SDDOCUMENTCATEGORY",
"I_SDDOCUMENTOBJECT",
"I_SHIPPINGPOINT",
"I_UNITOFMEASURE"
],
"BASE":
[
"P_SALESANALYTICS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/