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

Problem with GUI_DOWNLOAD

0 Likes
1,061

Hi Experts,

I have a little problem. I´m trying to using the FM GUI_DOWNLOAD, but it´s bring me a wrong file, with a blank between the char.

the file must be like

"DATADATAMOREDATA"

but the file is

"D A T A D A T A M O R E D A T A"

Apparently all the parameters is ok

call function 'GUI_DOWNLOAD'

            exporting

                 bin_filesize            = v_size

                 filename                = file

                 filetype                = 'BIN'

             tables

                 data_tab                = itab_saida

Someone have any idea what the problem?

thanks in advance

Hi Experts,

I have a little problem. I´m trying to using the FM GUI_DOWNLOAD, but it´s bring me a wrong file, with a blank between the char.

the file must be like

"DATADATAMOREDATA"

but the file is

"D A T A D A T A M O R E D A T A"

Apparently all the parameters is ok

call function 'GUI_DOWNLOAD'

            exporting

                 bin_filesize            = v_size

                 filename                = file

                 filetype                = 'BIN'

             tables

                 data_tab                = itab_saida

Someone have any idea what the problem?

thanks in advance

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,015

Are you sure for (Look at GUI_DOWNLOAD for "filetype")

filetype                = 'BIN'

Regards,

Raymond

(*) Of course if you download on a server with the same codepage than the application server, no problem shhould arise with BIN.

Read only

0 Likes
1,015

Hi Raymond,

I tryed ASC , but o have problem too.

Expected

DATADATA

DATADATA

With ASC the file output is

DATADATA

DATADATA

with null between lines.

In fact, I don´t know the codepage of the app server. Do you have a hint to discover it?

*Okay, I fount the codepage 1100 for the app server and 1160 for front-end.

This is a good reason for the problem?

Read only

gouravkumar64
Active Contributor
0 Likes
1,015

Hi,

V_SIZE      TYPE I,

FILE   TYPE STRING.

Have u declared like this?

Gourav.

Read only

0 Likes
1,015

Hi Kumar,

Yes, both declared correctly.

Read only

0 Likes
1,015

Hi,

In one of my coding i declared like this, it is working fine.

IT_LINES TYPE STANDARD TABLE OF TLINE,

MOVE V_FULLPATH TO V_FILENAME.

       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
           BIN_FILESIZE            = V_BIN_FILESIZE
           FILENAME                = V_FILENAME
           FILETYPE                = 'BIN'
         TABLES
           DATA_TAB                = IT_LINES
         EXCEPTIONS
           FILE_WRITE_ERROR        = 1
           NO_BATCH                = 2
           GUI_REFUSE_FILETRANSFER = 3
           INVALID_TYPE            = 4
           NO_AUTHORITY            = 5
           UNKNOWN_ERROR           = 6
           HEADER_NOT_ALLOWED      = 7
           SEPARATOR_NOT_ALLOWED   = 8
           FILESIZE_NOT_ALLOWED    = 9
           HEADER_TOO_LONG         = 10
           DP_ERROR_CREATE         = 11
           DP_ERROR_SEND           = 12
           DP_ERROR_WRITE          = 13
           UNKNOWN_DP_ERROR        = 14
           ACCESS_DENIED           = 15
           DP_OUT_OF_MEMORY        = 16
           DISK_FULL               = 17
           DP_TIMEOUT              = 18
           FILE_NOT_FOUND          = 19
           DATAPROVIDER_EXCEPTION  = 20
           CONTROL_FLUSH_ERROR     = 21
           OTHERS                  = 22.
       IF SY-SUBRC <> 0.
*     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
       ENDIF.
*  ENDIF..

Gourav.

Read only

0 Likes
1,015

Kumar,

My declared var and parameters it´s all allright, I just have implemented this FM before without problems. This is a particular problem with this FM.

Read only

0 Likes
1,015

Hi everyone,

I can´t find the reason of the problem. I changed the filetype to ASC and all works fine.

Thank´s all for the help.