‎2007 May 29 10:33 AM
Hello !
I have a problem when executing my program in background.
In foreground I have no problem, my ALV appears. In the background I have a dump.
The current ABAP program "SAPLKKBL" had to be terminated because one of the statements could not be executed.I use the function module 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'F533_USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = i_fgroup[]
i_save = 'X'
it_sort = gd_sort
i_buffer_active = ' '
i_callback_pf_status_set = 'F534_SET_PF_STATUS'
TABLES
t_outtab = mytab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.I don't understand where the problem is. Please help me.
Thank you.
‎2007 May 29 10:47 AM
You cannot use ALV in background !
regards,
Hans
Please reward all helpful answers !!!!!
‎2007 May 29 11:02 AM
Hi,
Please refer this program of ALV in background:
/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job
Best regards,
Prashant
‎2007 Jun 25 4:29 PM
‎2014 Jan 07 1:08 AM
I love replying to old threads:
Try this link
http://scn.sap.com/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job
‎2014 Jan 07 3:45 AM
Can you try debugging the background job with command 'JDBG' and see where exactly problem is?
‎2014 Jan 07 8:39 AM
Hi
check sy-batch for displaying alv or not.
SY-BATCH indicates if the current execution is a batch job (background) or a dialog job(foreground). If sy-batch is 'X', then the execution is in the background.