- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between class alv and function alv in SAP ABAP?
- Class alv and Function alv are different in terms of features. Below is the difference:
- Class alv are secured as compared to function alv.
- While using class alv, it improves the performance.
- With use of function alv, you can create screens using function module however you need to call separate programs to generate screen.
- Class alv provides Object Oriented functionality and hence they are easily reusable.
- You can execute function modules asynchronously and can also be called by other systems remotely.
Below is an example of class ALV:
DATA: lcl_alv TYPE REF TO cl_gui_alv_grid, t_gly TYPE STANDARD TABLE OF Travels . SELECT * FROM Travels INTO TABLE t_gly. CREATE OBJECT lcl_alv EXPORTING I_PARENT = cl_gui_container=>screen0. CALL METHOD lcl_alv->set_table_for_first_display EXPORTING I_STRUCTURE_NAME = 'Travels' CHANGING IT_OUTTAB = t_gly. CALL SCREEN 100.
Few of function module to create ALV reports:
Sr.No | Function Module & Description |
1 | REUSE_ALV_LIST_DISPLAY Display an ALV list |
2 | REUSE_ALV_GRID_DISPLAY Display an ALV grid |
3 | REUSE_ALV_COMMENTARY_WRITE Output list header information |
4 | REUSE_ALV_VARIANT_F4 Display variant selection dialog box |
5 | REUSE_ALV_VARIANT_EXISTENCE Checks whether a variant exists |
6 | REUSE_ALV_FIELDCATALOG_MERGE Create field catalog from dictionary structure or internal table |
Below shows the use of function module to display an ALV grid:
DATA: it_spfli TYPE TABLE OF spfli. SELECT * FROM spfli INTO TABLE it_spfli. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_structure_name = 'SPFLI' TABLES t_outtab = it_spfli.
- Related Articles
- How to switch between different views in ALV Grid in SAP ABAP?
- Suppressing duplicate entries in classical and ALV report in SAP ABAP
- Multiple ALV grids on a single screen in SAP ABAP
- How to create an ALV in docking container in SAP?
- Double click on ALV Grid to call Transaction and pass information in SAP
- Displaying T-code description and T-code field in Output ALV of report SM20 in SAP system
- Copying ALV layout from one client to another in SAP if they are not user specific
- Difference between Types,Types,Type-POOL and TYPE-POOLS in SAP ABAP
- Difference between Work area, global structure and internal table in SAP ABAP
- Difference Between Friend Function and Friend Class
- Difference between Internal tables, structures or work areas in SAP ABAP
- Difference between the use of Type, Types and TYPE POOL in SAP ABAP programming.
- What is the difference between class and typeof function in R?
- Distinguish SAP ABAP code between clients
- Difference between String class and StringBuffer class in Java

Advertisements