‎2009 Dec 30 8:41 AM
Hallo,
on a ALV grid toolbar you have a standard button to select a Layout or to change a layout.
But i want to have all of the 4 possibilities in it. you will get a menu with selection.
for example i did this:
<lfs_toolbar>-function = '&MB_VARIANT'.
<lfs_toolbar>-icon = icon_alv_variant_choose.
<lfs_toolbar>-quickinfo = 'Layout selecteren...'.
<lfs_toolbar>-butn_type = 1.
but you only get 1 possibility and that is to select a layout.
I want :
- Select layout
- Change layout
- Save layout
- Manage layout
how can I do that? is this standaard? I can't find it
please help me
Akin
‎2009 Dec 30 11:32 AM
Some ideas that can help you :
1. If you have seen this in any transaction or report . just try to find out how is it implemented.
2. You can create your own PF status and then make these as menu option or them as buttons. In this you need to handle these by sy-ucomm . This will also require study of how these functions
- Select layout
- Change layout
- Save layout
- Manage layout
are implemented in standard. Debug and try.
Hope this helps you.
‎2009 Dec 30 12:10 PM
Hallo,
I already have it.
You only have to do is add a variant to it. that's it!
this is it:
make a variable:
Data: gs_variant TYPE disvariant.
give it youre reportname to it: gs_variant-report = sy-repid.
use it with youre Call Method!! -> then it will come automatically!!
CALL METHOD gr_grid->set_table_for_first_display
EXPORTING
i_buffer_active = abap_false
i_bypassing_buffer = abap_true
is_layout = gs_layout
is_variant = gs_variant
it_toolbar_excluding = lt_excluded
i_save = 'A'
CHANGING
it_outtab = gt_outtab
it_fieldcatalog = ut_fieldcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.