08-22-2007 3:26 PM
Hi Gurus,
I need to pass one of my date which is stored in v_date to the range of my dates stored in v_01 and v_02 and see if the v_date lies in between v_01 and v_02 using between syntax, can you help me out how to do it.
Thanks
Rajeev Gupta
08-22-2007 3:39 PM
DATA : v_fdate TYPE sy-datum,
v_ldate TYPE sy-datum.
IF sy-datum BETWEEN v_fdate AND v_ldate.
write 'Is between'.
ENDIF.
08-22-2007 3:36 PM
Hi Rajeev,
Try this way,
Data: Begin of it_date occurs 100,
date type sy-datum.
End of it_date.
if v_date ge v_01 and v_date le v_02.
it_date-date = v_date
append it_date.
endif.
Sort it_date.
Hopes it will help you.
Ali
08-22-2007 3:38 PM
Thanks for the reply Ali
Can you tell me how to achieve this thing using Between syntax.
Tahnks
Rajeev Gupta
08-22-2007 3:39 PM
DATA : v_fdate TYPE sy-datum,
v_ldate TYPE sy-datum.
IF sy-datum BETWEEN v_fdate AND v_ldate.
write 'Is between'.
ENDIF.
08-22-2007 3:40 PM
Hi,
You can create a ranges table of the date and then use this:
v_date in lr_date where lr_date is the ranges tabel for the date.
Hope it works.
Thanks,
Sandeep.
08-22-2007 3:40 PM
selection screen validation we can achieve using the at selection-screen event...
U can check the conditionthere by writing query or as per ur wish
REWARD IF USEFUL
08-22-2007 3:41 PM
LOOP AT ztab WHERE mahns = ztab-mahns
...
AND date BETWEEN ztab-date1 and ztab-date2.
ENDLOOP.
IF sy-subrc = 0.
MESSAGE e000(yp) WITH text-e02.
regards,
srinivas
<b>*reward for useful answers*</b>