report zrich_0004 .
data: file type string,
result(1) type c.
start-of-selection.
file = 'C:/abaps/test.txt'.
call method cl_gui_frontend_services=>file_exist
exporting
file = file
receiving
result = result.
if result = 'X'.
write:/ 'file does exist'.
else.
write:/ 'file not found'.
endif.
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
Add a comment