The fastest method to create ALV ABAP (with Sample ABAP Code)

Create ALV ABAP is very comment requirment for an ABAP developer.
This post will give the fastest way and the most easy way to create and display ALV in ABAP.

Create ALV in ABAP

The easiest way to create and display ALV in ABAP is to used the class  CL_SALV_TABLE.
This class CL_SALV_TABLE offers a very powerful method to create AVL ABAP.

For example,

  • To initialize the ALV, use the CL_SALV_TABLE=>FACTORY method.
    • no need anymore to build manually your FIELDCALATOG
    • or no need to create a SAP DDIC table/structure to retrieve the FIELDCATALOG
    • it is done by passing juste an internal table.
  • To display, just call the method CL_SALV_TABLE=>DISPLAY
    • no need to create a new screen
    • display method will use the current screen

Create ALV ABAP Sample code

Here a sample code to display an ABAP internal in ALV with:

  • A basic layout setting including ABAP ALV title
  • Optimized Columns size
  • Renaming of Columns text
  • and a tool bar

First, let start with all the ABAP Declaration to make

Second, the ABAP Code to create and display an ALV the fast way.

Check also   SAP Invoice IDoc INVOIC2 - Structure, Enhancement (exit and BADI)

Here it is !

Check also   Statement SUBMIT is not allowed in this form

 

You can go further and find all the detail about CL_SALV_TABLE and ALV in ABAP in this excellent post.

Sab125

Hi. I have been working as SAP Technical and functional for a decade. Through this blog, I am trying to share with you my experience. Hopefull, it makes your ways easier path ...Sab

Leave a Reply

Your email address will not be published. Required fields are marked *