Hi,
So above code is your customer exit variable for your CALWEEK? Right?
What are your other filters? Do you have user entry variable?
For example, the date now is 9/9/2015 so CALWEEK will be filtered with value of 2..What you wanted to have is to get the 2nd week of previous month which is August? Is that right? If it is, then you also need a filter for your CALMONTH..
You can write a CMOD for your calmonth which will get the current month and do an OFFSET of -1..
OR
You can use the standard variable 0CMLMON to get the value of LAST MONTH..
Check other variables here:
Standard Variables in BEX related to Time Charcteristics
Regards,
Loed