ABAP 选择屏幕上的自定义搜索帮助
作者:互联网
1.搜索帮助调用处
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_ZPUR-LOW.
PERFORM frm_f4_zpur.
2.搜索帮助方法明细
FORM FRM_F4_ZPUR .
DATA:LT_ZMMT407 TYPE TABLE OF ZMMT407.
SELECT
*
FROM ZMMT407
INTO CORRESPONDING FIELDS OF TABLE @LT_ZMMT407.
SORT LT_ZMMT407 BY ZPURSORT.
DELETE ADJACENT DUPLICATES FROM LT_ZMMT407 COMPARING ZPURSORT.
*将取到的值通过函数显示在搜索帮助显示框中
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'ZPURSORT' "这个参数为帮助表中返回到选择屏幕的字段的参数
* PVALKEY = ' '
DYNPPROG = SY-REPID "当前程序,不写会有问题
DYNPNR = SY-DYNNR "当前屏幕,不写会有问题
DYNPROFIELD = 'S_ZPUR-LOW' "选择屏幕上需要加F4帮助的字段
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
VALUE_ORG = 'S' "默认为C但是此处不用S不行
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* CALLBACK_METHOD =
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
VALUE_TAB = LT_ZMMT407 "F4帮助值的表
* FIELD_TAB =
* RETURN_TAB =
* DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF SY-SUBRC <> 0.
*Implement suitable error handling here
ENDIF.
ENDFORM.
标签:帮助,F4,自定义,LT,VALUE,ABAP,TAB,屏幕,ZMMT407 来源: https://www.cnblogs.com/huangqingdong/p/16490148.html