Skip to Content
Former Member
Oct 23, 2013 at 02:08 PM

Values set in Subtotals removed after layout change


Hi guys,

I successfully set the necessary values in the Sub-total lines for the first display. Once the first display comes up, if the user changes the layout, the sub-total values get removed. I am using the AFTER_USER_COMMAND event to re-populate the values the same way I did for the first display, but when the

GRID1=>REFRESH_TABLE_DISPLAY( I_SOFT_REFRESH = 'X' ) is called the values I just set get removed.

This is basically what I'm doing:

  1. cl_gui_alv_grid->set_table_for_first_display
  2. Call method to set sub-totals
    1. cl_gui_alv_grid->get_subtotals
    2. Set values
    3. cl_gui_alv_grid->refresh_table_display
  3. Set handler after_user_command.

Everything ok so far... The Grid is displayed fine. When the user selects another Layout the event is captured, and the method to set sub-totals is called again.

Although I successfully set the values I need to see in the sub-totals, they don't show up on the ALV.

Please let me know if I'm missing something.

Best regards,