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

save and select layout

Former Member
0 Likes
700

hi experts,

i had an requirement to display save layout and select layout in the application toolbar of alv grid display.

please help me.

regards,

karthik

5 REPLIES 5
Read only

Former Member
0 Likes
671

hello,

First declare variable disvariant:



data: gs_disvariant type disvariant value sy-repid.

then you must set is_variant and i_save parameters in alv grid.



call method go_grid->set_table_for_first_display
    exporting
      is_variant                    = gs_disvariant
      i_save                        = 'A'
      is_layout                     = gs_layout
    changing
      it_outtab                     = gt_outtab
      it_fieldcatalog               = gt_fieldcat[]      .

Read only

0 Likes
671

hi marcos,

thanks for reply you had specified an method is there any function module to do so.

regards,

karthik

Read only

Former Member
0 Likes
671

Hi,

Just to add have a look at the following link - a good example followed by sample text:

http://sgstocks.tripod.com/alvgrid_control.htm#Simple example of how to implement an ALV grid

Hope this will help.

Thanks,

Samantak.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
671

Go to SE80,select package BALV_ADDON

Select PROGRAMS->R_ALV_LIST_TOOLBAR_MANAGER->STANDARD

Just right click and select COPY , give your program name in to program and ZSTANDARD for tool bar ...

Now u can go to u r program and edit that toolbar

You can see a standard functionality for save layout and select layout in the MENU bars.

Just try adding two new buttons to the tool bar and assigning the same function code to the new buttons.

Read only

0 Likes
671

to display save layout and select layout in the application toolbar of alv grid display.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

i_callback_top_of_page = 'TOP_OF_PAGE'

it_fieldcat = g_t_fieldcat[]

is_layout = g_s_layout

it_events = g_t_events[]

i_save = 'A'

Pass 'A' to i_save .

'A' = Standard and user-specific save mode

Display variants can be saved both as user-specific and as standard

variants. Users make their choice on the dialog box for saving the

display variant.

This is enough .Hope it helps.

Thanks!