2009 Oct 21 3:11 AM
Hi Friends
I have to download the text file in the following format. There should be only 3 spaces after number '2' in the first line of text file but I am not able to restrict it and has the entire remaining space(80 char) of that line. second line there should not be any traialing space at end. Kindly help me how to solve this.
1 PAD 0909180001 2(3 Spaces)
2 99999s 15.34 700000 23456789
2 77777h 15.34 720041 3000000
My Code
data: begin of str_file_out,
line(80),
end of str_file_out.
data: it_file_out like table of str_file_out.
str_file_out-line = '1 PAD 0909180001 2 ' "3 space at end
append str_file_out to it_file_out.
str_file_out-line = '2 99999s 15.34 700000 23456789'.
append str_file_out to it_file_out.
str_file_out-line = '2 77777h 15.34 720041 3000000'.
append str_file_out to it_file_out.
call function 'GUI_DOWNLOAD'
exporting
filename = pfile
filetype = 'ASC'
trunc_trailing_blanks_eol = ''
tables
data_tab = it_file_out.
2009 Oct 21 4:12 AM
Hi,
I think indead of using type character for your line type, you will have more luck with the type string line type. String allocates only the bytes needed unlike a fixed call like line(80).
thanks.
JB
Hi Friends
I have to download the text file in the following format. There should be only 3 spaces after number '2' in the first line of text file but I am not able to restrict it and has the entire remaining space(80 char) of that line. second line there should not be any traialing space at end. Kindly help me how to solve this.
1 PAD 0909180001 2(3 Spaces)
2 99999s 15.34 700000 23456789
2 77777h 15.34 720041 3000000
My Code
data: begin of str_file_out,
line(80),
end of str_file_out.
data: it_file_out like table of str_file_out.
str_file_out-line = '1 PAD 0909180001 2 ' "3 space at end
append str_file_out to it_file_out.
str_file_out-line = '2 99999s 15.34 700000 23456789'.
append str_file_out to it_file_out.
str_file_out-line = '2 77777h 15.34 720041 3000000'.
append str_file_out to it_file_out.
call function 'GUI_DOWNLOAD'
exporting
filename = pfile
filetype = 'ASC'
trunc_trailing_blanks_eol = ''
tables
data_tab = it_file_out.
2009 Oct 21 4:12 AM
Hi,
I think indead of using type character for your line type, you will have more luck with the type string line type. String allocates only the bytes needed unlike a fixed call like line(80).
thanks.
JB
2009 Oct 21 10:40 PM
JB
Lot of people answered my question but you were the first.
Thanks to Every one
2009 Oct 21 6:07 AM
Hi,
I think rahter tahn using the AS type in GUI_DOWNLOAd...try using DAT,Seondly try using the line(80) as String.
I think this might solve your problem.
Pooja
2009 Oct 21 10:20 PM
2009 Oct 21 10:28 PM
option one,
work around by making the field as string( but i still dont understand what will happen keeping 3 spaces at the end? who will check how many spaces are there in the end?
option two,
after the line field add one more field of char3 to the structure of the table...
so that this will make a 3 char space.
2009 Oct 21 6:26 AM
Hi,
Try to set TRUNC_TRAILING_BLANKS_EOL parameter as 'X'.
it maybe helpful to you.
Regards,
Rajesh Kumar
2009 Oct 21 10:19 PM
Rajesh
I already tried it. This never Worked
Thanks
Edited by: Senthil Ram Kumar Palanisamy Ganapathi on Oct 21, 2009 5:20 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |