- SAP ABAP Advanced Cookbook
- Rehan Zaidi
- 338字
- 2021-08-05 18:21:53
Introduction
This chapter explores recipes related to the ALV displays. We will start with a simple requirement with basic ALV displays. We will then enhance the basic ALV program by hiding few columns from display as well as from the initial layout. We will then see a recipe showing how to save user-specific layouts. Adding buttons to standard ALV toolbars will be shown, along with checkboxes and hotspots displayed within ALV columns.
For this chapter, I assume that the reader has basic knowledge of the ABAP objects, the ALV object model, and is familiar with basic ALV creation using CL_SALV_TABLE
. Also, the reader should have knowledge of creating and changing of GUI status, and should have knowledge of Ranges
and Select-Options
.
For the sake of this chapter, we will make a simple example that will display data into an ALV format. This will be used in all the recipes mentioned in this chapter.

In this example, we declared a data structure type containing simple important fields of table PA0008
. We then declared an internal table and a work area based on this type.
We selected 15 rows from the table PA0008
and stored them in the internal table.
The factory
method is then called of the class CL_SALV_TABLE
for instantiating the ALV object. The GET_COLUMNS
method is called in order to get the columns object of the ALV. The SET_OPTIMIZE
method of the columns object is used to optimize the column width.
Likewise, the GET_FUNCTIONS
method provides access to the ALV's functions' objects. We then set all the functions using SET_ALL
method. Finally, ALV is displayed using the DISPLAY
method.

Note that until this point, the ALV toolbar does not have a layout save button. No fields are defined as keys (no blue colour). The Amount column displays 0.00 and not blank in case the value is initial. No hotspots or checkboxes are enabled in the columns. In the next set of recipes, we will see systematically how each of these options may be added.
- 審計全流程技術操作實務指南
- 一本書學內部審計:新手內部審計從入門到精通
- 金融科技(FinTech)發展的國際經驗和中國政策取向(中國金融四十人論壇書系)
- 審計學
- 讓財報說話:世界500強CFO帶你輕松讀財報(鮮讀版)
- 陜西文物年鑒·2015
- 非線性經濟關系的建模
- Team Foundation Server 2013 Customization
- 新編統計學
- 風險導向審計準則實施效果研究
- 企業并購審查中的相關市場界定:理論與案例
- Getting Started with Microsoft Lync Server 2013
- 高級計量經濟分析及Stata應用
- Getting Started with Oracle Tuxedo
- 內審人員進階之道:內部審計操作實務與案例解析