value( I_DISPLAY_ONLY )TYPE ABAP_BOOL DEFAULT SPACE
value( I_MAX_RECORDS ) TYPE I DEFAULT SPACE
value( I_SHLP_NAME ) TYPE SHLPNAME -> Name of a Search Help
value( IT_DDSHIFACES ) TYPE DDSHIFACES -> Complete Interface of Search Help for Screen
ET_VALUESTYPE TFW_DDSHRETVAL_TAB -> Return Selected Values
method f4_with_customized_params.
*This is the code from http://abapblog.com.
field-symbols: <iface> type ddshiface,
<sface> type ddshiface.
data: f_shlp type shlp_descr.
data: f_rc type sy-subrc.
call function 'F4IF_GET_SHLP_DESCR'
exporting
shlpname = i_shlp_name
shlptype = 'SH'
importing
shlp = f_shlp.
loop at it_ddshifaces assigning <iface>.
read table f_shlp-interface[] with key shlpfield = <iface>-shlpfield assigning <sface>.
if sy-subrc eq 0.
move-corresponding <iface> to <sface>.
endif.
endloop.
call function 'F4IF_START_VALUE_REQUEST'
exporting
shlp = f_shlp
disponly = i_display_only
maxrecords = i_max_records
multisel = space
* CUCOL = SY-CUCOL
* CUROW = SY-CUROW
importing
rc = f_rc
tables
return_values = et_values.
endmethod.
report zab_customized_f4.
*This is the code from http://abapblog.com.
parameters: p_carrid type sflight-carrid .
parameters: p_connid type sflight-connid .
at selection-screen on value-request for p_connid.
perform customized_f4.
*&---------------------------------------------------------------------*
*& Form customized_f4
*&---------------------------------------------------------------------*
form customized_f4.
data: ft_values type standard table of ddshretval.
data: ft_interfaces type ddshifaces.
data: fs_interface type ddshiface.
field-symbols: <val> type ddshretval.
clear fs_interface.
fs_interface-shlpfield = 'CARRID'.
fs_interface-valfield = 'X'.
fs_interface-value = p_carrid.
* fs_interface-dispfield = 'X'.
append fs_interface to ft_interfaces.
clear fs_interface.
fs_interface-shlpfield = 'CONNID'.
fs_interface-valfield = 'X'.
fs_interface-value = '*'.
append fs_interface to ft_interfaces.
zcl_abapblog_com=>f4_with_customized_params(
exporting
i_display_only = space
i_max_records = space
i_shlp_name = 'H_SPFLI'
it_ddshifaces = ft_interfaces
importing
et_values = ft_values
).
read table ft_values with key fieldname = 'CONNID' assigning <val>.
if sy-subrc eq 0.
move <val>-fieldval to p_connid.
endif.
read table ft_values with key fieldname = 'CARRID' assigning <val>.
if sy-subrc eq 0.
move <val>-fieldval to p_carrid.
endif.
"send dummy ok_code to refresh screen data
call function 'SAPGUI_SET_FUNCTIONCODE'
exporting
functioncode = 'DUMMY'
exceptions
function_not_supported = 1
others = 2.
if sy-subrc <> 0.
* Implement suitable error handling here
endif.
endform. "customized_f4
That it looks like if you do not put anything into Airline field.