Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

download ztable file

Former Member
0 Kudos

i download ztable into file.txt (gui_download)

my problem:

i want the field to download as is , if matnr is 10 and in data element 18 i need 1o and 8 space and after that i need ',' delimeter.

i made loop that make ',' at the end of matnr but it takes the space, i also add WRITE_FIELD_SEPARATOR = ','

but i get err and it not make this

HELP.

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos

loop at itab.

write itab-matnr to itab-matnr left-justified.

concatenate itab-field1 itab-field2 ..itab-matnr..

into itab_new-data separated by ','.

append itab_new.

clear itab_new.

endloop.

then use gui_download without write_field_separator = 'X'.

with the table itab_new.

Regards,

Ravi

Former Member
0 Kudos

HII

USE THIS

DATA: ld_filename TYPE string,

DATA: begin of it_datatab occurs 0,

col1(50) type c,

col2(50) type c,

col3(50) type c,

  • etc....

end of it_datatab.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = ld_filename

filetype = 'ASC'

  • APPEND = 'X'

write_field_separator = 'X'

  • CONFIRM_OVERWRITE = 'X'

TABLES

data_tab = it_datatab[]

EXCEPTIONS

file_open_error = 1

file_write_error = 2

OTHERS = 3.

0 Kudos

friends:

1.i made 'X' and it not make separator ','.

2.i wrote that i tried loop the problem is it taking the space it show only 10 postion of matnr it takes the 8 space

0 Kudos

first modify internal table like that than...do all the opration...

DATA: begin of itab occurs 0,

matnr type matnr,

end of itab.

itab-matnr = '1232344345'.

append itab.

loop at itab.

write : itab-matnr.

data : myspace(8) type c.

data : howmany type i.

howmany = 8.

concatenate itab-matnr '' into itab-matnr separated by myspace(howmany).

modify itab.

write: itab-matnr.

endloop.

0 Kudos

i gave you 1 example but i have lot of data

to make this all?

i'm sure there is a FM