F4显示自定义内表中的数据
2011-01-19 10:49:06| 分类:
ABAP屏幕操作
| 标签:
|举报
|字号大中小 订阅
report zus_sdn_f4if_int_tab_val_req.
type-pools: shlp.
types: begin of typ_spfli,
carrid like spfli-carrid,
connid like spfli-connid,
cityto like spfli-cityto,
end of typ_spfli.
data: it_spfli type table of spfli,
*data: it_spfli type table of spfli,"这个不行
*---用于返回需要选中纪录的各个字段值
gt_values type standard table of ddshretval.
parameters: p_carrid like spfli-carrid,
p_cityto like spfli-cityto.
initialization.
select
carrid
connid
cityto
into corresponding fields of table it_spfli
from spfli up to 8 rows.
at selection-screen on value-request for p_carrid.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
ddic_structure = 'SPFLI'
retfield = 'CARRID'
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'P_CARRID'
value_org = 'S' " structure
callback_program = sy-repid
callback_form = 'CALLBACK_F4'
tables
value_tab = it_spfli
return_tab = gt_values
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
*&---------------------------------------------------------------------*
*& Form callback_f4
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->RECORD_TAB text
* -->SHLP text
* -->CALLCONTROL text
*----------------------------------------------------------------------*
form callback_f4
tables record_tab structure seahlpres
changing shlp type shlp_descr
callcontrol like ddshf4ctrl.
*---define local data
data:
ls_intf like line of shlp-interface,
ls_prop like line of shlp-fieldprop.
*---Hide unwanted fields
clear: ls_prop-shlpselpos,
ls_prop-shlplispos.
modify shlp-fieldprop from ls_prop
transporting shlpselpos shlplispos
where ( fieldname ne 'CARRID' and
fieldname ne 'CONNID' and
fieldname ne 'CITYTO' ).
*---添加需要返回的字段
refresh: shlp-interface.
ls_intf-shlpfield = 'CARRID'.
ls_intf-valfield = 'P_CARRID'.
append ls_intf to shlp-interface.
ls_intf-shlpfield = 'CITYTO'.
ls_intf-valfield = 'P_CITYTO'.
append ls_intf to shlp-interface.
endform. " CALLBACK_F4
评论这张
转发至微博
转发至微博
评论