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

excel from alv

Former Member
0 Likes
622

Hi

i create alv using class CL_SALV_TABLE.

When i transfer the alv to excel the total fields that i create didn't transfer to excel.

maybe there is any solution to this?

thanks

have a nice day

Hi

i create alv using class CL_SALV_TABLE.

When i transfer the alv to excel the total fields that i create didn't transfer to excel.

maybe there is any solution to this?

thanks

have a nice day

5 REPLIES 5
Read only

uwe_schieferstein
Active Contributor
0 Likes
580

Hello Yossi

Class CL_GUI_ALV_GRID allows to change the layout to the "old" format where summary lines are exported to Excel as well. Thus, have a look at the toolbar accompanying CL_SALV_TABLE and see if you can change the layout, too.

Regards

Uwe

Read only

0 Likes
580

Hi Uwe

I didn't understand what to do?

Read only

0 Likes
580

Hi

maybe there is any method that can do it

??

Read only

0 Likes
580

I have the same problem with the Excel button on the SALV grid. it seems to be a bug in the SALV.

Read only

p291102
Active Contributor
0 Likes
580

Hi,

This is the sample report for downloading the output into EXCEL or WORD. After

executing this report u can find the ICON for downloading the output into EXCEL

or WORD format.

REPORT YMS_ALVEXCELWORDGRAPH message-id z0.

type-pools slis.

tables: t000.

data: itab_output like t000 occurs 0 with header line.

Data: alv_grid_variant type disvariant,

alv_grid_variant_save value 'U',

layout type slis_layout_alv,

fieldcat TYPE SLIS_T_FIELDCAT_ALV.

data: begin of fieldcat_rec.

include type slis_fieldcat_main.

include type slis_fieldcat_alv_spec.

data: end of fieldcat_rec.

*MAIN

start-of-selection.

PERFORM EXTRACT_DATA.

PERFORM OUTPUT-LIST.

&----


*& Form EXTRACT_DATA

&----


FORM EXTRACT_DATA.

refresh itab_output.

select * from t000 into table itab_output.

ENDFORM. " EXTRACT_DATA

&----


*& Form OUTPUT-LIST

&----


FORM OUTPUT-LIST.

*Build field catalog

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_STRUCTURE_NAME = 'T000'

CHANGING

CT_FIELDCAT = fieldcat

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

IS_LAYOUT = layout

it_fieldcat = fieldcat

I_SAVE = alv_grid_variant_save

IS_VARIANT = alv_grid_variant

TABLES

T_OUTTAB = ITAB_OUTPUT

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " OUTPUT-LIST

Thanks,

Sankar M