In article Save variant for single selection screen subscreen I've shown you how to save a variant for single selection-screen subscreen with a little help of FM RS_ISOLATE_1_SELSCREEN & RS_CREATE_VARIANT. ...
When building a program with multiple selection screens sometimes it may be needed to save the variant with entries only for one of the subscreens and not for the others. If you want to do that you have ...
... you set it to ‘X’, then as long as user will not unhide it and save it to the ALV variant, it will not be visible on the screen. But as said before it can be unhide using the display options.
...
... used by program or not.
To make long story short - I was correcting one day an old-style written code to include two additional function keys on selection-screen, which were "Favorite variants" ...
... of priorities for check variants, but I couldn't find corresponding DB table. Seems that they are stored directly in the checks that's why after some debugging I've setup a break-point in the SCI transaction ...
...
falv_stand_copy->variant-report = sy-repid.
falv_stand_copy->layout_save = 'X'.
falv_stand_copy->layout->set_zebra( abap_true ).
falv_stand_copy->display( ).
"copy of falv with own local redefinition ...
...
data: go_popup_custom_cont type ref to cl_gui_custom_container.
data: go_popup_grid type ref to cl_gui_alv_grid.
data: gs_popup_layout type lvc_s_layo.
data: gs_popup_variant type disvariant. ...
... We can do this using FM RS_SET_SELSCREEN_STATUS and passing proper function code (GET, SPOS, NONE for variant, check and info button). We need also need a form which will be called at end of task for our ...
...
type-pools: slis.
data: gt_fcat type slis_t_fieldcat_alv ,
gs_fcat like line of gt_fcat,
gs_layout type slis_layout_alv,
gs_variant_log type disvariant,
gs_variant type disvariant. ...