Skip to Content
Technical Articles
Author's profile photo Alexander Laible

F4 File-Browser (Application Server directories)

Introduction

Dear ABAP Friends,

as I was playing around with some EnjoyControl classes after attending course BC412, I decided to write a little F4 File-Browser (I still haven’t found any user-friendly standard solution for this).

The File-Browser either takes a logical path or a physical path as input parameters.

The sample coding is available here: https://github.com/alaible/abap_file_browser

The function modules can be tested with report

ZTEST_FILE_DEMO

The logical path needs to be defined with TA FILE in advance.

There are two function modules available:

Z_SELECT_PATH_SIMPLE

which only includes the tree control and

Z_SELECT_PATH

which also has a text edit for quick viewing text file content.

Here are some Screenshots:

Sample%20Report

Sample Report

FILE-Definition

FILE-Definition

File-Browser%20without%20textedit

File-Browser without textedit

There is a file search included:

file-search

file-search

The file/path can be selected by double-clicking the corresponding tree node:

selected%20path

selected path

File-Browser with text-edit (implemented via drag and drop on the textedit):

viewing%20content

viewing content

In order to read the directory content, I ended up copying function module EPS2_GET_DIRECTORY_LISTING (which only lists files). Is there any other solution for this? (I know that you can define some OS commands to do that, but I never tried).

How do you handle file search on Application-Server directories?

I hope you enjoyed reading this blog post!

Cheers,

Alex

 

 

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Shai Sinai
      Shai Sinai

      Thanks for sharing. An interesting solution.

       

      Please take into account also security aspects.

      Author's profile photo Alexander Laible
      Alexander Laible
      Blog Post Author

      Thanks for your feedback!

      What exactly do you mean?

      Author's profile photo Shai Sinai
      Shai Sinai

      Authorizations/Data security.

      Not everyone should be allowed to list all the files in the application server and/or display the contents of files.