Dates in component filters


#1

Hello,

I am trying to create a component filter which shows the data of the last year in the component. I tried the following statement:

FILTER “BKPF”.“CPUDT” BETWEEN TODAY()-365 AND TODAY()

and also

FILTER “BKPF”.“CPUDT” > TODAY()-365

In both cases I get the following error:
"The component filter could not be updated: Operator implementation cound not be found or wrong types. Operator ‘SUB’ is not compatible with inputs of type DATE and LONG.

What am I doing wrong and is there any other possibility to use dates in component filters?

Best regards
Thomas


#3

Hi Thomas,

you should use FILTER “BKPF”.“CPUDT” BETWEEN ADD_DAYS(TODAY(), -365) AND TODAY();, and FILTER “BKPF”.“CPUDT” > ADD_DAYS(TODAY(), -365);

Cheers,
Denys


#4

Hi Denys,

this worked, thank you very much!

Best regards
Thomas