cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Visible Row Count when changing views

roger_beach
Participant
0 Kudos

We have an ALV within a Web Dynpro component which has multiple views.

We set the row count dynamically to the number of records we have in the context in the initial view.

If we then switch to another view within the ALV and then switch back to the initial view, the visible rows are reset to 4 (the default in the config/personalization).

I can't seem to find a spot to recalc the visible row count when switching between views in the ALV.

I read somewhere that you need to be careful not to call set_data( ) once you've set your visible row count as that will reinitialize the table settings.  I've put breakpoints all over within our component including every call of set_data( ).  However, when switching views none of the breakpoints are triggered.

This component is part of an FPM form utilzing HCM P&F.  We implemented the calculation of the visible row count in on_alv_after_config which solved an issue we had when opening in the approver step of the workflow where we were seeing something similar where the visible row count was being reset to 4.  However, this did not help when at the intiator level and switching views.

When switching views is there a spot to write some code to recalc the visible row count that I must be overlooking?

Accepted Solutions (1)

Accepted Solutions (1)

roger_beach
Participant
0 Kudos

Actually, WDDOMODIFYVIEW of course does the trick, we were overwriting our calculated row count at some point.

Answers (0)