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: 

WHEN USING GUI_DOWNLOAD.

Former Member
0 Kudos

HI,

I am bit confused about this GUI_UPLOAD and GUI_DOWNLOAD.

pls let me know when we want the data in *.txt format in the desktop from the table (like MARA)....which function we use....and when placing in to presentation server which function we use.

thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

GUI_DOWNLOAD is to download a file from SAP to Presentation Server.

GUI_UPLOAD is to upload a file from Presentation Server to SAP.

So if you need to transfer the data from SAP table to a file in your desktop you have to use GUI_DOWNLOAD:

DATA: BEGIN OF T_MARA OCCURS 0,
  MATNR TYPE MATNR, 
END OF T_MARA.

SELECT MATNR FROM MARA INTO T_MARA WHERE ....

CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
        filename         = <path>
        filetype         = 'ASC'
   TABLES
        data_tab         = t_mara
   EXCEPTIONS
        file_open_error  = 1
        file_write_error = 2
        OTHERS           = 3.

Max

1 REPLY 1

Former Member
0 Kudos

Hi

GUI_DOWNLOAD is to download a file from SAP to Presentation Server.

GUI_UPLOAD is to upload a file from Presentation Server to SAP.

So if you need to transfer the data from SAP table to a file in your desktop you have to use GUI_DOWNLOAD:

DATA: BEGIN OF T_MARA OCCURS 0,
  MATNR TYPE MATNR, 
END OF T_MARA.

SELECT MATNR FROM MARA INTO T_MARA WHERE ....

CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
        filename         = <path>
        filetype         = 'ASC'
   TABLES
        data_tab         = t_mara
   EXCEPTIONS
        file_open_error  = 1
        file_write_error = 2
        OTHERS           = 3.

Max