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

Error : while calling CL_GUI_FRONTEND_SERVICES=>EXECUTE

Former Member
0 Likes
756

HI Expert,

I am calling CL_GUI_FRONTEND_SERVICES=>EXECUTE in a RFC for running a Java program.This Java program converts a GIF image to Bitmap.

When i execute this RFC (containing method) manually then there is no problem and it works perfectly but when the same RFC is called through outside means from Java code then it gives error - "Access via NULL Object reference".

How to resolve the error.

Regards,

Abhishek

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
618

Methods of class CL_GUI_FRONTEND_SERVICES would only work if you try to execute them form the SAP GUI. That's why your RFC works good when you are running manually.

You can let your JAVA program handle the functionality which you are trying to achieve by running the EXECUTE method.

Regards,

Naimesh Patel

3 REPLIES 3
Read only

naimesh_patel
Active Contributor
0 Likes
619

Methods of class CL_GUI_FRONTEND_SERVICES would only work if you try to execute them form the SAP GUI. That's why your RFC works good when you are running manually.

You can let your JAVA program handle the functionality which you are trying to achieve by running the EXECUTE method.

Regards,

Naimesh Patel

Read only

0 Likes
618

Thanks Naimesh,

Thanks for quick reply , actually this RFC has to be called from outside, there is no other alternative. Is there any other method by using which i can achieve the same functionality as i do using EXECUTE method.

Regards,

Abhishek

Read only

matt
Active Contributor
0 Likes
618

Your Java program should be presented to the application server as an RFC itself. The last time I did anything like this was 7 years ago, using Com4ABAP. Things have moved on since then, and I'm not sure what the current recommended solution is. What you could do, which isn't as efficient, is present your java program as a web service.

matt