Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FM for checking valid date

dev_parbutteea
Active Contributor
0 Likes
545

Hello, is there a function module which will allow me to check whether a date is valid or not?

4 REPLIES 4
Read only

Former Member
0 Likes
486

Try this FM..

DATE_CHECK_PLAUSIBILITY

Read only

former_member673464
Active Contributor
0 Likes
486

hi,

Declare the variable as follows.It will automatically check for the valid date.

parameters:

p_date like sy-datum.

with regards,

veeresh

Read only

dev_parbutteea
Active Contributor
0 Likes
486

i have selected some fields from a table .in the date column there are some invalid values.i would like to get rid of the values.

Read only

0 Likes
486

then DATE_CHECK_PLAUSIBILITY is right FM in such cases...

DATA : p_date(8) TYPE d VALUE '20081301'.

CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'

EXPORTING

date = p_date

EXCEPTIONS

plausibility_check_failed = 1

OTHERS = 2.

IF sy-subrc NE 0.

WRITE 😕 'Invalid date'.

ENDIF.