Application Development and Automation 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: 
Read only

GUI Download Issue

Former Member
0 Likes
874

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
830

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.

7 REPLIES 7
Read only

Former Member
0 Likes
831

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

Read only

0 Likes
830

JB

Lot of people answered my question but you were the first.

Thanks to Every one

Read only

Former Member
0 Likes
830

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

Read only

0 Likes
830

Pooja

I already tried this it didnt worked.

Thanks

Read only

0 Likes
830

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.

Read only

Former Member
0 Likes
830

Hi,

Try to set TRUNC_TRAILING_BLANKS_EOL parameter as 'X'.

it maybe helpful to you.

Regards,

Rajesh Kumar

Read only

0 Likes
830

Rajesh

I already tried it. This never Worked

Thanks

Edited by: Senthil Ram Kumar Palanisamy Ganapathi on Oct 21, 2009 5:20 PM