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: 

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_locat.

Former Member
0 Kudos

Experts,

In BW, does anybody have some simple code for when on your selection-screen you have an input parameter for the location of the file you want to upload. In SAP/R3 there use to be "Perform get_local_path" to drill down thru your hard drive to find the file you want to select to upload. I am not sure what to use in BW to execute a drill down process for getting the file in a drop down window.

Thank-You!

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Hey Tom, do you want to be able browse the frontend pc or the backend application server?

For PC, I hope that this class exists in BW.



report zrich_0001.

data: ifile type filetable.
data: xfile like line of ifile.
data: return type i.

parameters: p_file type localfile.

at selection-screen on value-request for p_file.

  call method cl_gui_frontend_services=>file_open_dialog
    changing
      file_table              = ifile
      rc                      = return.

  read table ifile into xfile index 1.
  p_file = xfile-filename.

Regards,

Rich heilman

8 REPLIES 8

Former Member
0 Kudos

Within that FORM there might be a call to a function module that does the browsing. Like F4_FILENAME. Then check if that function module is there in BW.

0 Kudos

F4_FILENAME is not in our BW.

Former Member
0 Kudos

Hi Tom,

Check the FUnction Module <b>WS_FILENAME_GET</b>

Regards,

Azaz Ali.

0 Kudos

Yes that is in BW. Do I only need to pass the file location path?

0 Kudos

Are you trying to browse the local PC or the appliation server.

Implement the program above, give it a try. When you hit F4, you will get a file open dialog, selection your file, then click open, this will fill the pathfile into your parameter on the selection screen. IS this whay you are looking for?

You don't need to provide anything, but you can if you want. There are import parameters.

report zrich_0001.

data: ifile type filetable.
data: xfile like line of ifile.
data: return type i.

parameters: p_file type localfile.

at selection-screen on value-request for p_file.




  call method cl_gui_frontend_services=>file_open_dialog
  EXPORTING
<b>     WINDOW_TITLE            = 'Please choose a file'
*     DEFAULT_EXTENSION       =
     DEFAULT_FILENAME        = 'Test.xml'
*    FILE_FILTER             =
     INITIAL_DIRECTORY       = 'C:'
*    MULTISELECTION          =</b>
    changing
      file_table              = ifile
      rc                      = return.

  read table ifile into xfile index 1.
  p_file = xfile-filename.

Regards,

Rich Heilman

0 Kudos

You don't have to pass anything to the function module WS_FILENAME_GET import parameters of the function module.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Hey Tom, do you want to be able browse the frontend pc or the backend application server?

For PC, I hope that this class exists in BW.



report zrich_0001.

data: ifile type filetable.
data: xfile like line of ifile.
data: return type i.

parameters: p_file type localfile.

at selection-screen on value-request for p_file.

  call method cl_gui_frontend_services=>file_open_dialog
    changing
      file_table              = ifile
      rc                      = return.

  read table ifile into xfile index 1.
  p_file = xfile-filename.

Regards,

Rich heilman

0 Kudos

THANK-YOU!