2006 Oct 04 9:23 AM
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
2006 Oct 04 9:31 AM
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
2006 Oct 04 9:33 AM
2006 Oct 04 9:47 AM
2007 Mar 26 7:54 PM
I have the same problem with the Excel button on the SALV grid. it seems to be a bug in the SALV.
2007 Mar 27 5:05 AM
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