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

changing the date format.

Former Member
0 Likes
595

hi experts,

i have the internal table in my report which has one field i.e date field of type datum.

now i am down loading the output to local file using gui_download.

now i want the date format need to be formated to DD/MM/YYYY which is of 10 charcters in the local file.

how to go about this?

thanks

Shyam

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
568

Hi,

Try this..



DATA: V_DATE TYPE SYDATUM.
DATA: V_OUTPUT(10).

V_DATE = SY-DATUM.

WRITE V_DATE TO V_OUTPUT DD/MM/YYYY.

WRITE: / V_OUTPUT.


Thanks

Naren

4 REPLIES 4
Read only

Former Member
0 Likes
568

use EDIT MASK option

Read only

Former Member
0 Likes
569

Hi,

Try this..



DATA: V_DATE TYPE SYDATUM.
DATA: V_OUTPUT(10).

V_DATE = SY-DATUM.

WRITE V_DATE TO V_OUTPUT DD/MM/YYYY.

WRITE: / V_OUTPUT.


Thanks

Naren

Read only

Former Member
0 Likes
568

Hi Shyam,

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.

Thanks,

reward If Helpful.

Read only

Former Member
0 Likes
568

Hi,

Use FM CONVERSION_EXIT_ALPHA_OUTPUT and pass the date field to it.

it will convert the date into required

or use CONVERSION_EXIT_PDATE_OUTPUT

Regards

Shiva