2009 May 22 7:12 AM
Hi
I have a field on a selection screen called File Path and it is for a download program where the user needs to specify the path for the download (NOT THE ACTUAL FILENAME).
I am trying to find a function or method that allows a user to use F4 help to browse for a directory rather than a specific file. There are lots of posts out there asking this question but all of the answers point to functions that allow you to browse for a particular file rather than just the file path/directory.
Does anyone know of a function that provides F4 help to browse for a file path on the Server (NOT PC). I would want the user to just be able to select the directory or path and have the path returned. They should not need to pick a specific file.
F4_DXFILENAME_TOPRECURSION is a very good function but unfortunately it makes the user pick a file rather than just a directory.
In addition to this, does anyone know of a function or method that allows you to then validate the path\directory that is entered?
Thanks for your help
Nicole
2009 May 22 7:24 AM
Hi
I have a field on a selection screen called File Path and it is for a download program where the user needs to specify the path for the download (NOT THE ACTUAL FILENAME).
I am trying to find a function or method that allows a user to use F4 help to browse for a directory rather than a specific file. There are lots of posts out there asking this question but all of the answers point to functions that allow you to browse for a particular file rather than just the file path/directory.
Does anyone know of a function that provides F4 help to browse for a file path on the Server (NOT PC). I would want the user to just be able to select the directory or path and have the path returned. They should not need to pick a specific file.
F4_DXFILENAME_TOPRECURSION is a very good function but unfortunately it makes the user pick a file rather than just a directory.
In addition to this, does anyone know of a function or method that allows you to then validate the path\directory that is entered?
Thanks for your help
Nicole
2009 May 22 7:23 AM
Hi,
Please make use of this CLASS "CL_GUI_FRONTEND_SERVICES" there you can make use of
the methods
"FILE_OPEN_DIALOG" for getting the file path
"FILE_EXIST" for checking the file existence
"DIRECTORY_EXIST" for checking the directory existence.
Hope this will help you.
Regards,
Smart Varghese
2009 May 22 7:34 AM
Thanks for your response.
Unfortunately these are only for the presentation server (PC). I need the relevant functions/methods for the application server.
Thanks again
Nicole
2009 May 22 7:34 AM
Thanks for your response.
Unfortunately these are only for the presentation server (PC). I need the relevant functions/methods for the application server.
Thanks again
Nicole
2009 May 22 7:24 AM
2009 May 22 7:36 AM
Thanks Lavanya
Unfortunately this FM does not really help as it just returns a list of files or directories in a specific directory you specify. I need to allow the user to browse through directories to pick the one they want without having to develop something from scratch.
Thanks again
Nicole
2009 May 22 7:53 AM
Hi,
You can try with the FM 'EPS_GET_DIRECTORY_LISTING'. With this Fm module you will get you the list of files of a particular path in an internal table. Then you can populate this internal table in F4 help.
Hope this solves your problem. If any difficulty, come back to me about that.
Below are some other FM related to application server directory. Hope these Helps.
EPS_GET_DIRECTORY_LISTING
EPS_GET_DIRECTORY_PATH
EPS_GET_FILE_ATTRIBUTES
EPS_GET_FTP_SYSTEM_INFO
Regards,
Shailesh Jadhav
2009 May 22 7:55 AM
Hi,
Check this. Here directory name will appear along with file path.If the user double clicks the directory, filenames in that directory will come.
CALL FUNCTION 'F4_DXFILENAME_4_DYNP'
EXPORTING
dynpfield_filename = p_applfile
dyname = sy-cprog
dynumb = sy-dynnr
filetype = 'P'
location = 'A'
server = space.
2009 May 22 7:58 AM
2009 May 22 11:02 AM
Thanks Shailesh,
Unfortunately EPS_GET_DIRECTORY_LISTING seems to only give me a list of the files within a directory whereas I need the sub directories within a directory.
Thanks for your help
Nicole
2009 May 22 11:15 AM
Thanks Jayanthi,
Unfortunately 'F4_DXFILENAME_4_DYNP' also only allows you to choose an actual file and have the full path including the filename returned to the selection parameter whereas I need them to be able to choose a directory and have the directory name returned to the selection parameter.
Thanks for your help anyway.
Regards
Nicole