Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SALV_WD_TABLE new entry and sort issue

Hi,

I have a dynamic SALV_WD_TABLE, and I do INSERT ROW with a custom button (just adds to context node DATA).

There is also one sorted column, and I am having index issues for ON_CELL_ACTION handlers.

The user INSERTS a new row, fills in some key cells, one of them affected by the sort, so before he hits enter this line is the 1st one in the table.

Now when he hits enter, the ON_CELL_ACTION triggers and it tells me R_PARAM-INDEX was 1 - as in first row.

But if I use that index to get the element from the context it's wrong, because context is already sorted, and this line is there under i.e. 7.

This is confusing, any hints?

replied

Weeell so it seems i shot myself in the foot again, because that behaviour is controlled with these settings:

  lr_table_settings->set_refresh_on_data_change( if_salv_wd_c_table_settings=>refresh_and_apply_services ).

   lr_table_settings->set_refresh_on_data_check( if_salv_wd_c_table_settings=>refresh_data_only ).

Once understood, it works as expected.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question