2008 Jun 11 9:32 AM
Hello freinds,
I have to apply one check in selection screen.
means the difference between the date in selection screen should not be more than three month.
please suggest me how to do it.
Thanks,
Amar
2008 Jun 11 9:36 AM
Hi,
Use the function module SD_DATETIME_DIFFERENCE. This FM will give u the diff in days. Check if its more than 90. If it is then throw ur error message.
Thanks
Nayan
Hello freinds,
I have to apply one check in selection screen.
means the difference between the date in selection screen should not be more than three month.
please suggest me how to do it.
Thanks,
Amar
2008 Jun 11 9:36 AM
Hi,
Use the function module SD_DATETIME_DIFFERENCE. This FM will give u the diff in days. Check if its more than 90. If it is then throw ur error message.
Thanks
Nayan
2008 Jun 11 9:36 AM
use FM : HR_HK_DIFF_BT_2_DATES
to get the difference between two dates ...
At selection screen.
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
date1 = v_date2
date2 = v_date1
OUTPUT_FORMAT = '04'
IMPORTING
YEARS =
MONTHS = v_months
DAYS =
EXCEPTIONS
INVALID_DATES_SPECIFIED = 1
OTHERS = 2
.
if v_months > 3.
message e000 with 'difference should not be more than three months' .
endif.
2008 Jun 11 9:40 AM
Hi,
use the event AT SELECTION-SCREEN ON <w_date>
calculate the differece between two dates using the FM DAYS_BETWEEN_TWO_DATES and if the value is greater than 90 raise an error message.
Regards,
sriram
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |