Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
506 views14 pages

SAP List Viewer IDA

SAP List Viewer IDA

Uploaded by

wiwins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views14 pages

SAP List Viewer IDA

SAP List Viewer IDA

Uploaded by

wiwins
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Products
Products Industries
Industries Services and Support
Services Support Training
Training Community
Community Developer
Developer

Partner
Partner About
About

 
Ask a Question Write a Blog Post Login

Nagaraju Nadipudi
July 16, 2018 5 minute read

SAP List Viewer with Integrated Data Access (ALV with IDA)
Follow RSS feed Like

6 Likes 8,151 Views 1 Comment

Contents

SAP List Viewer with Integrated Data Access (ALV with IDA).

Overview.. 3

Examples. 3

Example#1: Display Sales Order Details. 3

Example#2: Apply Filtering. 4

Example#3: ALV Display Setting. 6

Example#4: Event Handling. 8

Example#5: Calculation Fields. 12

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 1/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Example#6: Working with CDS Views. 15

Example#7: Authority Check. 16

Classes/Interfaces: 17

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 ltering 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

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 2/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Output

Example#2: Apply Filtering


Following example demonstrates how to set lter by using PARAMETERS and SELECT-OPTIONS

Step#1: De ne Selection Screen

Step#2: Convert Parameters and Select-Options to Range table using CL_SALV_RANGE_TAB_COLLECTOR

Step#3: Apply ltering in ALV IDA

Selection Screen

Set Filter
https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 3/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Output:
Selection Screen

Output

Example#3: ALV Display Setting


List of elds to be displayed
Set Sort Order
Display Options
Set Currency Reference Field

Restrict list of elds to be displayed


Step#1 Prepare internal table with list of elds in sorted order

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 4/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Step#2: Pass the list of elds to SAL IDA

Output:

Set Sort Order


Step#1: Prepare table for elds for which sorting is needed

Step#2: Pass the sorted table to SALV IDA

Output

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 5/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Display Options
Set Currency Reference eld
Set the reference elds for currency and quantity elds

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: De ne 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

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 6/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Enable Double Click and Set Selection Mode


Instantiate Event Handler Class and Set Handler

Output
Toolbar Button
Create own buttons on toolbar
Step#1: De ne 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


https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 7/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

1. Toolbar Event Handler Method De nition


2. Toolbar Event Handler Method Implementation

3.Add Button on to the Toolbar


4.Set Event Handler Method

Output
Click on Display Button

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 8/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Example#5: Calculation Fields


We can also display calculated elds apart from the Standard database table elds using calculation elds

Implement Calculation eld Handler


Interface: IF_SALV_IDA_CALC_FIELD_HANDLER

Step#1: De ne Structure with custom elds. 

In our case we have two calculation elds namely TAXAMOUNT and NETAMOUNT

Step#2: Implement method to get calculation eld structure

Register Structure type to the SALV IDA Grid

Step#3: Implement method to get requested elds

What are the database elds needed to calculate the custom calculation elds

Step#4: Implement method to calculate Line

Perform the Calculation

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 9/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

Step#5: Pass the calculation elds handler object to SALV IDA Create method

Output:

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 10/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

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

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 11/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

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


elds

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

Reference
https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 12/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

https://help.sap.com/doc/saphelp_scm700_ehp03/7.0.3/en-
US/f0/1df4a12b0c41c59fc72d007915ea43/frameset.htm

Alert Moderator

Assigned tags

ABAP Development | SAP SALV IDA |

Related Blog Posts

ALV IDA and HANA as a secondary database


By Wouter Lemaire , Dec 12, 2014
ALV IDA On External Dictionary View
By Amol Samte , Jul 02, 2015

Big Data on SAP UIs – Advances in ABAP List Viewer ALV on SAP HANA
By Former Member , Nov 25, 2014

Related Questions

Do we still have background job restriction for ALV with IDA?


By Saurabh Gupta , Sep 11, 2017

checkbox in ALV IDA

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 13/14
8/27/2019 SAP List Viewer with Integrated Data Access (ALV with IDA) | SAP Blogs

By watch point , Jul 30, 2019


SALV IDA Row/Column/Cell Coloring ?
By Kutay BEKTAŞ , Aug 15, 2017

1 Comment

You must be Logged on to comment or reply to a post.

Inderpreet Singh

March 21, 2019 at 7:02 am


Hi,

We are using the ALV IDA in our project and we noticed that the layout button of the ALV list is placed on
the extreme right as shown below:

and other icons are on the left side.


Our client wants to display all the buttons together on the left side.

Is there any way to align the layout button to left.

Thanks in advance!!!

Like (0)

Share & Follow

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Sitemap

Newsletter

https://blogs.sap.com/2018/07/16/sap-list-viewer-with-integrated-data-access-alv-with-ida/ 14/14

You might also like