Зачастую, нужно вызвать свой подброс значений для поля ввода. Ниже представлен код, который вызывает свой SH для поля селекционного экрана
PARAMETERS: p_doc LIKE gs_eedmsettldoc-settldoc OBLIGATORY. AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_doc. DATA: shlp TYPE shlp_descr, selopt TYPE ddshselopt, interface TYPE ddshiface.
DATA: lt_retval TYPE TABLE OF ddshretval, wa_retval TYPE ddshretval. DATA lt_pvalues TYPE TABLE OF dynpread WITH HEADER LINE. CALL FUNCTION 'F4IF_GET_SHLP_DESCR' EXPORTING shlpname = 'ISU_EDM_SETTLDOC' IMPORTING shlp = shlp. shlp-intdescr-dialogtype = 'D'. READ TABLE shlp-interface INTO interface WITH KEY shlpfield = 'SETTLDOC'. interface-valfield = 'X'. MODIFY shlp-interface FROM interface TRANSPORTING valfield WHERE shlpfield = 'SETTLDOC'. selopt-shlpname = 'ISU_EDM_SETTLDOC'. selopt-shlpfield = 'SETTLPROCESS'. selopt-sign = 'I'. selopt-option = 'EQ'. selopt-low = 'Z_PERIME'. APPEND selopt TO shlp-selopt. selopt-shlpname = 'ISU_EDM_SETTLDOC'. selopt-shlpfield = 'SETTLPROCESS'. selopt-sign = 'I'. selopt-option = 'EQ'. selopt-low = 'Z_PERIME_R'. APPEND selopt TO shlp-selopt. CLEAR: lt_retval[]. CALL FUNCTION 'F4IF_START_VALUE_REQUEST' EXPORTING shlp = shlp TABLES return_values = lt_retval. IF NOT lt_retval[] IS INITIAL. READ TABLE lt_retval INTO wa_retval INDEX 1. p_doc = wa_retval-fieldval. SELECT SINGLE * FROM eedmsettldoc INTO CORRESPONDING FIELDS OF gs_eedmsettldoc WHERE settldoc = p_doc . p_proc = gs_eedmsettldoc-settlprocess. ENDIF.
Комментарии
Отправить комментарий