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

cl_gui_alv_tree functions

Former Member
0 Likes
1,445

Hi,

I have an ALV Tree being displayed. Now, I want to download the whole hierarchy to MS Excel. However, I could not find and icon that available in the standard application toolbar (where we will have Excel download function in all ALV report). At this time, i just manage to add printing functionality using the following:

CREATE OBJECT tree1

EXPORTING

parent = l_custom_container

node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple

item_selection = space

no_html_header = ''

no_toolbar = ''

i_print = 'X'

EXCEPTIONS

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

illegal_node_selection_mode = 5

failed = 6

illegal_column_name = 7.

Anyone knows how to add MS Excel download to the application toolbar?

Thanks and regards,

Patrick

2 REPLIES 2
Read only

Former Member
0 Likes
581

Hi Patrick

Sorry. Unfortunately, It is not possible to download ALV tree into Excel via toolbar.

However, you can still download the tree into Excel manually with the following steps

1) In ALV tree, click on Print icon and choose "Print preview of entire hierarchy"

2) Go to menu System -> List -> Save -> Local File -> Spreadsheet

The Excel output won't look good.

Regards

Read only

Former Member
0 Likes
581

Hi Patrick,

Standard Control does not give that Option . SO another option is to go to Print preview of the Entire Hierarchy view , then click System -> list -> Save -> local file and save it as spreadsheet . This way entire data gets downloaded in excel in tree format .

Regards

Sudheer