!--a11y-->
Purpose
The standard function
Change Layout can be accessed by users by clicking an icon in the toolbar. This icon allows users to adjust the current layout to their requirements for the lifetime of the control instance.The application developer determines if users are allowed to save layouts and defines the saving options available.

See also report
Prerequisites
In the default setting, users can save a default layout. If such a default layout exists, it is loaded when method
set_table_for_first_display is called. If you do not want to allow users to create default layouts, set parameter I_DEFAULT of this method to SPACE .Process Flow
DATA: X_SAVE, "for Parameter I_SAVE
GS_variant TYPE DISVARIANT. "for parameter IS_VARIANT
G_REPID = SY-REPID.
GS_variant-REPORT = G_REPID.
X_SAVE = 'U'. "layouts can only be saved as user specific ones
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING I_STRUCTURE_NAME = 'SFLIGHT'
IS_VARIANT = GS_variant
I_SAVE = X_SAVE
CHANGING IT_OUTTAB = GT_SFLIGHT.

If you pass only the actual parameter for
IS_VARIANT , users can only load layouts but not save new ones. If you use parameter I_SAVE , passing a layout structure with IS_VARIANT is a required step.
Result
The toolbar now includes a pull-down menu next to the layout icon that allows users to save and load layouts. Depending on the value of parameter
I_SAVE , the following options for saving layouts are available:Saving Options for Layouts
I_SAVE = SPACE |
Layouts cannot be saved. |
I_SAVE = 'U' |
Only user-defined layouts can be saved. |
I_SAVE = 'X' |
Only global layouts can be saved. |
I_SAVE = 'A' |
Both user-defined and global layouts can be saved. |