Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9369

Re: export to excel

$
0
0

Hello Atul,

 

Please check the below program

 

REPORT  ZTEST_SCN no standard page heading.

parameters : p_tname type TABNAME.

data it_dyntab type ref to data.
field-symbols <fs_any> type any table.

start-of-selection.

   create data it_dyntab type standard table of (p_tname).
   assign it_dyntab->* to <fs_any>.
   select * from (p_tname) into table <fs_any> up to 100 rows.
   break-point.
   IF SY-SUBRC = 0.
     CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
       EXPORTING
         FILENAME = 'C:\test_scn.xls'
       CHANGING
         DATA_TAB = <fs_any>.
   ENDIF.

Viewing all articles
Browse latest Browse all 9369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>