本站网友 发表时间:2009-03-10 17:12:42 |
|
你好: 我想实现一个功能就是自己手写的SEARCH_HELP返回多值,就是选中SEARCH_HELP中某一行时,同时得到这一行的两个以上的值.我用的是FUNCTION:F4IF_INT_TABLE_VALUE_REQUEST.我试了一下,比如参数:value_org = 'S' 这些.总是不能实现,也没有例子可以参考,不知道白老师能否提供一个实现方式.谢谢! |
REPORT Z_BARRY_TEST.
TYPES: shlp_descr_t TYPE shlp_descr .
DATA: BEGIN OF itab OCCURS 0 ,
matnr LIKE mara-matnr ,
maktx LIKE makt-maktx ,
END OF itab.
DATA: return_tab TYPE ddshretval OCCURS 0 .
PARAMETERS: p_matnr LIKE itab-matnr ,
p_maktx LIKE itab-maktx .
INITIALIZATION.
SELECT matnr maktx INTO TABLE itab FROM makt UP TO 20 ROWS
WHERE spras = '1'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr .
PERFORM f4.
*&---------------------------------------------------------------------*
*& Form f4
*&---------------------------------------------------------------------*
FORM f4.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_MATNR'
value_org = 'S'
callback_program = sy-repid
callback_form = 'CB_FORM'
TABLES
value_tab = itab
return_tab = return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
ENDFORM. "f4
*&---------------------------------------------------------------------*
*& Form cb_form
*&---------------------------------------------------------------------*
FORM cb_form TABLES record_tab STRUCTURE seahlpres
CHANGING shlp TYPE shlp_descr_t
callcontrol LIKE ddshf4ctrl.
DATA: interface LIKE LINE OF shlp-interface.
READ TABLE shlp-interface INTO interface INDEX 1.
interface-shlpfield+4(1) = '2'.
interface-valfield = 'P_MAKTX'.
APPEND interface TO shlp-interface.
ENDFORM. "bo_callback_form
阅读(6760) | 评论(2) | 转发(0) |