Question:
Hello All,
When user executes the report, BW throws variable screen. Now I wanted to set dynamic default value in the variable screen. Take an instance, if user execute report in Mar05, CALMONTH variable should be having default value Feb05 (Previous month). I know that it can be done using Customer exit. But I never wrote as of now. Could you please throw light on following…….
1.Explain the complete procedure to create a customer exit?
I really appreciate if you send in sample code for similar functionality as well.
Thanks in advance,
Harsh.
Answer:
You do not need to write a customer exit to do this. There is already an SAP supplied variable for 0CALMONTH that gets the Current Calendar Month (0CMONTH). If you use this variable with an offset of -1, it will produce a report for the previous month.
Hope this helps...
Bob
Answer:
Hello ,
I tried to use current calendars month variable with offset equal to -1. But in this case, report gets executed without prompting variable screen to user. My requirement is to write only dynamic default value in the variable that to previous month in case of CALMonth variable. Can I use SAP Exit (Current calendar month) in the user exit? If yes then I can do -1 and achieve the previous month value and can set the default value using user exit.
Please let me know the process to do the above stated thing.
Thanks