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

cl_gui_frontend_services=>execute in function module

Former Member
0 Likes
1,127

Hello  all,

I created a function module and i use cl_gui_frontend_services=>execute method in this FM to trigger a BAT file in local computer.

When i run this function module in debug mode, i simply run this method with F6 and it works,  but when i call this FM directly without debugging, this method doesnt work.

I read that this class doesnt work in background process. So how does it work in debug mode? Is there a way to run this method in function module?

Thanks..

4 REPLIES 4
Read only

hendrik_brandes
Contributor
0 Likes
802

Hello,

if you are working in debugging-mode, your report has an active connection to your local workstation through SAP GUI. With this connection, it is possible to create lcoal files via the class CL_GUI_FRONTEND_SERVICES.

If your report is running in batch-mode, you cannot access to your local workstation, because there is no one. All things are running on an workprocess-instance on your application server having no GUI-connection.

At least, you cannot know, which user has started your report in background and create a file on his workstation.

Kind regards,

Hendrik

Read only

amol_samte
Contributor
0 Likes
802

Hi Aydin,

CL_GUI_FRONTEND_SERVICES class does not work for BG or other GUI functions....find alternate solution.

And as per knowledge debug mode is forground mode process.

Thanks,

Amol

Read only

Former Member
0 Likes
802

What do you suggest for that? How can i trigger a BAT file at my local computer?

Read only

matt
Active Contributor
0 Likes
802

The question of how to get a file to a local workstation in background has been discussed many times. Please search. Thread locked.