2020 Jul 24 3:21 PM
Good day,
I'm wondering how to select with date range? but my input should be Type:Int.
In my example below I have entered parameter type date and used it in the where condition
but I wanted to do something like this one but ended up with errors
calday between ( $session.system_date - $parameters.inputInt ) and $session.system_date
I wanted to avoid sy-datum - X, then passing the result as parameter
define view ZCDS_STAT_OLAP
with parameters from_date : rsddstatday
as select from rsddstat_olap as olap
{
key handletp,
key steptp,
key stepcnt,
key uname,
key calday,
runtime,
infoprov,
objname
} where runtime > 20
and calday between $parameters.from_date and $session.system_date
Thank you for your help!
2020 Jul 28 5:09 PM
Hi mchua9
I faced somewhat similar issue while using system date in where clause...
I created normal view where I converted date field using below function:
tstmp_to_dats( CONFIRMED_AT, abap_system_timezone( $session.client,'NULL' ), $session.client, 'NULL' ) as ConfirmedDate,
this returns me date in format YYYY-MM-DD in result.
then I created one consumption view and called original view and then I was able to pass system date in were clause on CONFIRMED_AT field.
Hope this helps...
Thanks-
Abhishek