Course
SAP BPC Tutorial: What is Business Planning and Consolidation?
What is SAP BPC? SAP BPC is a SAP module that provides planning, budget, forecast, and financial...
The common desired features of any report are "column alignment", sorting, filtering, subtotals, totals etc. To implement these from scratch , a lot of coding effort is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
In this tutorial you will learn:
Each of these reports provide function modules which help in producing desired output without much effort. Lets look at them in detail -
Important function modules in these report are -
REUSE_ALV_FIELDCATALOG_MERGE
This function module is used to populate a field catalog which is essential to display the data in ALV.
If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter (I_structure_name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
Note : Fieldcatalog can be filled manually also by filling up all the required details into the internal table
Important parameters in are:
1. Export:
2. Changing
REUSE_ALV_LIST_DISPLAY
This is the function module which prints the data.
The important parameters are:
1. Export:
2. Tables:
REUSE_ALV_EVENTS_GET:
Returns table of possible events for a a list type
1. Import:
Et_Events :The event table is returned with all possible CALLBACK events for the specified list type (column 'NAME'). For events to be processed by the Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SLIS.
2. Export:
I_list_type: 0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchical-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list REUSE_ALV_BLOCK_LIST_HS_APPEND
REUSE_ALV_GRID_DISPLAY
A new function from ABAP4.6 version, to display the results in grid rather than a preview.
Parameters : same as reuse_alv_list_display
Note:Grid cannot handle high volumes. Functions like sort, scrolling down consumes a lot of resources / time if the volume of data to be displayed is high. There is no clear cut definition such that if the amount of data is X go for list or grid but the developer has to take a call based on his experience. If not sure, then list is the better option
REUSE_ALV_COMMENTARY_WRITE
This is used in the Top-of-page event to print the headings and other comments for the list.
Important Parameters
This internal table has three fields:
This looks like a simple report but this report has the features of sorting and filtering only.This report is used if you have to display more than one report on the output. Technically speaking if you have multiple internal table with data to be displayed as separate blocks then we go for block report of ALV.
The important functions used for creating this report are:
REUSE_ALV_BLOCK_LIST_INIT
This function module is used to set the default gui status etc. The parameters are similar to the one used in reuse_alv_list_display or reuse_alv_grid_display
REUSE_ALV_BLOCK_LIST_APPEND
This function module adds the data to the block.
Important Parameters
1.Export :
2.Tables :
REUSE_ALV_BLOCK_LIST_DISPLAY
This function module display the list with data appended by the above function.
Parameters : All the parameters are optional.
Hierarchical display is used for displaying data that are related. Like sales order and item details. Here sales order details can be the header data whereas them items in the sales order can be the item data
The function module used for this is
REUSE_ALV_HIERSEQ_LIST_DISPLAY
Export:
Tables
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE'.
The common function modules related to selecting / validating display variants are
Thats all to ABAP- ALV programming!
What is SAP BPC? SAP BPC is a SAP module that provides planning, budget, forecast, and financial...
Quotations Quotations are requests for vendors to provide us information about their best prices,...
What is SAP Business Suite? Business Suite in SAP is collection of fully integrated applications such...
In this tutorial, we will learn Execute Payroll in SAP How to Execute Payroll in SAP How to...
Overview SAP CRM provides Partner Channel Management(PCM). This is used by the organization where...
Background Customer Master is Primary master data in SAP SD. To create Customer Master we need...