Skip to Content
-1

How to call programmatically a standard ALV export to localfile

Mar 15 at 02:22 AM

60

avatar image
Former Member

Hi experts.

i have a requirement to export alv data to a local file without/not using EXCEL.

please help me on how to call this modal from a standard alv export

does any one have a sample code.

THANK YOU IN ADVANCE

dipotani.png (8.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Krishna Murthy Mar 15 at 04:07 AM
1

for your reference debug method of

EXPORT_TO_LOCAL_FILE of class CL_GUI_ALV_GRID.

you can get some solution

Show 1 Share
10 |10000 characters needed characters left characters exceeded

hi

use this FM : K_KKB_LIST_DISPLAY

example :

call function 'K_KKB_LIST_DISPLAY'
exporting
i_export = i_export
* I_INTERFACE_CHECK =
i_callback_program = l_callback_program
* I_CALLBACK_USER_COMMAND =
* i_callback_top_of_page = ms_list_events-topofpage
* i_callback_top_of_list = ms_list_events-topoflist
* i_callback_end_of_page = ms_list_events-endofpage
* i_callback_end_of_list = ms_list_events-endoflist
* I_CALLBACK_PF_STATUS_SET =
* I_CALLBACK_LAYOUT_SAVE =
* I_CALLBACK_FIELDCAT_SAVE =
* I_CALLBACK_GROUPLEVEL_CHANGE =
* I_CALLBACK_BEFORE_LINE_OUTPUT =
* I_CALLBACK_AFTER_LINE_OUTPUT =
* I_CALLBACK_FOREIGN_TOP_OF_PAGE =
* I_CALLBACK_FOREIGN_END_OF_PAGE =
* I_CALLBACK_LIST_MODIFY =
* I_CALLBACK_TOP_OF_COVERPAGE =
* I_CALLBACK_END_OF_COVERPAGE =
* I_CALLBACK_HEADER_TRANSPORT =
* I_CALLBACK_REPREP_SEL_MODIFY =
* I_CALLBACK_SUBTOTAL_TEXT =
i_tabname = l_tabname
i_oo_alv = me
is_layout = ls_layout_kkblo
it_fieldcat = lt_fieldcat_kkblo
* I_FCTYPE = 'R'
it_excluding = lt_excluding
it_special_groups = lt_special_groups_kkblo
it_sort = lt_sort_kkblo
it_filter = lt_filter_kkblo
* IT_EVENT_EXIT =
is_sel_hide = ls_sel_hide
it_except_qinfo = lt_kkbl_qinf
ir_salv_adapter = me->r_salv_adapter
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
tables
t_outtab = <tab1>
it_collect00 = <lt_collect00>
it_collect01 = <lt_collect01>
it_collect02 = <lt_collect02>
it_collect03 = <lt_collect03>
it_collect04 = <lt_collect04>
it_collect05 = <lt_collect05>
it_collect06 = <lt_collect06>
it_collect07 = <lt_collect07>
it_collect08 = <lt_collect08>
it_collect09 = <lt_collect09>.

0