2008 Dec 10 4:26 AM
Hi,
I have a requirement where i need to display classical report with interaction when i run the report in froeground. But i need to display the report in ALV Block List when the user runs the same report in background.I want to put a IF condition for my subroutines so that i can meet my requirement.
Kindly suggest what is the system variable i need to use (may be SY-BATCH i suppose,but not sure)
and what value i need to pass in the system variable .
In short what i want is , if there is any system variable to indicate that my job is running in foreground
or background. If so what value i need to pass so that i can put a check on it.
2008 Dec 10 4:35 AM
There are two way to do that.. you can use sy-ucomm = 'SJOB' (function code for F9 button) and sy-batch = 'X' (jbs run on back ground)..
2008 Dec 10 4:30 AM
Hi Murali,
You are correct, do not hesitate use SY-BATCH.
if it doesn't serve your purpose we will think other options, be aggressive while implementing your ideas/
Best Regards
Ramchander Rao.K
2008 Dec 10 4:32 AM
hi ramachander,
thanks for ur reply butv what value i need to pass in sy-batch.
2008 Dec 10 4:34 AM
Hi Murali,
It takes only two values either 'X' (true) or ' ' ( false)
Best Regards
Ramchander Rao.K
2008 Dec 10 4:36 AM
By changing the Value of Sy-batch = 'X' we cannot set The execution in Background.
But If the Execution is set to Background the value of Sy-batch = 'X' ,in forground Sy-batch = ' ' .
in short We can only check the values of Sy-batch with either X or Blank.
2008 Dec 10 4:32 AM
Use SY-BATCH EQ 'X'.--- For if program is running in the background.
2008 Dec 10 4:33 AM
Hi,
U can use SY-BATCH check.
If sy-batch = 'X' this means the program is runnign in the background.
sy-batch NE 'X' runs in foreground.
Hope this helps.
Regards,
Judith
2008 Dec 10 4:35 AM
There are two way to do that.. you can use sy-ucomm = 'SJOB' (function code for F9 button) and sy-batch = 'X' (jbs run on back ground)..
2008 Dec 10 4:38 AM
2008 Dec 10 4:44 AM
Hi Murali,
As told above, SY-BATCH is a deciding parameter and u cannot use it to make a Job run in Background. This proves useful when a report which is also run in foreground is used for a background job as well and in those cases you need some other input screen suitable for variants etc.
To schedule u knw its SM36.
Thanks,
Narayanan K N