Only show first 500 objects in list #537

Render only the first 500 objects, as it takes a lot of time to render the html if there are _many_ objects
This commit is contained in:
larshp 2017-01-18 15:24:57 +00:00
parent 68c51626a3
commit e9c6b5a3d6

View File

@ -110,6 +110,7 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
lx_error TYPE REF TO lcx_exception,
lv_lstate TYPE char1,
lv_rstate TYPE char1,
lv_max TYPE abap_bool,
lo_log TYPE REF TO lcl_log.
FIELD-SYMBOLS <ls_item> LIKE LINE OF lt_repo_items.
@ -159,11 +160,20 @@ CLASS lcl_gui_view_repo_content IMPLEMENTATION.
ro_html->add( render_empty_package( ) ).
ELSE.
LOOP AT lt_repo_items ASSIGNING <ls_item>.
IF sy-tabix > 500.
lv_max = abap_true.
EXIT. " current loop
ENDIF.
ro_html->add( render_item( <ls_item> ) ).
ENDLOOP.
ENDIF.
ro_html->add( '</table>' ).
IF lv_max = abap_true.
ro_html->add( 'Only first 500 objects shown in list' ).
ENDIF.
ro_html->add( '</div>' ).
CATCH lcx_exception INTO lx_error.