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 Report
FILE-Definition
File-Browser without textedit
There is a file search included:
file-search
The file/path can be selected by double-clicking the corresponding tree node:
selected path
File-Browser with text-edit (implemented via drag and drop on the textedit):
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