Skip to Content
0
Former Member
Sep 24, 2008 at 02:16 PM

Downloading dynamic internal table to excel

3538 Views

Hi All,

I have posted thread regarding this problem earlier and i got following code as solution to download field-symbol data

DATA: i_itab type standard table of mara.

FIELD-SYMBOLS : <fs> TYPE STANDARD TABLE .

ASSIGN i_itab to <fs>.

select * from mara into table i_itab up to 100 rows.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'C:\testfile.xls'

WRITE_FIELD_SEPARATOR = 'X'

TABLES

data_tab = <fs>

This code is working fine , when we define statement:

DATA: i_itab type standard table of mara

But, i am defining internal table dynamically and my data resides in table <FS> .

Can anyone please tell how to define internal table i_itab like table <FS>. ?