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

Issue with Background execution of a Program

Former Member
0 Likes
779

Hi,

I have developed a simple Report.

If i execute the report in foreground, the execution will be perfect as per logic maintained in the code.

If i execute the report in background, a particular IF condition is getting failed in the program.

I tried to debug the code (maintaining sy-batch = 'X' while debug). The same IF condition which gets failed in background, will get satisfied now in debug mode with sy-batch = 'X'.

I believe sy-batch = 'X' means the program running in background.

But when i run the program in background (pressing F9 without any debug), again the particular IF condition in the code gets fails.

Any idea to resolve this kind of issues...??

Regards

Pavan

1 ACCEPTED SOLUTION
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
738

sy-batch = 'X' should do the job.

What operations you are performing at selection screen based on sy-batch ??

You can move the same logic to start-of-selection and it should work .

Hi,

I have developed a simple Report.

If i execute the report in foreground, the execution will be perfect as per logic maintained in the code.

If i execute the report in background, a particular IF condition is getting failed in the program.

I tried to debug the code (maintaining sy-batch = 'X' while debug). The same IF condition which gets failed in background, will get satisfied now in debug mode with sy-batch = 'X'.

I believe sy-batch = 'X' means the program running in background.

But when i run the program in background (pressing F9 without any debug), again the particular IF condition in the code gets fails.

Any idea to resolve this kind of issues...??

Regards

Pavan

4 REPLIES 4
Read only

Former Member
0 Likes
738

Hi,

Does your program contain FM's like GUI_UPLOAD, GUI_DOWNLOAD, etc...

If you r using any of these FM's that are related to presentation server, then u cannot run the program in background.

Thanks.

Read only

0 Likes
738

Hi,

My Program is not having any FM like GUI_UPLOAD or GUI_DOWNLOAD.

When run in background, basically a IF condition mentioned in the AT SELECTION-SCREEN event is getting failed.

Read only

0 Likes
738

What is "getting failed"? Result not true, so not going to the code inside IF/ENDIF? What is your expected result?

Please post the code part here (using code tags, only the relevant part, please watch the formatting).

Thomas

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
739

sy-batch = 'X' should do the job.

What operations you are performing at selection screen based on sy-batch ??

You can move the same logic to start-of-selection and it should work .