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

SALV tree

Former Member
0 Likes
621

Hi.

what are the various ways to downloadthe data in SALV tree to excel File

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
539

Hi,

After displaying the ALV output..Now press the CtrlShiftF7(Spreadsheet)..you get the popup now select the radio button ALL Available Format and select the Excel(In Office 2003 XML Format) and press ok.

After saving the file rename the file extension as XLS from XML.

thanks

manish

Hi.

what are the various ways to downloadthe data in SALV tree to excel File

3 REPLIES 3
Read only

Former Member
0 Likes
540

Hi,

After displaying the ALV output..Now press the CtrlShiftF7(Spreadsheet)..you get the popup now select the radio button ALL Available Format and select the Excel(In Office 2003 XML Format) and press ok.

After saving the file rename the file extension as XLS from XML.

thanks

manish

Read only

0 Likes
539

Hi,

you can directly download from screen as explained by Manish ahuja...

another way you can download via abap report.

Prashant

Read only

0 Likes
539

hi,

take a look at this code

*----


  • CLASS DECLARATION

*----


CLASS lcl_event_receiver DEFINITION DEFERRED.

load into the Excel File

*----


  • CLASS lcl_event_receiver DEFINITION

*----


CLASS lcl_event_receiver DEFINITION.

PUBLIC SECTION.

METHODS:

handle_toolbar

FOR EVENT toolbar OF cl_gui_alv_grid

IMPORTING e_object

ENDCLASS.

*----


  • CLASS lcl_event_receiver IMPLEMENTATION

*----


CLASS lcl_event_receiver IMPLEMENTATION.

METHOD handle_toolbar.

DATA:

lwa_tlbar TYPE stb_button.

lwa_tlbar-function = '&NEW'.

lwa_tlbar-icon = '@0Y@'. "ICON_CREATE

lwa_tlbar-quickinfo = 'New Record'.

lwa_tlbar-disabled = 'X'.

INSERT lwa_tlbar INTO e_object->mt_toolbar INDEX 1.

CLEAR lwa_tlbar.

lwa_tlbar-function = '&CHANGE'.

lwa_tlbar-icon = '@0Z@'. "ICON_CHANGE

lwa_tlbar-quickinfo = 'Change Record(s)'.

lwa_tlbar-disabled = 'X'.

INSERT lwa_tlbar INTO e_object->mt_toolbar INDEX 2.

CLEAR lwa_tlbar.

lwa_tlbar-function = '&DELETE'.

lwa_tlbar-icon = '@11@'. "ICON_DELETE

lwa_tlbar-quickinfo = 'Delete Record(s)'.

lwa_tlbar-disabled = 'X'.

INSERT lwa_tlbar INTO e_object->mt_toolbar INDEX 3.

CLEAR lwa_tlbar.

lwa_tlbar-function = '&SAVE'.

lwa_tlbar-icon = '@2L@'. "ICON_SYSTEM_SAVE

lwa_tlbar-quickinfo = 'Save Changes'.

lwa_tlbar-disabled = 'X'.

INSERT lwa_tlbar INTO e_object->mt_toolbar INDEX 5.

CLEAR lwa_tlbar.

lwa_tlbar-function = '&CANCEL'.

lwa_tlbar-icon = '@0W@'. "ICON_CANCEL

lwa_tlbar-quickinfo = 'Cancel Changes'.

lwa_tlbar-disabled = 'X'.

INSERT lwa_tlbar INTO e_object->mt_toolbar INDEX 6.

CLEAR lwa_tlbar.

ENDMETHOD.

ENDCLASS.

DATA:

go_alvgd TYPE REF TO cl_gui_alv_grid,

go_event TYPE REF TO lcl_event_receiver.

Create your ALV Grid here,

CREATE OBJECT go_event.

SET HANDLER go_event->handle_toolbar FOR go_alvgd.

regards,

Saurabh Goel