2008 Jun 23 1:36 PM
Anyone know a function module to verify if date is valid?thx
2008 Jun 23 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
2008 Jun 23 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
2014 Nov 22 7:54 PM
2008 Jun 23 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.
2008 Jun 23 1:39 PM
Hi,
Can you explain little more abt your question.
Regards
Adil
2008 Jun 23 1:43 PM
2008 Jun 23 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
2016 Apr 28 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.