Skip to Content
author's profile photo Former Member
Former Member

Multiple ALV grid (do not know the number of ALV tables b4 runtime)

Hi all,

I am aware that there are many posts on multiple ALV grid, but I can't find any that fits my requirement.

My requirement is to display multiple ALV grid tables using ABAP OO (not ALV lists). But I do not know the number of ALV grids tables that I have to create before runtime (so I cannot create multiple custom controls before runtime).

Basically, I have a selection screen with a parameter that will determine the number of ALV tables that I have to create. Each table is of a different structure.

I can't use the splitter container either, coz if I have too many tables, then each section is limited to a few lines of screen.

My idea is to have something similar to NEW-PAGE command for reports. So the same custom control will be used for a different table at a NEW-PAGE. But apparently, NEW-PAGE does not work if I were to create a SCREEN for the ALV grid. Any one has any idea?

Thanks in advance =)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 28, 2006 at 02:00 PM

    Hi

    Why cant u try with tree struture.

    There will be nodes on left side, if u click on each node new table will be

    displayed . The no of nodes equals to number of tables from the selection

    screen .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 04:23 AM

    Hi,

    There is a concept of Custom Containers in OO ALV's where u can have multiple GRID's, try to learn the concept. I think thats the only way u can have multiple GRIDS's in a single screen.

    Regards,

    Aravind

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2007 at 07:16 AM

    use cl_gui_splitter_container.

    and at runtime you can decide how many rows/columns you are going to have inthe screen and each cell can be used for rendering a ALV grid.

    example

    create object g_r_container

    exporting container_name = 'CUSTOM'.

    create object g_r_splitter_1

    exporting parent = g_r_container

    rows = 3

    columns = 1 .

    here the rows and columns value can come from your selection screen or thru calcluted value from within your program.

    once its split

    then get the reference of the container (splitter container cell)

    call method g_r_splitter_1->get_container

    exporting

    row = 1

    column = 1

    receiving

    container = g_r_container_1.

    call method g_r_splitter_1->get_container

    exporting

    row = 2

    column = 1

    receiving

    container = g_r_container_2.

    call method g_r_splitter_1->get_container

    exporting

    row = 3

    column = 1

    receiving

    container = g_r_container_3.

    then use them to place alv grid

    create object from_grid

    exporting i_parent = g_r_container_1

    i_appl_events = 'X' .

    create object to_grid

    exporting i_parent = g_r_container_2

    i_appl_events = 'X' .

    create object fin_grid

    exporting i_parent = g_r_container_3

    i_appl_events = 'X' .

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2007 at 07:16 AM

    use cl_gui_splitter_container.

    and at runtime you can decide how many rows/columns you are going to have inthe screen and each cell can be used for rendering a ALV grid.

    example

    create object g_r_container

    exporting container_name = 'CUSTOM'.

    create object g_r_splitter_1

    exporting parent = g_r_container

    rows = 3

    columns = 1 .

    here the rows and columns value can come from your selection screen or thru calcluted value from within your program.

    once its split

    then get the reference of the container (splitter container cell)

    call method g_r_splitter_1->get_container

    exporting

    row = 1

    column = 1

    receiving

    container = g_r_container_1.

    call method g_r_splitter_1->get_container

    exporting

    row = 2

    column = 1

    receiving

    container = g_r_container_2.

    call method g_r_splitter_1->get_container

    exporting

    row = 3

    column = 1

    receiving

    container = g_r_container_3.

    then use them to place alv grid

    create object from_grid

    exporting i_parent = g_r_container_1

    i_appl_events = 'X' .

    create object to_grid

    exporting i_parent = g_r_container_2

    i_appl_events = 'X' .

    create object fin_grid

    exporting i_parent = g_r_container_3

    i_appl_events = 'X' .

    Regards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.