‎2010 Jun 11 1:23 PM
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
‎2010 Jun 11 2:44 PM
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[] .
‎2010 Jun 14 8:05 AM
hi marcos,
thanks for reply you had specified an method is there any function module to do so.
regards,
karthik
‎2010 Jun 12 5:38 PM
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.
‎2010 Jun 14 10:02 AM
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.
‎2010 Jun 18 1:22 PM
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!