Application Development and Automation 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: 
Read only

Two ALV in output using Object Oriented Model

Former Member
0 Likes
479

Hi,

<b>My requirement is</b>: I want to display two ALV in my report output.

I have two internal table. I want one ALV for each internal table.

It is almost same as that of Block list(can display multiple blocks in report output). But block list uses Function modules. I want same functionality but using Object oriented model.

Can any one help me please.

It will be great if you can give me ALV output in grid format

Warm Regards,

Izhar A Khan

1 ACCEPTED SOLUTION
Read only

sharat_chandra
Product and Topic Expert
Product and Topic Expert
0 Likes
460

Hi,

You have to define two screen areas as containers for each of the 2 ALV's. Then construct ALV grid on each of the areas using the CREATE OBJECT statement passing the container references.

Then use the SET_TABLE_FOR_FIRST_DISPLAY using each of the 2 ALV grid references & passing your internal tables.

Regards,

Sharat

4 REPLIES 4
Read only

sharat_chandra
Product and Topic Expert
Product and Topic Expert
0 Likes
461

Hi,

You have to define two screen areas as containers for each of the 2 ALV's. Then construct ALV grid on each of the areas using the CREATE OBJECT statement passing the container references.

Then use the SET_TABLE_FOR_FIRST_DISPLAY using each of the 2 ALV grid references & passing your internal tables.

Regards,

Sharat

Read only

0 Likes
460

Hi,

Just to elaborate :

Create the container like

(mr_contianer is type ref to CL_GUI_CUSTOM_CONTAINER.)

Draw two custom controls side by side in your screen ( say some 0100 ). Name them 'CNTRL1' & "CNTRL2'.

CREATE OBJECT: mr_container1

EXPORTING

container_name = 'CNTRL1'

repid = sy-repid

dynnr = gc_main.

CREATE OBJECT mr_grid1

EXPORTING

i_parent = mr_container1.

CREATE OBJECT mr_grid2

EXPORTING

i_parent = mr_container2.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
460

If you want the block list output, you must use the function module based tool, it doesn't exist using OO concepts.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
460

Thanx alot guyz