ALV with IDA means SAP List Viewer with Integrated Data Access. In this post you will learn how to create a simple ALV using IDA class.

ALV with IDA is a special version of the List Viewer that enables display of data as ALV from tables having large number of records. The operations like sorting, and filtering can also be performed faster.

ALV vs ALV with IDA

Data RetrievalData is retrieved in Internal Table by ProgramOnly Table name in passed in program. Data retrieval is handled by ALV.
Displayed DataAll records from Internal Table are shownRecords which fill the visible area are displayed
Scrolling / Sorting / FilteringHandled at application layerA new SQL query is triggered every time
Memory Consumption Depends on the size of the Internal TableOnly as per the visible area columns and rows
SpeedTime required for all data to be fetched and transferred to ALVTime required for visible area records to be fetched and transferred
Table 1. ALV vs ALV with IDA

The class to manage ALV IDA is cl_salv_gui_table_ida. The amazing thing is that a single line of code is enough to display ALV. See: Sample Report SALV_IDA_DISPLAY_DATA_SIMPLE.

cl_salv_gui_table_ida=>create( 'SFLIGHT' )->fullscreen( )->display( ).

Here is how the output looks like.

However, the ALV IDA comes with its own set of restrictions –

  1. Handling of data that is changed during display is not supported. Data records that are removed during the display are automatically filled by empty lines.
  2. The Data Display is restricted to a maximum of 2 billion cells.
  3. All available operations are then executed on the entire data set
  4. Aggregation of amount fields with currencies or quantities can be displayed when same currency or unit
  5. Table fields of type STRING should not be used.
  6. The ready for input status for cells is not supported in IDA ALV.
  7. IDA-ALV programs cannot be scheduled as background jobs.

However, SALV with IDA is not supported by all versions, so it is best to check whether this is supported in the code.

Below code will also produce same output as above. It will set limit on records displayed to 50 in case setting up max rows is recommended as per db capabilities.

DATA(lo_db_cap) = cl_salv_gui_table_ida=>db_capabilities( ).
IF lo_db_cap->is_table_supported( 'SFLIGHT' ).
  DATA(lo_ida) = cl_salv_gui_table_ida=>create( 'SFLIGHT' ).

  IF lo_db_cap->is_max_rows_recommended( ).
    lo_ida->set_maximum_number_of_rows( 50 ).

  lo_ida->fullscreen( )->display( ).


In following posts of this series, I will discuss how to handle selection screen, column settings, and other such things which we do in usual ALV.

Visit ABAP on HANA series for Tutorials on CDS, AMDP, Eclipse, and ALV IDA.

If you like the content, please subscribe…

Join 4,032 other subscribers

Discovering ABAP YouTube Channel