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.
Showing results for 
Search instead for 
Did you mean: 


Former Member
0 Kudos


I am facing an issue in finding whether my program is executed with variant or not.

My main objective is that if my program is running in background mode without using an Variant it should

giver error message.

Eg-1. If thorugh SE38 i selected Run In Background mode without selecting any variant it should give error message.

2.If through SM36 i schedule a job without selecting any Variant again it should give error message.

3, if variant is selected in both the above methods then program will get executed.

4.if run in foreground mode then program should get executed without checking for variant.


Former Member
0 Kudos


When your execute a report by choosing - Execute in background it will not give you any error unless you make a field obligatory or check the field is filled in at-selection-screen event.

The same holds good for running in fore ground as well.



Former Member
0 Kudos

Try this...

At Selection-Screen.

  If SY-BATCH eq 'X' and SY-SLSET is initial.
    Message E208(00) with 'Cannot run in background without variant'.