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: 

How can I add Two ALV GRID's into one page

Former Member
0 Kudos

Hello Friends,

Can anybody tell me how to Display two ALV GRID's in a single page,

One after the other?

Thanks in advance.

6 REPLIES 6

Former Member
0 Kudos

Hi Prathap,

U need to display using Blocked ALV's ,

Reuse_Alv_Blocklist_init,

Reuse_Alv_Blocklist_Display.

Thanks&Regard's

Bhaskar Rao.M

Former Member
0 Kudos

you use it in simple or in ocx

gopi_narendra
Active Contributor
0 Kudos

Use the FM : REUSE_ALV_BLOCK_LIST_APPEND

See the program : BALVBT01

Regards

Gopi

uwe_schieferstein
Active Contributor
0 Kudos

Hello Pradeepareddy

Basically we have to use <b>splitter containers</b> in order to display multiple controls on a single screen.

Have a look at the following sample reports:

You will find lots of sample reports dealing with ALV interaction (events) in the <i>ABAP Objects</i> forum (search for <b>ZUS_SDN</b>).

Regards

Uwe

Former Member
0 Kudos

Hi Pradeep,

Use these Two functions, you will get result.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'.

Thanks

senthil

Former Member
0 Kudos

HI.

REPORT z_alv_block_list.

  • Type-pools

TYPE-POOLS: slis.

  • Data declarations.

DATA: BEGIN OF t_vbak OCCURS 0,

vbeln TYPE vbeln,

bstnk TYPE vbak-bstnk,

erdat TYPE vbak-erdat,

kunnr TYPE vbak-kunnr,

END OF t_vbak.

DATA: BEGIN OF t_vbap OCCURS 0,

vbeln TYPE vbeln,

matnr TYPE vbap-matnr,

netpr TYPE vbap-netpr,

waerk TYPE vbap-waerk,

kwmeng TYPE vbap-kwmeng,

meins TYPE vbap-meins,

END OF t_vbap.

DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.

DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.

DATA: v_repid TYPE syrepid.

DATA: s_layout TYPE slis_layout_alv.

DATA: v_tabname TYPE slis_tabname.

DATA: t_events TYPE slis_t_event.

  • start-of-selection event.

START-OF-SELECTION.

v_repid = sy-repid.

  • Get the fieldcatalog for the first block

PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.

  • Get the fieldcatalog for the second block

PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.

  • Get the data for the first block

SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS

INTO TABLE t_vbak

FROM vbak WHERE vbeln > '0060000100'.

  • Get the data for the second block

SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10 ROWS

INTO TABLE t_vbap

FROM vbap WHERE vbeln > '0060000100'.

  • init

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = v_repid.

  • First block

v_tabname = 'ITAB1'.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = s_layout

it_fieldcat = t_fieldcatalog1

i_tabname = v_tabname

it_events = t_events

TABLES

t_outtab = t_vbak.

  • Second block

Reward all helpfull answers.

Regards.

Jay