04-09-2012 9:57 PM
Hello,
I am trying to build collective search help on ABAP selection screen for parameter.
Basically this is planned to be done dynamically using value-request as shown below:
PARAMETERS pv_fname(300) TYPE c.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pv_fname.
Could you suggest way to do this?
TBR, Manoj
04-10-2012 5:26 AM
Hi Manoj,
The below program illustrate the search help on selection screen You can take help from this program but as you are declaring the parameter on screen, where it will get data to display. So take use of function module F4IF_INT_TABLE_VALUE_REQUEST'
Cut and paste program removed.
Plagiarism is not allowed here
Regards
Harshit Gandhi
04-10-2012 6:54 AM
Dear Manoj - I guess there are some contradictions in your query.
1) Do you really mean a collective search help ? If yes then I think you need search help with multiple tabs . Right?
2) Collective search help can't be displayed using F4IF_INT_TABLE_VALUE_REQUEST. What you get with it is a simple search help.
If your requeirment is to use collective search help and that too dyanmically . You may want to use the following
1) Create a collective search help in dictionary. If you set the proper import / export flag in the search help it will handle the content dynamically
2) use matchcode addition to you parameter
3) Create search help exit and handle the content dynamicaly. May be export the value from selection screen and use it to filter in the exit
04-10-2012 1:35 PM
PARAMETERS p_pernr TYPE pernr_d.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pernr.
* Preparing search help
lw_help_infos-call = 'M'.
lw_help_infos-fieldname = 'PERNR'. "<-- return field name
lw_help_infos-fieldtype = 'CHAR'.
lw_help_infos-keyword = 'Personnel no'.
lw_help_infos-fieldlng = 8.
lw_help_infos-mcobj = 'PREM'. "<-- name of collective search help
lw_help_infos-spras = 'E'.
CALL FUNCTION 'DD_SHLP_CALL_FROM_DYNP'
EXPORTING
help_infos = lw_help_infos
IMPORTING
selection = lf_selection
select_value = lf_select_value
rsmdy_ret = lw_rsmdy_ret
TABLES
dynpselect = lt_dynpselect
dynpvaluetab = lt_dynpvaluetab
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
IF lf_selection IS NOT INITIAL.
p_pernr = lf_select_value.
ENDIF.
ENDIF.