‎2006 Aug 23 4:07 PM
Hi,
Can somebody suggest how to display the previous folder browsed as the default folder when browsing again from the parameter field. I am using WS_FILENAME_GET to browse a file.
Thanks in advance.
Regards,
Arun Mohan
‎2006 Aug 23 4:12 PM
Use the class-mthod:
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_GET_CURRENT to get the current directory.
use it as the default file path in the fm: ws_filename_get.
Regards,
Ravi
‎2006 Aug 23 4:10 PM
Hi,
I think the function module itself help you to browse and select the required file you want, no need of extra coding required.
‎2006 Aug 23 4:12 PM
Use the class-mthod:
CL_GUI_FRONTEND_SERVICES=>DIRECTORY_GET_CURRENT to get the current directory.
use it as the default file path in the fm: ws_filename_get.
Regards,
Ravi
‎2006 Aug 23 4:15 PM
‎2006 Aug 23 4:16 PM
‎2006 Aug 23 4:20 PM
Hi Arun,
Try this.
initialization.
IMPORT P_PATH FROM MEMORY ID 'AA'.
start-of-selection.
EXPORT P_PATH TO MEMORY ID 'AA'.
where p_path is the parameter of file path.
-Anu
‎2006 Aug 23 4:25 PM
hi Arun,
Check this way out
data: l_file type filetable,
l_fileline type file_table,
l_rc type i.
class cl_gui_frontend_services definition load.
call method cl_gui_frontend_services=>file_open_dialog
exporting
window_title = p_filetitle
initial_directory = 'C:Temp'
changing
file_table = l_file
rc = l_rc.
if sy-subrc = 0.
read table l_file into l_fileline index 1.
endif.
p_filename = l_fileline.
Regards,
Santosh
‎2006 Aug 23 5:06 PM
Create a parameter ID or use existing parameter ID SOP, add it to user profile parameters in tx SU3.
use GET PARAMETER ID before the WS_FILENAME_GET call to get previous dir.
USe fm G_SET_USER_PARAMETER to set the parameter in user profile with current dir
REgards
Sridhar
Message was edited by: Sridhar K