Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Collective Search Help in selection screen

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

Private_Member_49934
Contributor
0 Kudos

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

Former Member
Hi,
You will need to use an existing collective search help or create a new one through SE11.
Than you may use the FM DD_SHLP_CALL_FROM_DYNP...
Sample code for PERNR field and collective SH PREM:
  
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.
Cheers,
Manu.