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: 

how to get gui_download and gui_upload with popup filename?

Former Member
0 Kudos

how to get gui_download and gui_upload with popup filename?

3 REPLIES 3

Former Member
0 Kudos

These function modules will take a file name and upload or download the contents. If you want a popup to get the file name itself, then use '/SAPDMC/LSM_F4_FRONTEND_FILE' or 'KD_GET_FILENAME_ON_F4' or 'F4_FILENAME'.

Srinivas

Former Member
0 Kudos

hi,

Please check the fallowing...

Use FM ''GUI_UPLOAD" in conjuction with the FM "C13Z_FRONTEND_FILENAME_GET" or

Use FM ''GUI_UPLOAD" in conjuction with the static method "FILE_OPEN_DIALOG" of the class CL_GUI_FRONTEND_SERVICES

Use FM ''GUI_DOWNLOAD" in conjuction with the static method "FILE_SAVE_DIALOG" of the class CL_GUI_FRONTEND_SERVICES

Regards,

Sanjeev

0 Kudos

Here is a short example.



report zrich_0003 .

data: ifiletab type filetable.
data: xfiletab like line of ifiletab.
data: xstring type string.
data: rc type i.

data: itab type table of string.
data: xtab type string.

start-of-selection.


  call method cl_gui_frontend_services=>file_open_dialog
    changing
      file_table              = ifiletab
      rc                      = rc.
  read table ifiletab into xfiletab index 1.
  xstring = xfiletab-filename.

  check not xstring is initial.

  call method cl_gui_frontend_services=>gui_upload
    exporting
      filename                = xstring
  changing
    data_tab                = itab.


  loop at itab into xtab.
    write:/ xtab.

  endloop.

Regards,

Rich Heilman