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: 

2 ALV grids display in background

Former Member
0 Kudos

Hello,

I am using 2 ALV grids in my report output. But while running this is background it shows only one in the spool.

Can somebody please suggest the possible solutions ?

Following is the code I am using:-

  • Create grid to display deleted entries

CREATE OBJECT go_alv_grid

EXPORTING

i_parent = go_container

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

OTHERS = 5.

  • Create grid to display completed entries

CREATE OBJECT go_alv_grid2

EXPORTING

i_parent = go_container2

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

OTHERS = 5.

  • Prepare fieldcatalog

PERFORM perpare_fieldcat.

  • Set layout

lv_layout-cwidth_opt = 'X'.

  • Call display for deleted entries

CALL METHOD go_alv_grid->set_table_for_first_display

EXPORTING

is_layout = lv_layout

CHANGING

it_outtab = gt_wflog

it_fieldcatalog = gt_fldcat

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

  • Call display for completed entries

CALL METHOD go_alv_grid2->set_table_for_first_display

EXPORTING

is_layout = lv_layout

CHANGING

it_outtab = gt_wflog_rec

it_fieldcatalog = gt_fldcat

EXCEPTIONS

invalid_parameter_combination = 1

program_error = 2

too_many_lines = 3

OTHERS = 4.

Please suggest.

2 REPLIES 2

former_member188685
Active Contributor
0 Kudos

yes it displays only one grid in the spool. the other will miss. For background run you have to proceed differently in this case.

Former Member
0 Kudos

It isn't possible to display 2 ALV's in the background