on 2009 Oct 22 8:11 AM
Hi Experts,
I am using a variable for Date From to Date to in my Query. I had used the variable 0I_SPL_D which supplies two date Period from / Period To. My requirement is to give default values at run time from beginning of the month to current date of execution.
So that I can schedule the Query and Broadcast it.
eg If the report is run today ie on 22.0ct.2009 then both the ends must have the values
from date 01.10.2009 and
to date 22.10.2009
If the report is executed tomorrow the parameters should be
from date 01.10.2009 and
to date 23.10.2009
can any one give any idea
Thanks
Shivani
Hi RK,
Your solution worked for me Thanks a lot for solution . It was my silly mistake because of that the data was not coming OK
Thanks
Shivani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rk.
I tried the code given by u but could not get the desired result. In RSRT2 tcode I run the Query in debug mode there I put a break point but the code i s not working my break point is also not working. May be the system is not executing the code. Pl guide
Thanks
Shivani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this code.
WHEN 'Zvariable'
DATA: from_dy(2) type n,
from_mo(2) type n,
from_yr(4) type n,
from_d(8) type n,
Date_to TYPE sy-datum.
IF i_step = 1.
from_dy(2) ='01'.
from_mo = sy-datum+4(2).
from_yr = sy-datum+0(4).
concatenate from_yr from_mo from_dy into from_d.
Date_to = sy-datum.
CLEAR l_s_range.
MOVE from_d TO l_s_range-low.
MOVE Date_to TO l_s_range-high.
MOVE 'I' TO l_s_range-sign.
MOVE 'BT' TO l_s_range-opt.
APPEND l_s_range TO e_t_range.
ENDIF.
Regards,
Rk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think, you can get it through few lines in CMOD .
Search the forums with "i_step = 1" for more information about how to give default values.
Regards,
Anil Kumar Sharma .P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shivani,
You need to create a customer exit variable, in the exit need to write the code to get the low range value start date of the month and hight range value is current date. So when you execute the query it gives the default values.
Hope this helps.
Veerendra.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.