05-16-2006 10:51 AM
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.
05-16-2006 10:56 AM
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
05-16-2006 10:57 AM
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.
05-16-2006 11:01 AM
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
05-16-2006 11:12 AM
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.
05-16-2006 11:34 AM
i gave you 1 example but i have lot of data
to make this all?
i'm sure there is a FM