I am working on CDS view where I need to pass the date value. This date should be current date minus 12 months.
Please see below code, where first commented line works fine in my CDS view. Now I want to pass (Current date - 12 months ) instead of '20180122'.
Please guide how can I achieve that. I am trying to use ADD_MONTHS function but it does not work. Please 2nd line of code.
Thanks!
define view ZPO //as select from P_OverduePO(P_StartDate : '20180122' , P_EndDate : $session.system_dat ) as P_OverduePO as select from P_OverduePO(P_StartDate : ADD_MONTHS ($session.system_date, -12), P_EndDate : $session.system_date ) as P_OverduePO