cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HANA input parameter

lakshminarasimhan_n4
Active Contributor
0 Kudos

Hi All,

In my HANA calculation view, i have an input parameter and it is based on column ""meth_date" of my calculation view and it is a mandatory variable. Now i need to take the date field entered in this input parameter then negate 1 with it to get the "Previous date".

The second input paramter must have a value (Entered date - 1).

Is this possible ?

BenedictV
Active Contributor
0 Kudos

Hi Lakshminarasimhan,

It would be nice, if you can tell us what you tried so far to help you better.

Accepted Solutions (0)

Answers (2)

Answers (2)

anindya_bose
Active Contributor

Yes, this is possible . Create one Input Parameter based on "Procedure/Scalar Function" . Whatever date your users are entering will go to the procedure and procedure would return you 'Previous Date" . Your data would be filtered with that . Check this blog post, this is written for month but you can use the same approach ( in fact much easier) for date .

Code to get previous date is as below :

END_DATE := TO_DATS (add_days( :INPUT_DATE ,-1)) ;

Cheers

Anindya

gopinath_kolli
Active Participant
0 Kudos

SELECT ADD_DAYS (TO_DATE ('2009-12-05', 'YYYY-MM-DD'), -30) "add days" FROM DUMMY;