第一种:调用‘F4IF_INT_TABLE_VALUE_REQUEST‘
data: begin of it_tm occurs 0,
zprogm_name like zisd_tpl_prgrm-zprogm_name,
zzdesc like zisd_tpl_prgrm-zzdesc,
end of it_tm.
data:itab_tm like it_tm occurs 0 with header line.
at selection-screen on value-request for p_type2.
select *
into corresponding fields of table itab_tm
from zisd_tpl_prgrm .
call function ‘F4IF_INT_TABLE_VALUE_REQUEST‘
exporting
retfield = ‘ZPROGM_NAME‘ "表格要显示的字段
dynpprog = sy-repid "返回才程序
dynpnr = sy-dynnr "屏幕
dynprofield = ‘P_TYPE2‘ "往页面回填值的地方
value_org = ‘S‘ "显示类型
tables
value_tab = itab_tm. "传进去的表格 帮助的内表
第二种:下拉框方式
type-pools:vrm.
data:name type vrm_id,
list type vrm_values,
value like line of list.
*at selection-screen on value-request for p_type .
* refresh list.
* clear list.
* name = ‘p_type‘.
*
* loop at it_fname_tm.
* clear:value.
* value-key = it_fname_tm-name.
* value-text = value-key.
* append value to list.
* endloop.
*
* call function ‘VRM_SET_VALUES‘
* exporting
* id = name
* values = list.
第三种:系统F4帮助
下面是查找SAP里面已存在的report
data: info_object like euobj-id value ‘PROG‘.
data:gv_program like rs38m-programm.
parameters:p_prgnm like trdir-name
concatenate ‘ZRSD‘ p_num ‘*‘ into gv_program.
at selection-screen on value-request for p_prgnm.
call function ‘SITORY_INFO_SYSTEM_F4‘
exporting
object_type = info_object
object_name = gv_program
suppress_selection = ‘X‘
importing
object_name_selected = p_prgnm
exceptions
cancel = 01.
版权声明:本文为博主原创文章,未经博主允许不得转载。