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: 

gui-download

Former Member
0 Kudos

I use the method gui-download, but when I open the file which I have downloaded I have between the digits always one blank. can I sove this issue with codepage or something else?

1 ACCEPTED SOLUTION

MarcinPciak
Active Contributor
0 Kudos

Hi you need to split the lines at TAB mark like below:


DATA: xsep TYPE xstring value '09',  "tab mark
          sep TYPE string.
          
          CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
            EXPORTING
              in_xstring = xsep
            IMPORTING
              out_string = sep.

          READ TABLE it_file_data INDEX 1.   
          SPLIT it_file_data AT sep INTO TABLE it_splitted IN CHARACTER MODE.

Then if you need the lines back (without this TAB mark), concatenate all component from it_splitted to some other internal table.

Regards

Marcin

3 REPLIES 3

Former Member
0 Kudos

hi ,

Make sure you are using it in this format only.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'c:\temp\text.txt'

filetype = 'ASC'

IMPORTING

filelength = fleng

TABLES

data_tab = text_tab

EXCEPTIONS

file_write_error = 1

invalid_type = 2

no_authority = 3

unknown_error = 4

OTHERS = 10.

thanks.

tarangini_katta
Active Contributor
0 Kudos

Hi,

use this class

CL_GUI_FRONEND_SERVICES~GUI_DOWNLOAD.

I hope this will help you.

thanks,

MarcinPciak
Active Contributor
0 Kudos

Hi you need to split the lines at TAB mark like below:


DATA: xsep TYPE xstring value '09',  "tab mark
          sep TYPE string.
          
          CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
            EXPORTING
              in_xstring = xsep
            IMPORTING
              out_string = sep.

          READ TABLE it_file_data INDEX 1.   
          SPLIT it_file_data AT sep INTO TABLE it_splitted IN CHARACTER MODE.

Then if you need the lines back (without this TAB mark), concatenate all component from it_splitted to some other internal table.

Regards

Marcin