April 20, 2010 – 10:57 pm | 11 Comments

Dear Jane,
95% of this presentation is half mental.
Seriously! STOP playing games. Throw away those shrouds of insanity. Get out of that virtual ‘web’.
Ok, about your presentation, in few words – no reasoning. Just some facts …

Read the full story »
Bon Voyage

Business-Startups

Healthcare

MBA

Technology

Home » Technology

Introduction to SAP ABAP ALV with OOPs concept

Submitted by Ameya Pimpalgaonkar on August 4, 2008 – 8:33 am Share/Save/Bookmark 7 Comments

- 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

 

  1. ALV List Form
  2. 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:

 

  1. CL_GUI_ALV_GRI
  2. CL_GUI_CUSTOM_CONTANIER
  3. CL_GUI_SPLITTER_CONTAINER
  4. CL_GUI_CONTAINER
  5. CL_DD_DOCUMENT
  6. CL_GUI_HTML_VIEWER
  7. 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:

 

  1. Setting the field catalog and its layout
  2. For assigning the ALV to the Custom container
  3. For changing the field catalog contents
  4. 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

Share/Save/Bookmark

Related Articles

7 Comments »

  • Bhagya said:

    Good work swarna……

  • Swarna Munukoti said:

    Thanks a lot Bhagya

    Regards,
    Swarna M

  • Sujatha said:

    I found the details very useful. Thanks Swarna.

    Can i get details about how to write print control commands for a SAP Script?

  • Josh said:

    Hi Swarna,
    Great work !! Thankuu !!

    Regards,
    Josh

  • Arpit said:

    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

  • Bob Dale said:

    Unable to follow link to code. Can you provide alternative link or email me the code please. Many thanks.

  • kiran said:

    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!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar blog.

eXTReMe Tracker