Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3458

CL_SALV_TABLE sort issue

$
0
0

I am using a CL_SALV_TABLE in fullscreen mode. The ALV is displayed fine.

 

But:

* I mark a column and the standard sort button of CL_SALV_TABLE, the row order changes

* I press a custom button

* In the eventhandler method for added_function, the table (the ALV is based on) has NOT been sorted

* After coming back to the ALV, the list is UNsorted again, but the column shows the red indicator for "sorted by this column"

  (the ALV seems to be thinking, that the table has been sorted, but it isn't)

 

The problem is, that I don't know which row the user has marked. If he marks the third row after sorting the grid, the read table ... index ... finds the row, which was the third BEFORE sorting (which is another row). The displayed ALV has another order than the itab, the third row in ALV is NOT the third row in the itab, the ALV is based on.

 

I've tried anything:

* GET_GLOBALS_FROM_SLVC_FULLSCR with check_changed_data

* refresh( refresh_mode = if_salv_c_refresh=>full )

* get_metadata( )

 

Nothing helped

 

example:

 

A         B        C

200     100     200

100     200     100

300     300     300

 

A shows the ALV after method 'display', B shows the sorted ALV list, C shows the itab. Of course, the user only can see B and want to mark the second row ('200'). In the event handler method for added_function I can see, that the second row has been marked - but based on the unsorted list (which means, I operate with '100' instead of '200')

 

What can I do?


Viewing all articles
Browse latest Browse all 3458

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>