(一).在表维护生成器增加搜索帮助
效果:
方法:
步骤一:SE11->表->菜单->实用程序->表格维护生成器
双击概述屏幕 的屏幕号,进入屏幕逻辑流,增加代码如下
"增加f4
PROCESS ON VALUE-REQUEST.
FIELD ZZE_WT-FILGHT_NO MODULE fr_add_no_f4."ZZE_WT-FILGHT_NO是要加搜索帮助的字段
步骤二:sm30进入维护表/视图,输入名称,到维护数据界面
系统-状态-进入屏幕程序,增加include如下:注意命名z开头.
双击创建include,增加代码如下
*&---------------------------------------------------------------------* *& 包含 ZIZ_ADD_F4 *&---------------------------------------------------------------------* MODULE fr_add_no_f4 input. TYPES: BEGIN OF tys_w, FILGHT_NO TYPE ZZE_WT-FILGHT_NO, END OF tys_w. DATA: gt_out TYPE TABLE OF ZZE_WT, gs_out TYPE ZZE_WT.
"查询加入数据,此例子手动append * SELECT CONNID FROM ZAH_VIEW INTO CORRESPONDING FIELDS OF TABLE gt_out. * SORT gt_out BY CONNID. * DELETE ADJACENT DUPLICATES FROM gt_out COMPARING CONNID. gs_out-filght_no = '111111111111'. APPEND gs_out TO gt_out. CLEAR gs_out. gs_out-filght_no = '222222222222'. APPEND gs_out TO gt_out. CLEAR gs_out. gs_out-filght_no = '333333333333'. APPEND gs_out TO gt_out. CLEAR gs_out. SORT gt_out BY filght_no. DELETE ADJACENT DUPLICATES FROM gt_out COMPARING filght_no. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING RETFIELD = 'FILGHT_NO' "返回字段名 DYNPPROG = SY-REPID "当前程序 DYNPNR = SY-DYNNR "Dynpro编号 DYNPROFIELD = 'FILGHT_NO' "Dynpro值返回字段的名称 VALUE_ORG = 'S' "价值转移:C:逐个单元格,S:结构化 TABLES VALUE_TAB = gt_out "查询表 EXCEPTIONS PARAMETER_ERROR = 1 NO_VALUES_FOUND = 2 OTHERS = 3. ENDMODULE.
标签:帮助,gt,gs,NO,no,ABAP,搜索,FILGHT,out From: https://www.cnblogs.com/wh-cnblogs/p/16774376.html