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

Default Layout for Multiple ALV displays

Former Member
0 Likes
1,422

Hello All,

I have a requirement where I am displaying multiple ALV grid displays on different tabs of a screen.

Now I have to set a default layout for each of the grids separately as they have different fields.

Please let me know how to do it, I am using OO ALV display.

Thanks a lot

Ruchi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
592

Hi,

pass the handle names for the two alv grids..in the parameter IS_VARIANT-HANDLE

and pass the variant name in the IS_VARIANT-VARIANT.

Thanks

Naren

Hello All,

I have a requirement where I am displaying multiple ALV grid displays on different tabs of a screen.

Now I have to set a default layout for each of the grids separately as they have different fields.

Please let me know how to do it, I am using OO ALV display.

Thanks a lot

Ruchi

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
592

Hi,

According to your grid called pass the variant name


    gs_variant-report       = sy-repid.
    gs_variant-username     = sy-uname.
    gs_variant-variant      = v_vari.   " Your variant Name

    call method grid1->set_table_for_first_display  
      exporting
        is_layout                     = gs_layout
        is_variant                    = gs_variant  "<<<<<<<<<
        i_save                        = 'A'
        it_toolbar_excluding          = i_exclude[]
      changing
        it_outtab                     = i_output[]
        it_fieldcatalog               = i_fieldcat[]
      exceptions
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        others                        = 4.

Read only

Former Member
0 Likes
593

Hi,

pass the handle names for the two alv grids..in the parameter IS_VARIANT-HANDLE

and pass the variant name in the IS_VARIANT-VARIANT.

Thanks

Naren