2008 May 28 1:08 PM
Hi all...
Iam having one date field in the selection screen....
so when i excuted the program i have to get exact five months back date as low range and current date as high range...
thank you,
Naveen
2008 May 28 1:18 PM
Hi,
do like this.
select-options:s_date for sy-datum.
data:past_date type sy-datum.
initialization.
s_date-high = sy-datum.
past_date = sy-datum.
past_date+4(2) = past_date+4(2) - 5.
IF past_date+4(2) <= 0.
past_date(4) = past_date(4) - 1.
past_date+4(2) = 12 - ( 5 - sy-datum+4(2) ).
ENDIF.
s_date-low = past_date.
append s_date.
rgds,
bharat.
Hi all...
Iam having one date field in the selection screen....
so when i excuted the program i have to get exact five months back date as low range and current date as high range...
thank you,
Naveen
2008 May 28 1:12 PM
you mean you want to display the dates on selection screen
itself?
then you can query in
At selection screen output
something like
select date from table where s_low = sy-datum-
i guess this is what you want ?
Hope it helps else if you clear a little bit more
2008 May 28 1:13 PM
hi naveen,
use this code
CALL FUNCTION 'CCM_GO_BACK_MONTHS'
EXPORTING
currdate = v_today
backmonths = 5
IMPORTING
NEWDATE = v_mback.
regards,
Peter
2008 May 28 1:15 PM
Hi,
1.Call this Function module in Initialization.
2.You can use the function module 'SALP_CALC_DATE'.
Pass 'M' to IN_RECTYPE, '-5' to IN_NBR_DWXMQY and current date to IN_DATE import parameters of the function module.
Regards,
Shiva kumar
2008 May 28 1:18 PM
Hi,
do like this.
select-options:s_date for sy-datum.
data:past_date type sy-datum.
initialization.
s_date-high = sy-datum.
past_date = sy-datum.
past_date+4(2) = past_date+4(2) - 5.
IF past_date+4(2) <= 0.
past_date(4) = past_date(4) - 1.
past_date+4(2) = 12 - ( 5 - sy-datum+4(2) ).
ENDIF.
s_date-low = past_date.
append s_date.
rgds,
bharat.
2008 May 28 1:24 PM
Hi
You can make use of the code below :
Ranges : gr_date for bsis-budat.
data : gv_datum like sy-datum.
CALL FUNCTION 'CCM_GO_BACK_MONTHS'
EXPORTING
currdate = sy-datum
backmonths = '5'
IMPORTING
newdate = gv_datum.
gr_date-sign = 'I'.
gr_date-option = 'BT'.
gr_date-low = gv_datum.
gr_date-high = sy-datum.
append gr_date.
Thanks,
Sriram Ponna.
2008 May 28 1:25 PM
Hi Naveen
try the following
data : bk_date type sy-datum.
select-options: so_date for sy-datum.
INITIALIZATION.
call function 'CCM_GO_BACK_MONTHS'
exporting
currdate = sy-datum
backmonths = 5
importing
newdate = bk_date.
.
clear so_date.
so_date-sign = 'I'.
so_date-option = 'BT'.
so_date-low = bk_date.
so_date-high = sy-datum.
append so_date.
reward if useful.
Regards
Prabumanoharan
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |