‎2008 Oct 29 8:18 PM
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
‎2008 Oct 29 8:26 PM
‎2008 Oct 29 8:28 PM
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.
‎2008 Oct 29 8:28 PM
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.
‎2008 Nov 11 10:19 PM