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

Foreground / Background issue?

Former Member
0 Likes
411

Hi, Experts:

If user run z_program download data to a local file in the foreground. how to disable background run option.

Thanks in advance.

3 REPLIES 3
Read only

former_member156446
Active Contributor
0 Likes
389

you can check the condition if sy-batch = ' '. it means its foreground... if its X then its background ..

Read only

Former Member
0 Likes
389

The business knows that, its meant for foreground, right? Why they run it in back ground? but, still if they want, u can implemet the suggestion as above reply.

Anyhow, even they run it in back ground, it does not work!! bcoz, its saving/downloading the data into LOCAL file!!

thanq

Read only

former_member203501
Active Contributor
0 Likes
389

do like this ....

prepare final internal table ..

if sy-batch = space . <----


this is for fore ground.

do processing here...

else.

message i000 with ' we cannot run this in background'.

endif.