‎2006 Dec 03 12:21 PM
Hi All,
I want validate the date field
i was given 113006 make this date as 11.30.06 then this date is validate is in correct ot not
from the flat file the given date : 113006
then convert into
data : v_date(8)
using concatenate mm'.'dd'.yy into v_date.
once we convert into this formate 11.30.06
Example : 11.30.06 Correct
13.12.06 Error
How to validate above example
plz send me he samle code
i look forward to ypur reply
Thanks & Regards
SEK
‎2006 Dec 03 12:27 PM
Try to use the conversion exits, CONVERT_DATE_TO_EXTERNAL. For invalid date it through exceptions.
Regards
Kathirvel
‎2006 Dec 03 12:31 PM
‎2006 Dec 03 12:38 PM
Hi
U can use fm DATE_CHECK_PLAUSIBILITY, but you have to transfer the date in YYYYMMDD format:
data : v_date(8),
CHECK_DATE TYPE SY-DATUM.
CONCATENATE FILE-DATE(2) '.'
FILE-DATE+2(2) '.'
FILE-DATE+4(2) INTO V_DATE.
CHECK_DATE(2) = '20'.
CHECK_DATE+2(2) = FILE-DATE+4(2).
CHECK_DATE+4(2) = FILE-DATE(2).
CHECK_DATE+6(2) = FILE-DATE+2(2).So you can transfer CHECK_DATE to fm DATE_CHECK_PLAUSIBILITY.
Max