Skip to Content
0
Aug 10, 2016 at 03:32 PM

CL_SALV_TABLE ALV Grid Freezes When Scrolling

1042 Views

Hi all,

I've implemented a CL_SALV_TABLE with a dynamic ITAB which has quite a few columns 100+.

When I run the program on a reasonable data set (say a thousand entries) I am able to view all the entries by moving the scroll bar on the right manually, but if I proceed to scroll the mouse wheel a few times the grid slows very quickly and eventually freezes sitting in what looks to be a processing state with the bar across the top clocking and the session quits responding to any input. The code I've used for the grid seems pretty standard, but I've included it below in case it helps.

Here's the relevant alv creation code:

     TRY.
         CALL METHOD cl_salv_table=>factory
             IMPORTING
               r_salv_table = go_alv
             CHANGING
               t_table      = <lt_prod_data>.
       CATCH cx_salv_msg.
         MESSAGE `Unable to build Field Catalog` TYPE 'E'.
     ENDTRY.

     go_alv_layout = go_alv->get_layout( ).
     go_key-report = sy-repid.
     go_alv_layout->set_key( go_key ).
     go_alv_layout->set_default( abap_true ).
     go_alv_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
     go_alv_layout->SET_INITIAL_LAYOUT( p_vari ).

And here's the Display:

    go_alv_functions = go_alv->get_functions( ).
     go_alv_functions->set_default( 'X' ).
     go_alv_functions->set_all( 'X' ).

     CALL METHOD go_alv->SET_SCREEN_STATUS
       exporting
         report = sy-repid
         pfstatus = 'STANDARD'
         set_functions = go_alv->c_functions_all.

     TRY.
       go_alv_functions->add_function( Name = 'Change'
                                       icon = 'ICON_CHANGE'
                                       text = 'Change'
                                       tooltip = 'Change'
                                       position = if_salv_c_function_position=>right_of_salv_functions ).
     CATCH cx_root.
     ENDTRY.



     go_alv->display( ).

I've tried searching SNOTEs and not come up with much on things like "CL_SALV_TABLE alv scrolling".

If anyone has any suggestions please let me know.

Thanks!

-Chris