06-23-2008 1:36 PM
06-23-2008 1:39 PM
hiiii
This function module will be useful.check.
FM CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = pre_date
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e002(0s) WITH pre_date.
ENDIF.
reward if useful
thx
twinkal
06-23-2008 1:39 PM
hiiii
This function module will be useful.check.
FM CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
date = pre_date
EXCEPTIONS
plausibility_check_failed = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e002(0s) WITH pre_date.
ENDIF.
reward if useful
thx
twinkal
11-22-2014 7:54 PM
06-23-2008 1:39 PM
DATE_CHECK_PLAUSIBILITY
Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
06-23-2008 1:39 PM
06-23-2008 1:43 PM
06-23-2008 1:44 PM
hi,
DATE_CHECK_PLAUSIBILITY is the FM useful to you. Pass your date to the FM and check for exceptions. If there is one, the date is wrong else right.
thanks
Nayan
04-28-2016 7:56 PM
Maybe is useful the class
CALL METHOD cl_isu_date_check=>date_check_plausibility
EXPORTING
x_date = lv_date
EXCEPTIONS
plausibility_check_failed = 1
others = 2.
also verified by
if x_date < cl_isu_date=>co_date_finite
or x_date > cl_isu_date=>co_date_infinite.
message e073(e9) raising plausibility_check_failed.
endif.