Hi,
would like to check that a "from"-date is lower than a "to"-date.
***
DATA: l_date_from TYPE d,
l_date_to TYPE d.
IF l_date_from GE l_date_to.
// return error message
ENDIF.
***
Above you find the code that I have used so far, but it is not working correctly with some country specific date types. Is there anybody who have some suggestions how I can solve the problem?
Thank you in advance.
What about typing them as
dats
datum
or sy-datum?
You might need to convert them the Universial Times before comparison.
convert date syst_date time syst_time
into time stamp tstmp time zone ' '.
Kind Regards
Klaus
Hi Elvez
Your code should work since SAP stores all date data as 'yyyymmdd' and this is convenient for comparisons. However, there might be problems transfering date inputs from screen to these date variables.
Did you check out the contents of those fields by debugging?
*--Serdar
Add a comment