‎2011 May 17 4:36 PM
Hello,
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.
‎2011 May 17 4:49 PM
Hi,
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.
Regards
Ram
‎2011 May 17 8:01 PM
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'.
endif.