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

differentiate foreground and background processing

Former Member
0 Likes
883

Hi All,

I want to execute a certain report in background. If the user tries to execute the program in foreground, the system should prompt him not to run it in foreground. In the same way, the message should not come if the program is run in backgroud.

That is, the system should differentiate whether the program is run in foreground or in background. How to differentiate them?

If i could differentiate, i could code a message to display when the user runs the program in foreground.

Please help me.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
553

if sy-batch = 'X' '' then it is runing in background other wise it is running in foreground

<enter ur code here, to display when running in background>

else

<enter ur code here, to display when running in foreground>

endif.

Madhavi

2 REPLIES 2
Read only

Former Member
0 Likes
554

if sy-batch = 'X' '' then it is runing in background other wise it is running in foreground

<enter ur code here, to display when running in background>

else

<enter ur code here, to display when running in foreground>

endif.

Madhavi

Read only

Former Member
0 Likes
553

Answer was useful