Overview ALV with IDA (SAP List Viewer with Integrated Data Access) helps tables that contain very large quantities of data to be displayed on the UI. The results of operations such as sorting, grouping, or filtering are also delivered with a very fast response time. It uses the in-memory database, such as SAP HANA, without having to switch to a new programming environment. There is no change in the User interface and standard functions (also ALV services). ALV functions are adjusted to the use of in-memory databases. The new general programming model (Coding Pushdown) is also optimally supported when using in-memory databases. Examples Example#1: Display Sales Order Details Following example demonstrates how to display sales order with SALV IDA. Output: Check DB Capabilities CHECK cl_salv_gui_table_ida=>db_capabilities( )->is_table_supported( iv_ddic_table_name = ‘VBAK’). Create IDA DATA(o_ida) = cl_salv_gui_table_ida=>create( iv_table_name = ‘VBAK’ ). Set Maximum Rows Recommended IF cl_salv_gui_table_ida=>db_capabilities( )->is_max_rows_recommended( ). o_ida->set_maximum_number_of_rows( iv_number_of_rows = 2000 ). ENDIF. Display o_ida->fullscreen( )->display( ). Program Output Example#2: Apply Filtering Following example demonstrates how to set filter by using PARAMETERS and SELECT-OPTIONS Step#1: Define Selection Screen Step#2: Convert Parameters and Select-Options to Range table using CL_SALV_RANGE_TAB_COLLECTOR Step#3: Apply filtering in ALV IDA Selection Screen Set Filter Output: Selection Screen Output Example#3: ALV Display Setting ◈ List of fields to be displayed ◈ Set Sort Order ◈ Display Options ◈ Set Currency Reference Field Restrict list of fields to be displayed Step#1 Prepare internal table with list of fields in sorted order Step#2: Pass the list of fields to SAL IDA Output: Set Sort Order Step#1: Prepare table for fields for which sorting is needed Step#2: Pass the sorted table to SALV IDA Output Display Options Set Currency Reference field Set the reference fields for currency and quantity fields Example#4: Event Handling User interactions on the ALV can be handled by implementing the event handler methods. ◈ Double Click ◈ Toolbar Button Double Click Step#1: Define Event Handler Class/Method Step#2: Implement Event Handler Class/Method Step#3: Enable Double Click for SALV Grid Step#4: Set Event Handler Method Implement Event handle method Enable Double Click and Set Selection Mode Instantiate Event Handler Class and Set Handler Output Toolbar Button Create own buttons on toolbar Step#1: Define Event Handler Class/Method Step#2: Implement Event Handler Class/Method Step#3: Add button to the Toolbar Step#4: Enable Selection mode for SALV Grid Step#4: Set Event Handler Method 1. Toolbar Event Handler Method Definition 2. Toolbar Event Handler Method Implementation 3.Add Button on to the Toolbar 4.Set Event Handler Method Output Example#5: Calculation Fields We can also display calculated fields apart from the Standard database table fields using calculation fields Implement Calculation field Handler Interface: IF_SALV_IDA_CALC_FIELD_HANDLER Step#1: Define Structure with custom fields. In our case we have two calculation fields namely TAXAMOUNT and NETAMOUNT Step#2: Implement method to get calculation field structure Register Structure type to the SALV IDA Grid Step#3: Implement method to get requested fields What are the database fields needed to calculate the custom calculation fields Step#4: Implement method to calculate Line Perform the Calculation Step#5: Pass the calculation fields handler object to SALV IDA Create method Output: Example#6: Working with CDS Views We can use CDS Views as a data source to display data using SALV IDA CDS Views ALV Program Output Example#7: Authority Check Authority check can be applied when working with SALV IDA. We have to use the method ADD_AUTHORIZATION_FOR_OBJECT of the interface IF_SALV_GUI_TABLE_IDA Classes/Interfaces: Class/Interface Purpose IF_SALV_GUI_TABLE_IDA ALV with integrated data access (ALV with IDA) CL_SALV_GUI_TABLE_IDA ALV with integrated data access (ALV with IDA) CL_SALV_RANGE_TAB_COLLECTOR Class for collecting range tables for multiple fields IF_SALV_GUI_TYPES_IDA ALV IDA API : Public data types IF_SALV_IDA_CALC_FIELD_HANDLER IDA API: Handler for Calculated Fields IF_SALV_GUI_TABLE_DISPLAY_OPT IDA ALV: Table Display Options API IF_SALV_GUI_TOOLBAR_IDA IDA API Toolbar Manipulation Object