REPORT OO_ALV. CLASS OO_ALV DEFINITION. PUBLIC SECTION. METHODS:GET_DATA IMPORTING AMOUNT TYPE I,"取数 DISPLAY_ALV,"显示ALV DOWNLOAD_ALV."下载ALV PRIVATE SECTION. DATA:IT_SPFLI TYPE STANDARD TABLE OF SPFLI. DATA:LO_SALV TYPE REF TO CL_SALV_TABLE.…
废话不多说,直接上傻瓜代码.归根结底,就是要将显示的字段一行一行的放入fieldcat的表里. "定义ALV数据变量 DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV, WA_LAYOUT TYPE SLIS_LAYOUT_ALV. "定义ALV结构字段,使用宏的方式 DATA: POS TYPE I. DEFINE ADD1. CLEAR wa_fieldcat. TO POS…
程序间获取ALV数据的两种方法: 方法1:通过修改SUBMIT的目标程序,把内表EXPORT到内存,SUBMIT后IMPORT ,该方法需要修改目标程序,可以任意设置目标程序的中断点: * Execute transaction IA09 to get all Functional Location Tasklists SUBMIT riplko10 WITH SELECTION-TABLE lt_selscreen WITH pn_iflo = abap_true "Select Func L…