ALV with integrated data access
ALV (ABAP List Viewer) is a tool in SAP used to display data in tables (reports) with features like sorting, filtering, totals, etc.
IDA = Integrated Data Access
It means data is fetched directly from the database (SAP HANA) instead of loading everything into the application server first.
ALV with IDA is a modern way of displaying ALV reports that works faster and handles large data efficiently.
Cell action on ALV
Interface IF_SALV_GUI_TABLE_IDA provides method FIELD_CATALOG which returns reference of IF_SALV_GUI_FIELD_CATALOG_IDA.
Interface IF_SALV_GUI_FIELD_CATALOG_IDA provides method DISPLAY_OPTIONS which provides a reference of IF_SALV_GUI_FIELD_DISPLAY_OPT
The interface IF_SALV_GUI_FIELD_DISPLAY_OPT provides method DISPLAY_AS_LINK_TO_ACTION to enable link to action for the field an the event CELL_ACTION
Event CELL_ACTION provides reference of IF_SALV_GUI_ROW_DATA_IDA which has a method GET_ROW_DATA to read the row data.
CLASS lcl_handle_ca DEFINITION.
PUBLIC SECTION.
METHODS handle_cell_action
FOR EVENT cell_action OF if_salv_gui_field_display_opt
IMPORTING ev_field_name eo_row_data.
ENDCLASS.
CLASS lcl_handle_ca IMPLEMENTATION.
METHOD handle_cell_action.
DATA: ls_sflight TYPE sflight.
CHECK ev_field_name = ‘CARRID’.
* read the row data
eo_row_data->get_row_data(
EXPORTING
iv_request_type = if_salv_gui_selection_ida=>cs_request_type–all_fields
IMPORTING
es_row = ls_sflight ).
* Display the row data
cl_salv_ida_show_data_row=>display( iv_text = ‘Flight Row Info’ is_data = ls_sflight ).
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA: lr_salv TYPE REF TO if_salv_gui_table_ida,
lr_handle TYPE REF TO lcl_handle_ca.
cl_salv_gui_table_ida=>create(
EXPORTING
iv_table_name = ‘SFLIGHT’
RECEIVING
ro_alv_gui_table_ida = lr_salv ).
DATA(lr_fld_disp) = lr_salv->field_catalog( )->display_options( ).
* Enable link to action
lr_fld_disp->display_as_link_to_action( iv_field_name = ‘CARRID’ ).
CREATE OBJECT lr_handle.
SET HANDLER lr_handle->handle_cell_action FOR ALL INSTANCES.
* Display ALV
lr_salv->fullscreen( )->display( ).
Output- Link to Action is enabled for the field CARRID.
One click we get the popup with row data.
Conclusion
ALV with IDA represents a significant step forward in modern ABAP reporting by leveraging the power of in-memory databases like SAP HANA. Unlike classical ALV, which relies heavily on internal tables and application server processing, ALV with IDA shifts data-intensive operations directly to the database layer, resulting in faster execution, lower memory consumption, and efficient handling of large datasets.
Through this implementation, we have seen how features like direct data access, database-level filtering, and seamless UI integration enable developers to build high-performance reports with minimal coding effort. The ability to interact with large volumes of data in real time makes ALV with IDA particularly suitable for analytical and read-only scenarios.
However, it is equally important to understand its limitations—such as restricted customization and limited event handling—making it less suitable for highly interactive or editable applications.
In summary, ALV with IDA is an ideal choice when performance and scalability are the primary requirements, while classical ALV remains relevant for scenarios demanding flexibility and rich UI interactions. Choosing the right approach ultimately depends on the business requirement and system landscape.
ALV with integrated data access ALV (ABAP List Viewer) is a tool in SAP used to display data in tables (reports) with features like sorting, filtering, totals, etc. IDA = Integrated Data Access It means data is fetched directly from the database (SAP HANA) instead of loading everything into the application server first. ALV with IDA is a modern way of displaying ALV reports that works faster and handles large data efficiently. Cell action on ALV Interface IF_SALV_GUI_TABLE_IDA provides method FIELD_CATALOG which returns reference of IF_SALV_GUI_FIELD_CATALOG_IDA. Interface IF_SALV_GUI_FIELD_CATALOG_IDA provides method DISPLAY_OPTIONS which provides a reference of IF_SALV_GUI_FIELD_DISPLAY_OPTThe interface IF_SALV_GUI_FIELD_DISPLAY_OPT provides method DISPLAY_AS_LINK_TO_ACTION to enable link to action for the field an the event CELL_ACTION Event CELL_ACTION provides reference of IF_SALV_GUI_ROW_DATA_IDA which has a method GET_ROW_DATA to read the row data. CLASS lcl_handle_ca DEFINITION.
PUBLIC SECTION.
METHODS handle_cell_action
FOR EVENT cell_action OF if_salv_gui_field_display_opt
IMPORTING ev_field_name eo_row_data.
ENDCLASS.
CLASS lcl_handle_ca IMPLEMENTATION.
METHOD handle_cell_action.
DATA: ls_sflight TYPE sflight.
CHECK ev_field_name = ‘CARRID’.
* read the row data
eo_row_data->get_row_data(
EXPORTING
iv_request_type = if_salv_gui_selection_ida=>cs_request_type–all_fields
IMPORTING
es_row = ls_sflight ).
* Display the row data
cl_salv_ida_show_data_row=>display( iv_text = ‘Flight Row Info’ is_data = ls_sflight ).
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA: lr_salv TYPE REF TO if_salv_gui_table_ida,
lr_handle TYPE REF TO lcl_handle_ca.
cl_salv_gui_table_ida=>create(
EXPORTING
iv_table_name = ‘SFLIGHT’
RECEIVING
ro_alv_gui_table_ida = lr_salv ).
DATA(lr_fld_disp) = lr_salv->field_catalog( )->display_options( ).
* Enable link to action
lr_fld_disp->display_as_link_to_action( iv_field_name = ‘CARRID’ ).
CREATE OBJECT lr_handle.
SET HANDLER lr_handle->handle_cell_action FOR ALL INSTANCES.
* Display ALV
lr_salv->fullscreen( )->display( ).
Output- Link to Action is enabled for the field CARRID. One click we get the popup with row data. Conclusion ALV with IDA represents a significant step forward in modern ABAP reporting by leveraging the power of in-memory databases like SAP HANA. Unlike classical ALV, which relies heavily on internal tables and application server processing, ALV with IDA shifts data-intensive operations directly to the database layer, resulting in faster execution, lower memory consumption, and efficient handling of large datasets. Through this implementation, we have seen how features like direct data access, database-level filtering, and seamless UI integration enable developers to build high-performance reports with minimal coding effort. The ability to interact with large volumes of data in real time makes ALV with IDA particularly suitable for analytical and read-only scenarios. However, it is equally important to understand its limitations—such as restricted customization and limited event handling—making it less suitable for highly interactive or editable applications. In summary, ALV with IDA is an ideal choice when performance and scalability are the primary requirements, while classical ALV remains relevant for scenarios demanding flexibility and rich UI interactions. Choosing the right approach ultimately depends on the business requirement and system landscape. Read More Technology Blog Posts by Members articles
#SAP
#SAPTechnologyblog