Skip to Content

ALV oops in background job

Oct 26, 2016 at 07:59 PM


avatar image
Former Member

code.txtHi Friends

in attached code it giving dump for background job but still client asking to make it run in both mode foreground and background .

this is oops AlV and might be there is any way with simple changes it can work for both the modes

code.txt (30.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Nic Teunckens Oct 26, 2016 at 10:36 PM

I haven't taken a look at your code, but why not add a check on whether it is running in Background mode or not?

CHECK sy-binpt = abap_true.
CHECK sy-batch = abap_true.

Or better still, check for the use of GUI, and determine separate actions for GUI and NON-GUI processing ... (WRITE to list / Application Log / Export to Memory)

IF cl_gui_object=>gui_is_running = abap_true.
   <your (S)ALV logic here>
   <your WRITE_TO_LIST logic here ...>

Then decide on using (S)ALV or not, possibly exporting the results to memory or not?

10 |10000 characters needed characters left characters exceeded