ALV REPORTS in SAP ABAP Your Way To Success

Updated: May 31


ALV Reports


Sap provides a set of ALV (ABAP LIST VIEWER) function modules, which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options. These reports are advanced than Normal Reports.


Function Modules in ALV Reports—>


  1. REUSE_ALV_GRID_DISPLAY —> used to display the data in grid format.

  2. REUSE_ALV_LIST_DISPLAY —> used to display the data in list format.


SY-CPROG - CPROG is a standard field within SAP Structure that stores Calling Program information. ABAP system field. In externally called procedures, this is the name of the calling program; otherwise it is the name of the current program. If an externally called procedure calls another external procedure, sy-cprog keeps the name of the first master program and is not set to the name of the master program of the other caller.

CODING SCREEN (DISPLAYING ALL FIELDS OF TABLE MARA) — >




OUTPUT —>




For displaying particular fields in ALV Reports —>


FIELD CATALOG —> The field catalog is a table of type LVC_T_FCAT that contains information on the fields to be displayed. For example, the ALV uses this table to identify the type of a field.


Use — You can use fields of this catalog to determine the number format and column properties of the list to be output.


NOTE--> If there is ‘T’ in field catalog structure then it is for internal table only.


CODING SCREEN—>




OUTPUT —>


Field Catalog property to colour a particular field—> EMPHASIZE



OUTPUT—>



Field Catalog property to do a sum of a particular field—>



OUTPUT—>



Blocked ALV Reports

It is used to display the multiple records on a single output screen.


Function modules to be used—>

  1. REUSE_ALV_BLOCK_LIST_INIT

  2. REUSE_ALV_BLOCK_LIST_APPEND

  3. REUSE_ALV_BLOCK_LIST_DISPLAY

CODING SCREEN —>





OUTPUT—>



Program to join more than 2 tables using For All Entries in ALV Reports


CODING SCREEN—>




OUTPUT —>




Interactive ALV Report

CODING SCREEN —>




OUTPUT —>


AFTER DOUBLE CLICKING ON ANY PURCHASING DOCUMENT NUMBER




ISHNOOR SINGH SETHI

LINKEDIN- https://www.linkedin.com/in/ishnoorsingh/


2,818 views0 comments