‎2007 Feb 19 8:40 PM
Hi abapers,
im using the FM download, but i need to specify some rute
myserver\private, and for security reasons the user cant change the rute or name of the file,
so i need to restrict any changes for the rute and name for this function..
i know how to restrict the filetype, but i dont know how to restrict the name and download rute.
any help?
tks in advance.
‎2007 Feb 19 9:09 PM
‎2007 Feb 19 9:09 PM
‎2007 Feb 20 4:28 AM
do the following way:-
*Selection screen.
parameters: p_pcfile type localfile.
*PAI of Selection Screen
*attach file dialog to p_pcfile parameter
at selection-screen on value-request for p_pcfile.
perform f0700_file_dialog.
&----
*& Form f0700_file_dialog
&----
text
----
--> p1 text
<-- p2 text
----
FORM f0700_file_dialog .
*Constants Declaration
constants :
*set default to c:\
c_def_path type string value 'C:\',
*restrict to excel type only
c_mask type string value ',.xls,.xls.',
*title of the dialog
c_title type string value 'Upload file'.
call function 'WS_FILENAME_GET'
EXPORTING
def_path = c_def_path
mask = c_mask
mode = 'O'
title = c_title
IMPORTING
filename = p_pcfile
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5.
if sy-subrc <> 0.
set screen 0.
endif.
ENDFORM. " f0700_file_dialog