Introduction to SAP ABAP ALV with OOPs concept
- Swarna Munukoti
- L&T Infotech
In this article we will see of how to make the ABAP report an interactive one.
One way to make a report interactive is using ALV tool. I will give a brief idea of what ALV is all about using OOPs concept.
ABAP List Viewers (ALV):
The name itself indicates that the output view of a report is in the form of a list. This list can be displayed in two forms
- ALV List Form
- ALV Grid Form
This article covers only ALV grid form. This is the most preferable form because of its GUI capability. When coming to the implementation part of ALV Grid using OOPs concept, we can use the existing classes for generating ALV output: Here I am listing some of the widely used classes and its purpose:
- CL_GUI_ALV_GRI
- CL_GUI_CUSTOM_CONTANIER
- CL_GUI_SPLITTER_CONTAINER
- CL_GUI_CONTAINER
- CL_DD_DOCUMENT
- CL_GUI_HTML_VIEWER
- CL_ALV_CHANGED_DATA_PROTOCAL
CL_GUI_ALV_GRID: This class contains all the methods required to create an ALV and holds the events required for the generated ALV. The methods in this class are useful for:
- Setting the field catalog and its layout
- For assigning the ALV to the Custom container
- For changing the field catalog contents
- For adjusting the ALV display and the list goes like this.
I will explain how to use the methods and events with an example at the end of this article.
CL_GUI_CUSTOM_CONTAINER: It holds the Custom control that is created on the screen layout. The link to the custom control to the ALV will be done using this container class.
CL_GUI_SPLITTER_CONTANIER: Using this class we can split the container into several parts based on the requirement.
For instance, there may be a requirement in which top portion of the ALV Grid must hold the company logo and some other details like date and user ID and the remaining part must hold the loaded data. In this case we can use this class to split the container into two parts one for holding the company details and the other contains all the records.
CL_GUI_CONTAINER: This class is also useful while splitting a container. Each container part that is separated using the above class holds the form of this class.
CL_DD_DOCUMENT: This class is used to write text or labels or variables or logos etc., on the container layout.
CL_ALV_CHANGED_DATA_PROTOCAL: If the ALV is in edit mode then the changed values can be viewed through this class.
The following example demonstrates how to make use of the methods and events of CL_GUI_ALV_GRID.
Note: This program is not specific to any application. It will give the basic idea of implementing the double click, hotspot, data change, tool bar and user command events in ALV.
You can download the full copy of this programme at following link.
http://www.madeitsimple.com/forum/viewtopic.php?f=16&t=23
Regards,
Swarna


Good work swarna……
Thanks a lot Bhagya
Regards,
Swarna M
I found the details very useful. Thanks Swarna.
Can i get details about how to write print control commands for a SAP Script?
Hi Swarna,
Great work !! Thankuu !!
Regards,
Josh
Hi,
great work….
I unable to download this full document, from
http://www.madeitsimple.com/forum/viewtopic.php?f=16&t=23
can u send me on my mail id.
Regards
Arpit
Unable to follow link to code. Can you provide alternative link or email me the code please. Many thanks.
Hi Swarna,
great work….
I unable to download this full document, from
http://www.madeitsimple.com/forum/viewtopic.php?f=16&t=23
can u send me on my mail id.
Regards
Leave a comment!
Web Content by Ameya Pimpalgaonkar is copyright protected & licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License.
Based on a work at www.madeitsimple.com.
Online Advertising
Online Advertising
Bon Voyage »
Untouched Holiday Destinations : Tarkarli
New weekend at new destination…this time at TARKARLI..it is a paradise of tiny islands and hamlets and beautiful casuarina trees…it is in sindhudurg district of maharashtra,near karli river which meets the Arabian sea..the blue beach …
Finconomy »
How to start investing in financial markets?
Often at the start of one’s career one struggles with this question. How should I start investing my hard earned money so that after sometime I can get profits on it and also save income …
General »
CAT 2009 results out
After so many delays and technical glitches, IIMs are out with the result of their elite of the all exams; CAT. You can check your CAT results on CAT IIM website which is catiim.in However …
Downloads »
Download SAP Enterprise Portal Themes
Adapting the visual appearance of SAP Enterprise Portal to the customer’s Corporate Identity is very important. The portal is always there; it constitutes the frame in which users work. Designing this frame to effectively convey …
News Updates »
CAT 2009 results out
After so many delays and technical glitches, IIMs are out with the result of their elite of the all exams; CAT. You can check your CAT results on CAT IIM website which is catiim.in However …
Reviews »
Website Review: DoFollow Forums
The website that I am going review today is DoFollowForum.com. I came across this site recently when I was working on link building for my website. As every one knows not a number of links …
Healthcare »
Homeopathy and Kids - Part two
I hope homeopathy and kids - part 1 was interesting and helpful for all our readers. Part 2 elaborates more remedies that can help your child to develop better and learn better. If you think …
In Focus »
Happy Republic Day to all Indians
Soon after the Indian National Congress, at the forefront of the country’s independence movement, adopted the ‘purna swaraj’ or complete independence resolution at its Lahore convention on New Year’s Day in 1930, Mahatma Gandhi called …
MBA »
Management programs in public service & teaching
Want to make a difference in publich service? Looking for future in public service and policy? Learn about management programs that will grant you entry in public services & policy making. Almost everyone who is interested to …
Media »
Cool Apple iMac lamp
So you have got the iPad or you may have got MacBook Pro. Whatever apple product you may have, your collection is incomplete unless you get cool iMac G4 lamp. Now what is it? Yet …
Technology »
Accessing deep structures in ABAP
It is always a challenging part to work with complex data types in ABAP. And one of these types is handling deep structures. However it depends on how well we understand the structure design. We …
About us
Categories
All writings are copyright protected
Web Content by Ameya Pimpalgaonkar is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 India License.
Based on a work at www.madeitsimple.com.
Archive
Blogroll
Tag Cloud
ABAP ABAP Simple abap simplified AIMCAT apple apple imac apple iPhone Aromatherapy career CAT CAT 2008 CAT 2009 Crack SNAP Economy English EP Essential oils GK for SNAP GMAT Grammar Holiday how to use essential oils IIFT GK list of essential oils MBA MBA in niche sector MBA opportunities Media money Netweaver Niche MBA degree parner Parnerkar Parnerkar Maharaj Poornawad prepare for SNAP GK Recession Recession and MBA SAP SAP ABAP SAP ABAP Simplified SAP EP SNAP GK TIME VARecent Posts
Most Commented
About Ameya