Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Job processing - Result ALV GRID

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

13 REPLIES 13

former_member188685
Active Contributor
0 Kudos

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

0 Kudos

> 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.

0 Kudos

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

asarat
Explorer
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Thanks again for your reply, I will double check.

Regards,

Gilberto Li