ABAP-SM30添加搜索帮助
![](https://img2022.cnblogs.com/blog/1858853/202206/1858853-20220620160837453-271291668.png)
1 PROCESS ON VALUE-REQUEST . 2 "FIELD + 表-字段 MODULE 子例程" 3 FIELD ztwms14_lifnr-bwart MODULE frm_bwart_list .
子例程例子
1 MODULE frm_bwart_list INPUT. 2 3 DATA: 4 BEGIN OF lt_bwart OCCURS 0, 5 bwart TYPE t156t-bwart, 6 btext TYPE t156t-btext, 7 END OF lt_bwart. 8 9 CLEAR lt_bwart[]. 10 11 SELECT 12 bwart 13 btext 14 FROM t156t 15 INTO TABLE lt_bwart[] 16 WHERE spras = '1' 17 AND sobkz = '' 18 AND kzbew = 'B' 19 AND kzzug = '' 20 AND kzvbr = ''. 21 22 SORT lt_bwart[] BY bwart. 23 DELETE ADJACENT DUPLICATES FROM lt_bwart[]. 24 25 CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' 26 EXPORTING 27 retfield = 'BWART' 28 dynpprog = sy-repid 29 dynpnr = sy-dynnr 30 dynprofield = 'BWART' 31 value_org = 'S' 32 TABLES 33 value_tab = lt_bwart[] 34 EXCEPTIONS 35 parameter_error = 1 36 no_values_found = 2 37 OTHERS = 3. 38 39 ENDMODULE. " FRM_BWART_LIST INPUT