‎2007 Jan 11 3:05 PM
Hi,
Any body tell me what is the function module to validate the date.
and is there any function module to check both the dates date1 and date2. Please send me all the function modules regarding all the date validations and to check the dates. Very urgent........
Thanks.........
‎2007 Jan 11 3:11 PM
Hi anil,
1. DATE_CONVERT_TO_FACTORYDATE - Calculates and returns factory calendar date for a date (if CorrectOption = '+'); Checks if the date is work day (if CorrectOption = '-').
2. DATE_GET_WEEK - Returns week in which a date lies import : YYYYMMDD; Export : YYYYNN, where NN is # of week.
3. DATE_COMPUTE_DAY - Returns day of week for a date Import : YYYYMMDD; Export : 1-Monday, ...
4. WEEK_GET_FIRST_DAY - Import week in format YYYYNN where NN is # of week.
5. GET_WEEK_INFO_BASED_ON_DATE - mport : YYYYMMDD; Export : YYYYNN - week # for the date, Monday and Sunday of the week.
6. DATE_GET_FIRST_DAY_OF_WEEK - Returns week within which a date lies
check the below link for all the date and time function modules with description.
http://www.geocities.com/victorav15/sapr3/abapfun.html#date
date validation
‎2007 Jan 11 3:13 PM
‎2007 Jan 11 3:13 PM
‎2007 Jan 11 3:14 PM
here's a simple routine:
*check Überlappung
LOOP AT ztab WHERE mahns = ztab-mahns
...
AND ( d1 BETWEEN ztab-d1 and ztab-d2
or d2 between ZTAB-d1 AND ztab-d2 ).
ENDLOOP.
IF sy-subrc = 0.
MESSAGE e000(yp) WITH text-e02.A.
‎2007 Jan 11 3:23 PM
to validate 2 dates u can store the dates in one itab , then loop at itab and call this FM
DATA: v_date TYPE sydatum.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = v_date
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: / 'INvalid date'.
ELSE.
WRITE: / 'Correct date'.
ENDIF.Message was edited by:
Chandrasekhar Jagarlamudi