‎2007 May 14 8:32 AM
when we input date date format is yyyymmdd .
I want user to input it in the format ddmmyyyy
wht i shd write ?
‎2007 May 14 8:35 AM
‎2007 May 14 8:35 AM
Hi Amit,
Check this info.
The following ABAP code demonstrates a number of ways to format a SAP date value:
Using the WRITE statement
***************************
data: gd_date(10). "field to store output date
Converts SAP date from 20020901 to 01.09.2002
write sy-datum to gd_date dd/mm/yyyy.
Converts SAP date from 20020901 to 01.09.02
write sy-datum to gd_date dd/mm/yy.
Regards
‎2007 Oct 11 3:44 PM
I try
data: gd_date(10). "field to store output date
Converts SAP date from 20020901 to 01.09.2002
write sy-datum to gd_date dd/mm/yyyy.
Converts SAP date from 20020901 to 01.09.02
write sy-datum to gd_date dd/mm/yy.
But no write resullts, why?
‎2007 Oct 11 4:08 PM
REPORT ZDATE1.
data: gd_date(10). "field to store output date
Converts SAP date from 20020901 to 01.09.2002
write sy-datum to gd_date dd/mm/yyyy.
write / gd_date.
Converts SAP date from 20020901 to 01.09.02
write sy-datum to gd_date dd/mm/yy.
write / gd_date.
*Then output is:
11.10.2007
11.10.07
‎2007 May 14 8:38 AM
Hello,
The input by the user depends upon the settings in the User profile :
SAP Screen --> Menu --> System --> User Profile --> Own Data --> Defaults -->
Date Format .
The user can use any of the format.
Ask the user to set the Date format as ddmmyyyy.
If not you can do a validation and if the user enters a date in the format other than u desired then u can show a message.
Hope it solves ur prob.
Regards,
Deepu.k
‎2007 Oct 11 3:48 PM
Dear friend,
Mention the date field in selection as default on selection screen with the format u want or popup info message before entering the selection screen as what format user has to enter for date field.
Pls reward points.
Regards,
Ameet
‎2007 Oct 11 3:51 PM
presentation depends on user settings. Cuase most od the users does not have access to su01 advide them to go to system->user profile->own data, their they can change their locale settings in the way they want to.
This is nothing you must code. Let the user do the selection and dont irritate them by doing your own stuff overrdiding their settings.