Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Display last 3 months from the entered date in SAP HANA

$
0
0

Hi All ,

 

 

I've a requirement to get the values for last 3 months from the month entered by the business through the Input parameter.

 

My Calmonth(Which is a string ) will be fetching data from the Input Parameter.

 

I've created 3 projections where each will take the value from input parameters and wanted to get month minus 1 , 2 and 3 respectively,but I'm not able to achieve it through this :

 

if((midstr("PERIOD",5,6) = midstr('$$INP_CALMONTH$$',5,6) - 1),"A",0)

 

and input parameter-1.

 

I've wrote both the above codes in Filter - Expression in a calculated view and it doesn't work .

 

The Calmonth format I've is : YYYYMM

 

Can anyone please help me in getting this ?

 

 

Regards,

Akhilesh


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>