ALV with IDA(ALV on HANA)-3

alv-idaRestricting maximum number of rows in alv.

 

 

 

The previous post Simple first ALV with IDA shows how to display alv with IDA.This post describes how to restrict the maximum number of rows to display.

Code:


DATAlr_salv TYPE REF TO if_salv_gui_table_ida.
TRY.
cl_salv_gui_table_ida=>create(
  EXPORTING
    iv_table_name       =  ‘SFLIGHT’
  RECEIVING
    ro_alv_gui_table_ida lr_salv ).
  CATCH cx_salv_db_connection.
  CATCH cx_salv_db_table_not_supported.
  CATCH cx_salv_ida_contract_violation.
ENDTRY.
* Set maximun rows to display
TRY.
lr_salv->set_maximum_number_of_rows(
  EXPORTING
    iv_number_of_rows 10 ).
  CATCH cx_salv_param_out_of_bounds.
ENDTRY.
* Display ALV
lr_salv->fullscreen)->display).


1

OUTPUT:

2


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s