ABAP--如何使用'F4IF_INT_TABLE_VALUE_REQUEST'填写屏幕的多个字段
样例屏幕
![](http://p.blog.csdn.net/images/p_blog_csdn_net/CompassButton/75725f838abf46a99b3602b442d04f99.png)
1定义输入帮助处理
PROCESS ON VALUE-REQUEST.
FIELD ACTIVE_SZKART MODULE YCURVE_VALUE_REQUEST.
FIELD ACTIVE_WWAER MODULE YCURVE_VALUE_REQUEST.
FIELD ACTIVE_DKOND MODULE YCURVE_VALUE_REQUEST.
2编写YCURVE_VALUE_REQUEST module代码
module ycurve_value_request input.
* Dieses Modul wird bei F4 auf szkart, wwaer oder dkond ausgef黨rt und
* liefert eine Liste der selektierten Zinskurven.
data: return_tab like ddshretval occurs 1 with header line,
field_tab like dfies occurs 1 with header line,
dynpfields like dynpread occurs 3 with header line.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
ddic_structure = 'JBIZKARTLIST'
retfield = 'ACTIVE_SZKART'
dynpprog = 'SAPLJBYCDETAIL'
dynpnr = '1000'
dynprofield = 'X' "Felder aufs Dynpro zur點kstellen
window_title = text-003
value_org = 'S'
callback_program = 'SAPLJBYCDETAIL'
callback_form = 'BO_CALLBACK_FORM'
tables
value_tab = selected_zkartlist
field_tab = field_tab
return_tab = return_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc eq 0.
* read table selected_zkartlist with key szkart = active_szkart
* wwaer = active_wwaer
* dkond = active_dkond.
* move sy-tabix to active_index.
* Aktualisiere die Table Control-Daten f黵 das Tab Strip
* perform bo_data_transfer_for_tab_strip.
endif.
endmodule. " YCURVE_VALUE_REQUEST INPUT
3.编写回调函数BO_CALLBACK_FORM代码
注意红色代码块,那里定义了返回三个字段并填写到操作屏幕
form bo_callback_form
tables record_tab structure seahlpres
changing shlp type shlp_descr_t
callcontrol like ddshf4ctrl.
data: interface like line of shlp-interface,
fp like line of shlp-fieldprop.
clear interface.
clear fp.
fp-shlpoutput = 'X'.
modify shlp-fieldprop from fp transporting shlpoutput
where shlpoutput = space.
interface-shlpfield = 'SZKART'.
interface-valfield = 'ACTIVE_SZKART'.
append interface to shlp-interface.
interface-shlpfield = 'WWAER'.
interface-valfield = 'ACTIVE_WWAER'.
append interface to shlp-interface.
interface-shlpfield = 'DKOND'.
interface-valfield = 'ACTIVE_DKOND'.
append interface to shlp-interface.
endform. " BO_CALLBACK_FORM
代码摘自sap的SAPLJBYCDETAIL