SAP for Retail Blogs
Gain insights and practical tips to captivate customers, optimize your supply chain, and drive growth with SAP for Retail software. Share your own insights!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

SAP Fiori analytical apps, such as those provided with SAP Customer Activity Repository, rely on data aggregated by SAP HANA views.  Not just a little data, mind you, but massive amounts of transactional data. Retrieving all this unrestricted data in SAP HANA and rendering it in SAP Fiori can translate into performance results which are simply unacceptable to your customers.

As a developer, one way to retrieve only the data your customers need is by applying a filter to your calculation views in SAP HANA Studio. Filters are expressions which limit the data that is retrieved. For instance you can restrict the data retrieved based on the date or SAP client using filter expressions.

The filters can be found by looking at the graphical view components in SAP HANA studio and by locating the filter icon (a yellow funnel symbol). It can be seen in the top right corner of the projection/aggregation:

When selecting such a component, locate the Output window in SAP HANA studio:



You can double click on Expression and open the “Filter Expression” window:



The following tables detail the filter parameters that are present in the calculation views consumed by the SAP Fiori applications.

Each table outlines the calculation view for which filter expressions exist. The underlying projection where the filter expression is applied is also listed.

Note: The information displayed in the following tables describes the settings applied to SAP HANA content delivered with SAP Customer Activity Repository 2.0 FP1.  To inspect real-time settings in your environment, you can use the Auto-Documentation feature available in SAP HANA Studio.

To create the auto documentation proceed as follows:

  1. In the SAP HANA Studio, choose Window -> Open Perspective -> Modeler.
  2. On the Quick Launch tab page, choose Auto Documentation.
  3. Choose the package and choose Add.
  4. Enter a target location path and choose Finish.

One PDF document is created for each view.

Common Views Consumed By All 5 Fiori Applications

Calculation View

Filter Parameter

View On Which This Filter Is Applied

ArticleInventoryVisibilityQuery

"SAPClient" ='$$P_SAPClient$$'

InventoryVisibility

ArticleNetSales

"SAPClient" ='$$P_SAPClient$$'



MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

"DataStatus" != '1'

ArticleSales

"SAPClient" ='$$P_SAPClient$$'

/POSDW/TLOGF

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

RECORDQUALIFIER" = 5

/POSDW/TLOGF

"BUSINESSTYPE" = '1'

"TRANSDEBITFLAG" != 'X'

"DISTVOID" != 'X'

"TRAININGFLAG" != 'X'

in("RETL_ITEM_CAT",'A','B','C','D')

"TASK_CANCELED" != 'X'

"DATASTATUS" != '1'

BillingDocumentItem

(in ("SDDocumentCategory",'M','O')

VBRK_COM

"BillingDocumentIsCancelled" != 'X')

CurrentPeriod

"Date_E" = "CurrentDate"

Date(Date_1)

PreviousPeriod

"Date_E" = "CurrentDate"

"Date_E" >= '$$P_PreviousPeriodStartDate$$' AND "Date_E" <= '$$P_PreviousPeriodEndDate$$'

Average Transaction Value Fiori Application

Calculation View

Filter Parameter

View On Which This Filter Is Applied

AverageTransactionValueBase

"SAPClient" ='$$P_SAPClient$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

MultiChannelSales_V2

"DataStatus" != '1'

MultiChannelSales_V2

Gross Margin Fiori Application

Calculation View

Filter Parameter

View On Which This Filter Is Applied

GrossMargin

"SAPClient" ='$$P_SAPClient$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

MultiChannelSales_V2

"DataStatus" != '1'

MultiChannelSales_V2

GrossMarginBase

"SAPClient" ='$$P_SAPClient$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

MultiChannelSales_V2

"DataStatus" != '1'

MultiChannelSales_V2

Net Sales Fiori Application

Calculation View

Filter Parameter

View On Which This Filter Is Applied

NetSales

"SAPClient" ='$$P_SAPClient$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

MultiChannelSales_V2

"DataStatus" != '1'

MultiChannelSales_V2

NetSalesBase

"SAPClient" ='$$P_SAPClient$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

MultiChannelSales_V2

"DataStatus" != '1'

MultiChannelSales_V2

Number Of Sales Items Per Transaction Fiori Application

Calculation View

Filter Parameter

View On Which This Filter Is Applied

NumberOfSalesItemsPerTransactionBase

"SAPClient" ='$$P_SAPClient$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

MultiChannelSales_V2

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

MultiChannelSales_V2

"DataStatus" != '1'

MultiChannelSales_V2

The following is a table outlining all the calculation views which do not have filter parameters setup:

Application

Calculation Views that do not have filter parameters

Average Transaction Value

AverageTransactionValueItemOverview

AverageTransactionValueHdr

AverageTransactionValueCurPerdQuery

AverageTransactionValueByStore

AverageTransactionValueByRegion

AverageTransactionValueByOC

AverageTransactionValueByCountry

AverageTransactionValueByCity

AverageTransactionValueByCategory

Gross Margin

GrossMarginCurPerdQuery

GrossMarginTopBottomByCategory

GrossMarginTopBottomByCity

GrossMarginTopBottomByCountry

GrossMarginTopBottomByRegion

GrossMarginTopBottomByStore

InventoryVisibility

MaterialGroupQuery

Net Sales

NetSalesCurPerdQuery

NetSalesHdrQuery

NetSalesQuery

NetSalesTopBotomByCategory

NetSalestopBottomByCity

NetSalestopBottomByCountry

NetSalestopBottomByRegion

NetSalestopBottomByStore

Number Of Transactions

NumberOfTransactionsBase

NumberOfTransactionsByCategory

NumberOfTransactionsByCity

NumberOfTransactionsByCountry

NumberOfTransactionsByOC

NumberOfTransactionsByRegion

NumberOfTransactionsByStore

NumberOfTransactionsCurPerdQuery

NumberOfTransactionsHdr

NumberOfTransactionsItemsOverview

Number of Sales Items Per Transaction

NumberOfSalesItemsPerTransactionByCategory

NumberOfSalesItemsPerTransactionByCity

NumberOfSalesItemsPerTransactionByCountry

NumberOfSalesItemsPerTransactionByCity

NumberOfSalesItemsPerTransactionByCategory

NumberOfSalesItemsPerTransactionByOC

NumberOfSalesItemsPerTransactionByRegion

NumberOfSalesItemsPerTransactionByStore

NumberOfSalesItemsPerTransactionHdr

NumberOfSalesItemsPerTransactionItemOverview

NumberOfSlsItemsPerTransCurPerdQuery

Common views for all applications

ArticleNetSalesQuery

ArticleSalesInventoryVisibilityQuery

PlantQuery

OrderChannel

The following table provides a description of the filter parameters:

Filter Expression

Description

"SAPClient" ='$$P_SAPClient$$'

Client determined by input parameter. Will retrieve only the transactions associated to this specific SAP Client.

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

The date range (weekly, monthly or range) provided here will limit the transaction data retrieved from billing documents for the “current period” data in the Fiori applications.

CurrentPeriod > Previous Period > Previous Period Last Year

"BillingDocumentDate" >= '$$P_PreviousPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_PreviousPeriodEndDate$$'

The date range (weekly, monthly or range) provided here will limit the transaction data retrieved from billing documents for the “previous period” data in the Fiori applications.

CurrentPeriod > Previous Period > Previous Period Last Year

"BillingDocumentDate" >= '$$P_CurrentPeriodLastYearStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodLastYearEndDate$$'

The date range (weekly, monthly or range) provided here will limit the transaction data retrieved from billing documents for the “current period last year” data in the Fiori applications.

CurrentPeriod > Previous Period > Previous Period Last Year

"SAPClient" ='$$P_SAPClient$$'

Client determined by input parameter. Will retrieve only the transactions associated to this specific SAP Client.

"BillingDocumentDate" >= '$$P_CurrentPeriodStartDate$$' and "BillingDocumentDate" <= '$$P_CurrentPeriodEndDate$$'

Only retrieve certain range of data: Current Period

RECORDQUALIFIER" = 5

Line item level data only is retrieved and displayed in the application, coming only from the retail transaction item data (5)

"BUSINESSTYPE" = '1'

Only the data for the transaction of the type “Sales” will be retrieved and displayed in the Fiori application

"TRANSDEBITFLAG" != 'X'

Only the data for the transaction of the type “Credit” will be retrieved and displayed in the Fiori application

"DISTVOID" != 'X'

Ensure that the data is not voided

"TRAININGFLAG" != 'X'

Filter flagged training must not be labeled for the transaction data to be retrieved and displayed in the Fiori Application

in("RETL_ITEM_CAT",'A','B','C','D')

Only the data for the items of category “A,B,C or D” (namely Sale of Goods, Service, Deposit, Gift Card Or Store Card Sales ) will be retrieved and displayed in the Fiori application.

"TASK_CANCELED" != 'X'

Ensure that the associated task was not cancelled

"DATASTATUS" != '1'

The data from non-erroneous transactions only will be retrieved and displayed in the Fiori applications

(in ("SDDocumentCategory",'M','O')

Only the data from the sales document of the category M (invoice) or O (credit) will be retrieved and displayed in the Fiori application

"BillingDocumentIsCancelled" != 'X')

Make sure that the Billing documents retrieved were not cancelled

"Date_E" = "CurrentDate"

Only retrieve certain range of data: Current date

"Date_E" >= '$$P_PreviousPeriodStartDate$$' AND "Date_E" <= '$$P_PreviousPeriodEndDate$$'

Only retrieve certain range of data: Previous Period

For more information on applying filters in SAP HANA Studio, see http://help.sap.com/hana_platform -> Development and Modeling -> SAP HANA Modeling Guide -> Creating Calculation Views and Previewing its Output -> Create Graphical Calculation Views -> Working With View Nodes -> Filter Output of Aggregation or Projection View Nodes.