运行效果:
步骤:
新建工具条(工具条名称:STATUS_BAR):
子程序调用代码如下:
REPORT ZTEST_SY03.
" 数据定义
INCLUDE ZTEST_SY03_A01.
" 分页
INCLUDE ZTEST_SY03_L01.
" 数据表格
INCLUDE ZTEST_SY03_T01.
" PBO
INCLUDE ZTEST_SY03_O01.
" PAI
INCLUDE ZTEST_SY03_I01.
"子FORM
INCLUDE ZTEST_SY03_F01.
ZTEST_SY03_A01 子程序代码:
TABLES: spfli.
" 结构体
DATA: gs_spfli TYPE spfli,
gs_sflight TYPE sflight.
DATA: BEGIN OF gs_scarr,
sel TYPE char1.
INCLUDE STRUCTURE scarr.
DATA:
END OF gs_scarr.
" 內表
DATA: gt_spfli LIKE TABLE OF gs_spfli,
gt_sflight LIKE TABLE OF gs_sflight,
gt_scarr LIKE TABLE OF gs_scarr.
DATA: g_container1 TYPE scrfname VALUE 'CUS01', " 重新定义本地容器名
g_container2 TYPE scrfname VALUE 'CUS02'. " 重新定义本地容器名
DATA: grid1 TYPE REF TO cl_gui_alv_grid, " 声明ALV对象
grid2 TYPE REF TO cl_gui_alv_grid. " 声明ALV对象
DATA: g_custom_container1 TYPE REF TO cl_gui_custom_container," 声明容器对象
g_custom_container2 TYPE REF TO cl_gui_custom_container." 声明容器对象
"查询屏幕
SELECTION-SCREEN BEGIN OF SCREEN 9000 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK 10 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_carrid FOR spfli-carrid,
s_connid FOR spfli-connid.
SELECTION-SCR