Skip to Content
avatar image
Former Member

ALV oops in background job

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)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • 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?

    Add comment
    10|10000 characters needed characters exceeded