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

Runtime Error : cl_gui_frontend_services file_copy

Former Member
0 Likes
606

Dear Experts,

I am using the method cl_gui_frontend_services=>file_copy to copy file from one location to another location.

But when either of the input parameters are invalid, the program throws a short dump like path_not_found, access_denied, file_not_found.

I think internally, the program calls raise satement.

How to handle these exceptions in order to avoid runtime errors/short dump?

Is there any exception class for all these type of exceptions?

Thanks in Advance

2 REPLIES 2
Read only

Former Member
0 Likes
419

I think you have commented the exception parameters in the code, while calling the method. Uncomment those and handle them by checking sy-subrc.

Read only

Former Member
0 Likes
419

Hi,

You may use ST22 and check which exception is beign raised under which scenarion.

Once you are ready with list of all Exceptions keep the Method call in TRY. ENDTRY. Block

and after the Method call use Catch Exception to catch all the possible exception into their Class Reference.

Thanks,

Preyansh