Hi ,
I want to display total of certain columns with sort function in ALV grid. It is coming fine but save layout and change layout icon is not coming. if i try to give option of save layout button the total is not coming.
can you please tell me how to acieve both.
gs_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
WRONG_INPUT = 1
NOT_FOUND = 2
PROGRAM_ERROR = 3
OTHERS = 4
.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_repid
is_layout = p_g_alv_layout
it_fieldcat = gt_field_catalog
it_sort = it_sortcat
it_events = i_Event
i_default = 'X'
i_save = 'A'
IS_VARIANT = gs_variant
TABLES
t_outtab = lt_invoice
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: / 'Error when calling ALV grid Display'.
ENDIF.
When i comment the parameter i_Callback_program i get total but not the save layout icon. when i uncomment i_callback_program i get save layout icon but toatl and sorting disappears.