Skip to Content
0

System Variable to Identify Background Task?

Jan 17 at 09:56 AM

56

avatar image

Hi,

Is there any system variable to identify whether a FM is called in background task, similar to SY-BATCH which is set when program is run in background mode.

[I have checked SY-BATCH, it is not set in case of BACKGROUND TASK.]

I need to put some condition inside the FM when it is run in background task as below:

CALL FUNCTION 'Z_TEST'
    IN BACKGROUND TASK
    DESTINATION 'NONE'
...
...
.

Is there any way to identify this using any existing system parameters or any other FM ?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mike Pokraka Jan 17 at 01:04 PM
0

Depends on what you consider "Background". What if it's running in Web GUI, Web Dynpro, UI5, mobile?

If it's specifically SapGUI related, then you could use FM GUI_IS_AVAILABLE

Share
10 |10000 characters needed characters left characters exceeded
Raymond Giuseppi
Jan 17 at 11:59 AM
0

Not sure, but you could look in the Abap stack (call FM SYSTEM_CALLSTACK) for function AFRC_EXECUTE?

Share
10 |10000 characters needed characters left characters exceeded