Application Development and Automation 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: 
Read only

Search help on selection screen.

Former Member
0 Likes
1,685

I have a selection screen with

Report name

Variant name

Variant fields

Variant fields is attached to a search help 'Z_Search_variant' and this search help fetches values based on "Report name" "Variant name" on the selection screen.

I am using

AT SELECTION-SCREEN ON VALUE-REQUEST FOR Variant_field

PERFORM f4_help_variant.

FORM f4_help_variant.

call function 'F4IF_FIELD_VALUE_REQUEST'

exporting

tabname = space

fieldname = space

SEARCHHELP = 'Z_SEARCH_VARIANT'

  • SHLPPARAM = 'REPORT'

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • VALUE = Report

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

SUPPRESS_RECORDLIST = 'X'

CALLBACK_PROGRAM = SY-REPID

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

  • IMPORTING

  • USER_RESET =

TABLES

RETURN_TAB = return_tab

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

.

How do I pass value to this search help? Currently I do not see this FM allowing this option? Any other options?

I have a selection screen with

Report name

Variant name

Variant fields

Variant fields is attached to a search help 'Z_Search_variant' and this search help fetches values based on "Report name" "Variant name" on the selection screen.

I am using

AT SELECTION-SCREEN ON VALUE-REQUEST FOR Variant_field

PERFORM f4_help_variant.

FORM f4_help_variant.

call function 'F4IF_FIELD_VALUE_REQUEST'

exporting

tabname = space

fieldname = space

SEARCHHELP = 'Z_SEARCH_VARIANT'

  • SHLPPARAM = 'REPORT'

  • DYNPPROG = ' '

  • DYNPNR = ' '

  • DYNPROFIELD = ' '

  • STEPL = 0

  • VALUE = Report

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

SUPPRESS_RECORDLIST = 'X'

CALLBACK_PROGRAM = SY-REPID

  • CALLBACK_FORM = ' '

  • SELECTION_SCREEN = ' '

  • IMPORTING

  • USER_RESET =

TABLES

RETURN_TAB = return_tab

  • EXCEPTIONS

  • FIELD_NOT_FOUND = 1

  • NO_HELP_FOR_FIELD = 2

  • INCONSISTENT_HELP = 3

  • NO_VALUES_FOUND = 4

  • OTHERS = 5

.

How do I pass value to this search help? Currently I do not see this FM allowing this option? Any other options?

4 REPLIES 4
Read only

Former Member
0 Likes
920

Hi Vinita,

wat i figured out from your problem is u need how to get values from FM so u can do it in this way..

READ TABLE it_return INTO wa_return INDEX 1.

IF sy-subrc = 0.

wa_output-vkorg = wa_return-fieldval.

ENDIF.

IF wa_output-vkorg IS NOT INITIAL.

MODIFY it_output FROM wa_output INDEX row_id * it_output is final ITAB

TRANSPORTING vkorg.

ENDIF.

CALL METHOD c_alv->refresh_table_display.

CLEAR: wa_return,it_return[],wa_output.

Read only

Former Member
0 Likes
920

Hi,

pass these values--

TABNAME = 'ZMF_MAIN' --> table name of field

FIELDNAME = 'MFORMID' ---> field name

SEARCHHELP = 'ZMF_MFORM' --> search help name

DYNPPROG = SY-REPID ---> program name

DYNPNR = SY-DYNNR --> screen no

DYNPROFIELD = 'P_MFORM' ---> the screen field name wat u have declared in selection screen

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
920

You have created a custom search help 'Z_SEARCH_VARIANT'. It will fetch data based on the "selection method", why do you need to pass data to the search help ?

Read only

Former Member
0 Likes
920

The search help was already created. I want to now call the search help from my selection report program.

And I pass values to the first two parameters of selection screen which should internally call this search help and return value on the third field of the selection screen.