1、该程序无筛选屏幕,运行直接进入界面,如下:
代码如下:
*&---------------------------------------------------------------------*
*&程序描述 :
*&申请人 :
*&作者 :
*&日期 :2021.03.24
*&---------------------------------------------------------------------*
*&摘要:
* 1.
* 2.
*&---------------------------------------------------------------------*
*&变更记录: *
*&Date Developer ReqNo Descriptions *
*& ========== ================== ========== ========================*
*&
*&---------------------------------------------------------------------*
PROGRAM zsdf029.
*--------------------------------------------------------------------*
* 类型定义
*--------------------------------------------------------------------*
TABLES:lips.
TYPES:
BEGIN OF ty_lips,
mark TYPE c,
zgzzt TYPE char5, "过账状态
wbstk TYPE vbuk-wbstk,
vbeln TYPE lips-vbeln,
posnr TYPE lips-posnr,
matnr TYPE lips-matnr,
maktx TYPE makt-maktx,
zcpgg TYPE mara-zcpgg,
werks TYPE lips-werks,
lgort TYPE lips-lgort,
lfimg TYPE lips-lfimg,
zxulie1 TYPE zsdt033-zxulie1,
zxulie2 TYPE zsdt033-zxulie2,
zzcno TYPE zsdt003-zzcno,
zzshipno TYPE zsdt003-zzshipno,
zmsg TYPE c LENGTH 100,
END OF ty_lips.
*--------------------------------------------------------------------*
* 内表定义
*--------------------------------------------------------------------*
DATA:
gt_lips TYPE TABLE OF ty_lips,
gs_lips TYPE ty_lips,
lt_zsd033 TYPE TABLE OF zsdt033,
ls_zsd033 TYPE zsdt033.
DATA:BEGIN OF ls_post,
vbeln TYPE lips-vbeln,
wbstk TYPE vbuk-wbstk,
zmess TYPE c LENGTH 100,
END OF ls_post,
lt_post LIKE STANDARD TABLE OF ls_post.
DATA:BEGIN OF gs_wl,
vbeln TYPE lips-vbeln,
zzcno TYPE zsdt003-zzcno,
zzshipno TYPE zsdt003-zzshipno,
END OF gs_wl,
gt_wl LIKE STANDARD TABLE OF gs_wl.
* 表声明
*--------------------------------------------------------------------*
*-----常量
DATA:
gv_time TYPE i,
gc_x TYPE c LENGTH 1 VALUE 'X', "X
gc_status TYPE slis_formname VALUE 'FRM_PF_STATUS_SET', "FRM_PF_STATUS_SET
gc_command TYPE slis_formname VALUE 'FRM_USER_COMMAND'. "FRM_USER_COMMAND
DATA:
ok_code TYPE sy-ucomm. "OK_CODE
*alv相关变量
DATA:
* GC_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER, "分屏主容器
gc_grid01 TYPE REF TO cl_gui_alv_grid , "ALV List Viewer
gc_con01 TYPE REF TO cl_gui_custom_container. "存放ALV的容器
DATA:
gs_stbl TYPE lvc_s_stbl.
DATA lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
INITIALIZATION.
CLEAR lt_f4[].
lt_f4-fieldname = 'ZZCNO'.
lt_f4-register = 'X'.
APPEND lt_f4.
DEFINE m_refresh_grid.
GS_STBL-ROW = 'X'." 基于行的稳定刷新
GS_STBL-COL = 'X'." 基于列稳定刷新
CALL METHOD &1->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE = GS_STBL.
END-OF-DEFINITION.
*&---------------------------------------------------------------------*
*& Class CL_EVT_RECEIVER
*&---------------------------------------------------------------------*
* Text
*----------------------------------------------------------------------*
CLASS cl_evt_receiver DEFINITION.
PUBLIC SECTION.
* 自定义功能
METHODS handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid