cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to propose another default file name in ALV Excel Export?

Former Member
0 Kudos

Hello All,

I have a problem while exporting to Excel from the WD ALV. The whole process works fine, the problem occurs when the user wants to open (without saving) multiple exported Excel documents at the same time. In this case he gets an error message, that the document with the same name has already been opened.

Therefore I have a question, is it possible to customize default file name, so that instead of 'export.xlsx' the file name will contain e.g. WD title&time (or something like that)?

Thank you very much in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

It's the standard functionality. You actually have to enhance the standard method, which is not advisable as the same will be called in other applications as well.

So, Instead of that, hide the standard Export functionality and create a new Tool bar button, say, 'Export to Excel' and in on action of that button, use cl_wd_runtime_services=>attach_file_to_response ( and pass the file name by concatenating date/time) method to open/save the file.

Check this document to create a custom button in ALV tool bar: Creating Self-Defined Functions in WDA ALV

And, check this blog by Chris for code reference to have Export to Excel functionality:

Hope this helps u,

Regards,

Kiran

Former Member
0 Kudos

Thank you for the answer.

I know about such opportunity, but unfortunately it doesn't match our requirements. I asked especially about customizing, without creating our own Excel export.

Regards,

Natallia

former_member184578
Active Contributor
0 Kudos

Hi,

There's no such provision to achieve this via customizing as It is building  from standard code.

Regards,

Kiran

Answers (0)