03-31-2006 5:05 PM
Hi folks!
I'm not very familiar with job processing. I'm having a report that displays an alv grid as a result of it. However it seems that the amount of registers to be read from the database now they are much, much more, so the users are getting the dump of time exceeded.
What I have in mind is to run this on background, but I know there are some limitations when running on background. My question here is that:
Is it possible to have an alv grid report to run as a Job, or I would have to replace the alv by simple report with Write statement?
Thanks for any help.
Regards,
Gilberto Li
03-31-2006 5:51 PM
Hi again.
My code is a little old so it's not Object Oriented or in ABAP/OO
So my code to call the ALV-GRID looks like:
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_background_id = 'BUTTON_OFF_BACK'
is_layout = gs_layout
it_fieldcat = fieldcat
it_sort = lt_sort
it_events = gt_events[]
TABLES
t_outtab = itab_all.
Is there any way to do what Vij mentioned in non object oriented?
Thanks in advice.
Regards,
Gilberto Li
03-31-2006 5:13 PM
Hi,
you should write this code in your alv program.
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = off.
IF off IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
ENDIF.
Regards
Vijay
03-31-2006 5:16 PM
> Hi,
>
> you should write this code in your alv program.
>
>
CALL METHOD cl_gui_alv_grid=>offline
> RECEIVING e_offline = off.
> IF off IS INITIAL.
> CREATE OBJECT g_custom_container
> EXPORTING container_name = g_container.
> ENDIF.
>
>
> Regards
> Vijay
If so then how can this be done using the FM REUSE_ALV....
I am just curious.
03-31-2006 5:41 PM
> If so then how can this be done using the FM
> REUSE_ALV....
> I am just curious.
Why not simply poll sy-batch if you're using those function modules?
03-31-2006 5:14 PM
I believe thatit is taking a lot of time for the logic of the report to run. Not for the ALV. So that should not be a problem. You can run an ALV grid report as a job. NO problem in that.
Hope it solves it.
Thanks
Sarat Chandra
03-31-2006 5:18 PM
Hi again,
Ok, then there is no problem to run the alv report as a job.
See if I get this, when the job is finished running and I check the log I should see the alv report right?
Thanks again.
Regards,
Gilberto Li
03-31-2006 5:43 PM
The ALV GRID doesn't work in background mode, so if you use the trick shown on previous answer, you can see your log (print spool) in ALV ABAP LIST format .
Max
03-31-2006 5:51 PM
Hi again.
My code is a little old so it's not Object Oriented or in ABAP/OO
So my code to call the ALV-GRID looks like:
Call ABAP/4 List Viewer
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_background_id = 'BUTTON_OFF_BACK'
is_layout = gs_layout
it_fieldcat = fieldcat
it_sort = lt_sort
it_events = gt_events[]
TABLES
t_outtab = itab_all.
Is there any way to do what Vij mentioned in non object oriented?
Thanks in advice.
Regards,
Gilberto Li
03-31-2006 5:54 PM
Hi
DATA: FM_GRID(30).
IF SY-BATCH = SPACE.
FM_GRID = 'REUSE_ALV_GRID_DISPLAY'.
ELSE.
FM_GRID = 'REUSE_ALV_LIST_DISPLAY'
ENDIF.
CALL FUNCTION FM_GRID
EXPORTING
i_callback_program = g_repid
i_background_id = 'BUTTON_OFF_BACK'
is_layout = gs_layout
it_fieldcat = fieldcat
it_sort = lt_sort
it_events = gt_events[]
TABLES
t_outtab = itab_all.
mAX
03-31-2006 5:59 PM
Hi,
Batch mode alv_grid will not work, in background alv_list you have to use. but even then you can try my small code in alv_grid also.
Regards
Vijay
03-31-2006 6:02 PM
Hi again,
I've tried to run the ALV GRID report as a job.
And I get the following error: "INVALID_PRI_PARAMS"
Does this have to do to the reason that ALV-GRID can't run on background or this have to do with another reason?
Thanks for all your replies.
Regards,
Gilberto Li
03-31-2006 6:37 PM
Hi,
ALV-GRID will call custom contols and containers, and the error looks like not from your alv report. but it is from job settings. can you check it once.
give proper print parameters.
Regards
Vijay
03-31-2006 6:22 PM
Hi again,
Now i've tried to run the report with ALV_LIST statement
and i'm still getting the following error: "INVALID_PRI_PARAMS", does anyone knows why I get this error?
Thanks again.
Regards,
Gilberto Li
03-31-2006 9:36 PM
Hi,
Thanks again for your reply, I will double check.
Regards,
Gilberto Li