‎2008 Dec 15 2:10 PM
Hi Experts,
I need an F/M which can be used to get the specified folder selected by end user in browsing window in a target path ( as Parameter type).
Thanks in advance.
‎2008 Dec 15 2:18 PM
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ' '
IMPORTING
file_name = p_file1.
‎2008 Dec 15 2:22 PM
‎2008 Dec 15 2:25 PM
Hi there you can use
CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOGCALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = ',*.* ,*.*.'
initial_directory = 'C:\'
multiselection = ' ' "No multiple selection
CHANGING
file_table = it_tabemp
rc = gd_subrcemp.
‎2008 Dec 15 3:12 PM
Hi Jay,
Actually I don't need to give the filename in open folder dialog box. I only want the end user to select own directory path where he/she wants to save the file. I need to download the 'PDF' documents attached to a Specification in SAP EHS. I ll get the document downloaded from BAPI 'BAPI_DOCUMENT_CHECKOUTVIEW2' in system defined path, i.e. in SAP Work-directory. Now, File name is generated dynamically and attached with the 'User Specified Folder Path' internally in report.
Please suggest more.
Thanks for ur reply.
‎2008 Dec 15 3:18 PM
Hi
U can try to use the method DIRECTORY_BROWSE of class CL_GUI_FRONTEND_SERVICES
Max
‎2008 Dec 15 3:26 PM
Ohh ok..
We have this option of using FM :
SO_SPLIT_FILE_AND_PATH
Splits the filename and its path i.e. c:\temp\hello.txt would return 'hello.txt' & 'c:\temp\'