2009 Nov 18 4:25 AM
i have a selection screen in which i want user to enter date in dd.mm.yyyy format only.how can i validate that.any FM.
i also want that date to be changed in yyyymmdd format coz i have to update that in a field which has yyyymmdd format.
so is there any fm for this also ( to change dd.mm.yyyy to yyyymmdd).
any pointers will help.
2009 Nov 18 4:33 AM
Hi,
If you specifiy the type of the parameter as of type SY-DATUM system will force user to enter the date in dd.mm.yyyy format only. It also stores that date in yyyymmdd format which you update in a field which has yyyymmdd format.
Regards,
Vaishali.
2009 Nov 18 4:37 AM
Hi Govind,
Based on the user defaults in the transaction SU01 the date will be verified based on the date format selected in the user details.
Declare the selection screen variable as of type Sy-DATUM.
what ever format you had entered the date in the selection screen the variable will hold the value in the format yyyymmdd.
no need to do any format for the date.
hope this might help you.
regards,
Phani.
2009 Nov 18 4:38 AM
Hi
Take the Help of this FM CONVERT_DATE_FORMAT
or alternately whatever the format the user enters convert yourself in the format you require in AT SELECTION-SCREEN event.
Cheerz
Ram
2009 Nov 18 4:41 AM
Hi ,
Based on the user defaults in the transaction SU01 the date will be verified based on the date
format selected in the user details.
Now U split the date and concatenate the date , month year value to your desired format.
Thanks
Shambhu