‎2007 Oct 26 9:08 AM
Hi all,
in a programm there is a ALV grid of type cl_gui_alv_grid.
When I run the programm, I can change the layout (hide columns etc) but I can't
save the changes I make. What do I have to do to activate the saving of the layout?
Which field do I have to set to activate it or what can already be set which disables the showing of the save possibility?
Greetings Fred.
‎2007 Oct 26 9:16 AM
Hi Fred
U need to transfer the name of the report and the user to the grid class in order to allow to save the layout:
DATA: LT_VARIANT TYPE DISVARIANT.
LT_VARIANT-REPORT = SY-REPID.
LT_VARIANT-USERNAME = SY-UNAME.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_VARIANT = LT_VARIANT
I_SAVE = 'A'
IS_LAYOUT = LT_LAYOUT
IT_TOOLBAR_EXCLUDING = GT_NO_CODES
CHANGING
IT_OUTTAB = T_OUTPUT
IT_FIELDCATALOG = GT_FIELDCAT.The user has to have the authorizations to manage the layout.
Max
‎2007 Oct 26 9:16 AM
Hi Fred
U need to transfer the name of the report and the user to the grid class in order to allow to save the layout:
DATA: LT_VARIANT TYPE DISVARIANT.
LT_VARIANT-REPORT = SY-REPID.
LT_VARIANT-USERNAME = SY-UNAME.
CALL METHOD ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_VARIANT = LT_VARIANT
I_SAVE = 'A'
IS_LAYOUT = LT_LAYOUT
IT_TOOLBAR_EXCLUDING = GT_NO_CODES
CHANGING
IT_OUTTAB = T_OUTPUT
IT_FIELDCATALOG = GT_FIELDCAT.The user has to have the authorizations to manage the layout.
Max
‎2007 Oct 26 11:17 AM
Hi Max,
thank you very much!
I already tried the i_save = 'A', but there was no variant, now it works!
Greetings Fred.
‎2007 Oct 26 10:04 AM