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

Change (Default) Date format while saving from ALV to Excel

Former Member
0 Likes
2,124

Hi,

When I download Excel file from ALV the Date fields get converted to the local settings in my computer (the settings from MS Office config). But I want to keep the date format that of in SAP. i.e. I want to save excel file with date fields formatted as the date format I see in ALV output.

Is there any way out to do this?

Regards,

Sourav

4 REPLIES 4
Read only

Former Member
0 Likes
1,368

Hi Sourav,

My advice:

1.change the field type of date to char type and properly extend the length

2.add ' before the value of date.

Thanks,

Sam

Read only

0 Likes
1,368

Thanks Sam.
Actually that solution occurred to me. I am looking for a bit more legitimate way if there is any.
Suppose I need sorting the date field.

Anyway thanks..

Read only

0 Likes
1,368

Try concatenating ' (single quote) in front of the date and passing it for the excel download.

Hope this helps.

Rgds,

Naveen

Read only

naveenvishal
Contributor
0 Likes
1,368

Hi Sourav,

Instead of passing back as a date, pass it back as a character. It will then retain the same format in excel download.

Hope this helps.

Regards,

Naveen