‎2010 Oct 01 11:48 AM
Is it possible to call a static method from a public class in background??
Thanks!
Artur.
‎2010 Oct 01 1:51 PM
Technically, you cannot call a method in the background mode, however you can call its content in the background, just transfer the content of the method to a parameterised report-type program and use SUBMIT VIA JOB statement.
class=>run_in_background( parameters ... ).
METHOD run_in_background.
SUBMIT zrun_in_background ... VIA JOB...
ENDMETHOD.
‎2010 Oct 01 12:23 PM
Yes... unless the method needs interaction with the front end.
‎2010 Oct 01 12:32 PM
Can you tell me how can I call it in background please?
Thanks!
‎2010 Oct 01 1:12 PM
In exactly the same way as you call it in foreground!
Your question doesn't make sense. It's like asking "Can I run a function module in background". Or "Can I run a program in background". Generally speaking, yes you can. What we need to know is which method your wanting to call. The fact that it is static, or indeed a method, is utterly irrelevant to whether you can call it in background.
What are you trying to achieve?
‎2010 Oct 01 1:51 PM
Technically, you cannot call a method in the background mode, however you can call its content in the background, just transfer the content of the method to a parameterised report-type program and use SUBMIT VIA JOB statement.
class=>run_in_background( parameters ... ).
METHOD run_in_background.
SUBMIT zrun_in_background ... VIA JOB...
ENDMETHOD.