Application Development 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: 

call function 'SAPGUI_SET_FUNCTIONCODE' .

Former Member
0 Kudos

Hi Guys,

when i am executing a zreport from foreground its working fine.Bur when i execute the same program in background the jod is not getting executing .I am getting an error message like---

09.05.2011 09:53:10 Job started

09.05.2011 09:53:10 Step 001 started (program ZBGHR_APR2011_MAINT, variant &0000000000039, user ID ******)

09.05.2011 09:53:10 Unable to initialise ABAP Control Framework ...

09.05.2011 09:53:10 Spool request (number 0000036474) created without immediate output

09.05.2011 09:53:10 Only inconsistent rows will be updated

09.05.2011 09:53:10 Job cancelled after system exception ERROR_MESSAGE

I kept breakpoint at this functionmodule -- 'SAPGUI_SET_FUNCTIONCODE' . here i am facing this problem the message is getting populated here.Can u tell me how to avoid this error,and to run my backgroung job sucessfully.

can u plz explain me y i am facing this error.PLZ

Moderator message: please do not use SMS speak.

Edited by: Thomas Zloch on May 9, 2011 2:10 PM

3 REPLIES 3

Former Member
0 Kudos

Hi,

The function module is used in the foreground. but cannot work in background. Bypass the FM in background using sy-batch and check

Regards

Dande

0 Kudos

Hi Dande,

Thanks for ur immediate reply.The solution u gave waorked .but the job is getting concelled.In my custom selection screen i am having a checkbox FIX ALL. if i check it and run the report in backgroung its throughing an error like "job concelled after system exception ERROR_MESSAGE". If i run the same report without check the job is succesfull. I just want to find where that message is getting populated .Please can u help how to go to that message directly in my report.Please ........

Moderator message: again, please do not use SMS speak, use the spell checker instead (u, ur, waorked, concelled, backgroung, throughing, ...)

Edited by: Thomas Zloch on May 10, 2011 5:05 PM

former_member191735
Active Contributor
0 Kudos

Ummm.. read the function module documentation

FU SAPGUI_SET_FUNCTIONCODE

____________________________________________________

Short Text

Set a function code and continue processing

Functionality

This module simulates user input in the command field. This enables you to run screen sequences without user input.

This is for foreground and when you run the program in background, you will not have access to control framework.

As someone said in earlier post, use SY-BATCH to find out if it is running in background then by-pass this code