‎2013 Feb 13 9:00 PM
Hi,
I am using CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG to open a directory in Network. (I dont want to open or select any files just to open the directory and see documents are there or not)
example:
Network directory is: \\network\directory
Folders in the directory are: folder1, folder2.
now my code is like below:
lv_folder = '\\network\directory\folder1'.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
initial_directory = lv_folder
CHANGING
file_table = lt_file
rc = lv_rc.
This works fine.
Now if i am giving folder3 which is not existing in the directory.
lv_folder = '\\network\directory\folder3'.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
initial_directory = lv_folder
CHANGING
file_table = lt_file
rc = lv_rc.
after execution, i am seeing the last folder location '\\network\directory\folder1' instead of \\network\directory. Also other thing i observed is, if i open any other report which is using the same method it points to same old location '\\network\directory\folder1' .
This method is more suitable with my requirement(look and feel similar to our regular windows file opening) than other method: directory_browse.
Could you pls help where i am doing wrong.
Regards,
Sree
‎2013 Feb 13 9:13 PM
hello,
If the folder does not exist then the method will try to open a previously opened directory. You can check the code for the method, you will find the code for the same.
You could also check method DIRECTORY_BROWSE if you are only browsing directories. There are more of them which can be used to verify if directory exists
DIRECTORY_BROWSE
DIRECTORY_CREATE
DIRECTORY_DELETE
DIRECTORY_EXIST
best regards,
swanand