I have a problem in downloading ALV tree to excel file, since there is no standard functionality in ALV tree tool bar, I found other way.
we can do this by using standard print preview button , where user can download to excelfile.
The path is :
go to print preview button
go to system - list - save - localfile.
but I want to implement this using a custom push button on the ALV tool bar , I was unable to do this.
I have tried to debug the standard print preview button how exactly it is downloading , but I am not able to figure out how this is done , which function module to call.
I have seen during debug it is using FM LIST_DOWNLOAD and LIST_CONVERT_TO_DAT
I tried these two but i was not successful.
* CALL FUNCTION 'LIST_DOWNLOAD'
* EXPORTING
* list_index = '0'
* method = ' '
* EXCEPTIONS
* list_download_error = 1
* OTHERS = 2.
but while executing it goes to dump that invalid list index.
can any one help me out .