Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Validation and F4 help on an application server file path parameter

Former Member
0 Likes
2,358

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,065

Hi

Use FM-RZL_READ_DIR_LOCAL

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

10 REPLIES 10
Read only

Former Member
0 Likes
2,065

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

Read only

0 Likes
2,065

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

Read only

0 Likes
2,065

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

Read only

Former Member
0 Likes
2,066

Hi

Use FM-RZL_READ_DIR_LOCAL

Read only

0 Likes
2,065

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

Read only

0 Likes
2,065

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

Read only

0 Likes
2,065

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.

Read only

0 Likes
2,065
Read only

0 Likes
2,065

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

Read only

0 Likes
2,065

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