02-07-2018 10:51 AM
Hi all,
I have problem with ALV GRID from CL_GUI_ALV_GRID. After setting and saving layout (sort column, filter values etc.), layout criteria seems no to be saved. When I start report once again and choose my layout, sorting criteria doesn't work.
I am passing parameters in method set_table_for_first_display while creating ALV GRID:
is_variant = g_variant
i_save = 'A'
i_default = ''
I've tested all configuration of parameters and problem still exist. If somebody has ever had this kind of issue please help.
In other way I will be forced to use cl_salv_table to create ALV report.
Thanks for any help
Jakub
02-13-2018 4:45 AM
hi
for saving layout in oops alv.
u have to pass values to method set_table_for_first_display like below
DATA:GV_HANDLE TYPE DISVARIANT-HANDLE,
GV_LOG_GROUP TYPE DISVARIANT-LOG_GROUP.
CLEAR:GV_HANDLE,GV_LOG_GROUP.
GV_HANDLE = '9999'. " this is any value
GV_LOG_GROUP = '9999'. " this is any value
CLEAR LS_DISVARIANT.
LS_DISVARIANT-REPORT = SY-REPID.
LS_DISVARIANT-HANDLE = GV_HANDLE.
LS_DISVARIANT-LOG_GROUP = GV_LOG_GROUP.
CALL METHOD GO_ALV->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IS_VARIANT = LS_DISVARIANT " this is mandatory
I_SAVE = 'X' " this is mandatory
I_DEFAULT = 'X' " this is mandatory
IS_LAYOUT = LS_LAYOUT
CHANGING
IT_OUTTAB = GT_FINAL
IT_FIELDCATALOG = GT_FIELDCAT
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4.
02-14-2018 10:23 AM
I've already changed the way of creating ALV report but thank you for reply.