Showing posts with label input-parameters. Show all posts
Showing posts with label input-parameters. Show all posts

Friday, 12 May 2017

SAP HANA passing value from one input parameter to other for filtering table

I am going to explain how to pass value from one input parameter to other parameter and filter the underlying table without any process change in the view.

CV_xxx_BASE View before changes

Configuration of input parameter in current view was as under

Parameter Type : Direct

Semantic Type : Date

Data Type : Date

Monday, 20 June 2016

ABAP CDS View with input parameters

ABAP CDS Views:

A CDS is defined for existing database tables and any other views or CDS Views in ABAP Dictionary using the statement DEFINE VIEW in the DDL in ABAP Core Data Services(CDS) . This is done in CDS Source code in the ABAP Development tools(ADT). Every CDS view has its own CDS Source code.

Two objects are created in ABAP Dictionary of Every CDS View:

  • CDS Database View : It is read-only classical database view in ABAP Dictionary.
  • CDS Entity: It is actual CDS view. It covers the CDS Database view and makes other attributes possible, such as authorization checks defined in CDS view

Monday, 6 June 2016

How to get abap date in HANA calculated column and calculate date difference

I had a requirement to find the date difference from the field LETZTZUG of table s032 and the current date.
Here the problem was getting the current date. I got the current date using now() function in calculated column functions.
The output of the now() was in yyyy-mm-dd hrs and second. I used date(now()) and got it as yyyy-mm-dd.
With this I was still not able to use daysbetween in order to find the duedate betwen LETZTZUG  and currentdate.
Then I used replace() function to eliminate '-' from the yyyy-mm-dd. So after that I could calculate the daysbetween().

Tuesday, 12 April 2016

HANA Input Parameters with texts

Introduction

On one hand HANA Variables are easy to use and, mostly, perform well on well-modeled HANA views. There are always exceptions with big tables where join happens at a very granular level, then it is smarter to use Input Parameters, mapped through nested layers of HANA views instead of just a Variable in the topmost one. Performance-wise you can achieve a saving of 20-50% (personal observations), but then it comes a little tricky with introducing both keys and texts in Value Help.

An example:
  • You have a basic view joining the tables BSEG & BKPF
  • This basic view is used in Reporting view
HANA Input Parameters with texts
Basic view

Saturday, 19 March 2016

Input Parameter with Key and Text in view help ( F4)

This blog would explain how we can use both Key and Text in  view help ( f4 values) of  HANA Calculation View

***Now this functionality has been added to SPS10, if you are at SPS10 or above, you no longer need this work around ***

Scenario :

Users want to filter data by Customer and see Customer Text in view help along with number . As the table has billions of rows, to improve report performance , we want to use Input Parameter in Projection Filter .  Available types of Input Parameter in SPS9 cannot use Key and Text both directly in View Help or F4 values.

Our Data Model is Calculation View .  Input Parameter behaves differently in Calculation View and Analytic View.