Skip to Content
0
Former Member
Dec 18, 2006 at 11:26 PM

Call function 'Download' using different internal tables

427 Views

Hi everyone!

i declare 10 different internal tables, with the same structure but different data.

i need to create 10 different files (one from each internal table)

i dont want to call 10 times the function download.

is there someway to put a variable name(that refeer to my internal table)

something like this.

PERFORM Create_file USING mytable.

PERFORM Create_file USING mytable2.

PERFORM Create_file USING mytable3.

PERFORM Create_file USING etc....

FORM create_file USING table.

DATA: file(128),

zcancel(1).

archivo = 'c:\loans.dat'.

CALL FUNCTION 'DOWNLOAD'

EXPORTING

bin_filesize = ' '

codepage = ' '

filemask_all = ' '

filemask_mask = ' '

filemask_text = ' '

filename = file

filetype = 'dat'

filetype_no_change = ' '

filetype_no_show = ' '

item = ' '

mode = ' '

wk1_n_format = ' '

wk1_n_size = ' '

wk1_t_format = ' '

wk1_t_size = ' '

IMPORTING

cancel = zcancel

TABLES

data_tab = <b>TABLE</b>

EXCEPTIONS

invalid_filesize = 01

invalid_table_width = 02

invalid_type = 03

no_batch = 04

unknown_error = 05.

ENDFORM.