1. 使用实例,见附件
2. help参考文档,内容也不多,花一个小时就可翻看一遍,绝对必要:
http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
3.自已写个Demo程序,大致有如下功能:
a) 要求显示的列表内容动态
b) 根据ALV layout Variant的值,确定从哪些表选数据最合适
c) 行列的一些属性(单元格内容颜色、前导零、参考单位,列头文本,Hotspot等)设置和功能使用(排序,求和,小计等)
d) ALV的Header, Footer设置
...
Difference between cl_gui_alv_grid and cl_salv_table
The CL_SALV_TABLE class is part of the ALV Object Model which was introduced in NetWeaver 2004. Basically it is an encapsulation of the the pre-existing ALV tools. For example the class CL_SALV_TABLE actually wraps around both the CL_GUI_ALV_GRID class for container implementation, as well as the REUSE_ALV_GRID_DISPLAY and REUSE_ALV_LIST_DISPLAY function modules for full screen display. It was designed to be a single point of entry when using a specific ALV tool such as the ALV table display, ALV hierarchial sequestion list, and tree ALV. All of these individual ALV tools have their own base class, for table it is the CL_SALV_TABLE, but all have a common look. A lot of the methods are the same, with only some differences in the parameters of the methods depending on the actual tool you are using.
So to summarize, the ALV Object Model was delivered to give a more collective interface to the ALV tools. There are limitations in the ALV OBject Model, for example, you can NOT color a line or a cell, but you can color a column. Also, you can NOT have an editable ALV using the Object Model.
But for basic lists, it is a very powerful tool.
Simple 2D Table Reference
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6
Simple 2D Table - Event Handling
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01