Skip to Content

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 31, 2012 at 12:59 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.