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

Date validation from Dialog screen

Former Member
0 Likes
770

Hello,

I have a dialog program in which I am accepting a date in a character type field.

Now there are user defined date formats, ( SU01D or System --> User Profile ---> Own Data --> Defaults).

I need to check whether the entered date format matches with the user defined date format or not.

Other wise it should give an error msg.

Is there any function module to check this ? Pls advice.

Thanks and regards,

Anand

4 REPLIES 4
Read only

Former Member
0 Likes
639

Check this FM DATE_CHECK_PLAUSIBILITY

A

Read only

Former Member
0 Likes
639

Hi,

You can query this table USR01 with user name, the field DATFM will give you the date format. The Possible values of DATFM will be 1 to 6.

1 DD.MM.YYYY

2 MM/DD/YYYY

3 MM-DD-YYYY

4 YYYY.MM.DD

5 YYYY/MM/DD

6 YYYY-MM-DD

Now you can check the user input date format with the queried one.

Read only

Former Member
0 Likes
639

Hi,

This function module ISH_GET_USER_DATE will give what's Date type used for the User.

Use function module DOMAIN_VALUE_GET to get the value from the domain. Domain is XUDATFM for the date type.

you need to pass domain name and value from the ISH_GET_USER_DATE function module.

Hope it helps your requirement.

Read only

Former Member
0 Likes
639

Thanks.