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: 

Problem 1 : Four ALV Grids in a Single Report

Former Member
0 Kudos

SDN Experts..

I need a help from you.

I developed a new report. On execution, it shows four ALV's, of which first, second and fourth are ALV grids, and the third one is ALV tree control.

I am using OOPS concept. ie, placing custom control on the screen, and creating container object and so on. So i have 4 custom controls placed one after other below.

In the selection screen of the report, i am giving the user to choose, which ALV he want to display, in the form of check boxes. So in this case, there are four chk boxes, and if he choose all the four, all four ALV's will be displayed in the single screen.

But, if the user checks only the fourth ALV grid, and execute the report, he will see nothing on the screen, since the fourth ALV grid is placed at the bottom, and he needs to scroll down to see that report.

NOW.

How can i manage this?

Based on the user's selection, i need to show the ALV grids one by one from the TOP of the output screen.

Any SUGGESTIONS / IDEAS ???

Edited by: Sriharikj on Jun 16, 2009 2:31 PM

Edited by: Sriharikj on Jun 16, 2009 2:33 PM

9 REPLIES 9

former_member212005
Active Contributor
0 Kudos

You can use splitter container...instead of using four different ALV Grids...

You can split the container on the basis of the parameter entered by the user...

Please let me know...if you are not clear

0 Kudos

i.e. You have to create one custom control and divide it into different containers..so that each can hold one grid..


    CREATE OBJECT gv_custom_container
      EXPORTING
        container_name              = 'CC_ALV_CONTAINER'.

    CREATE OBJECT gv_c_split
       EXPORTING
        parent            = gv_custom_container
        rows              = p_value                   "number of grid controls you require
        columns           = 1
       EXCEPTIONS
         cntl_error        = 1
         cntl_system_error = 2
         others            = 3.

0 Kudos

Hi Vin,

Its nothing but.. dividing one custom control into four portions right? i.e. (1)top left, (2)top right, (3)bottom left, (4)bottom right. And we can hide the borders, if required. Thts not the output I want.

If i am selecting four ALV's together.. i need the output to be one after other downwards.

Thanks,

SKJ

0 Kudos

Sri...

When you split the contianer...there is an option of specifying the number of rows and columns...if you keep the column more than 1 then you have aproblem of right left and so on...

but because you have specified only 1 column, you will get the grids one after the other downwards...

Think of rows and columns with many rows...but only one column...


CREATE OBJECT gv_c_split
       EXPORTING
        parent            = gv_custom_container
        rows              = p_value                   "number of grid controls you require
        columns           = 1
       EXCEPTIONS
         cntl_error        = 1
         cntl_system_error = 2
         others            = 3.

I hope it will help you!

0 Kudos

Thanks Vin.. Thts helpful. Lemme work with that.

Former Member
0 Kudos

Thanks

0 Kudos

Hey Folks..

I have an addition to the above scenario.. if there is a text box and an input/output field, jus after my third ALV and related to that ALV (i.e. if we are displaying the third ALv, that textbox and ip/op field shud be displayed along with it).

Here, Vin's Splitter Container is failing.

What will i do now???

Regards,

Srihari.

Former Member
0 Kudos

an addition to the solved scenario

Former Member
0 Kudos

Thanks floks!