Skip to Content
Jul 28, 2012 at 02:21 AM

ALV Visible Row Count when changing views


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?