cancel
Showing results for 
Search instead for 
Did you mean: 

ALV oops in background job

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

NTeunckens
Active Contributor
0 Kudos

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>
ELSE.
   <your WRITE_TO_LIST logic here ...>
ENDIF.

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