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: 

How to get the result of a search help in an internal table?

Former Member
0 Kudos

Hi,

Is it possible to execute a search help internally (not in foreground) and get the result of the search help in an internal table. for eg. I have a custom elementary search help with a search help exit. Is there any program or standard function module which will allow me to pass the search help name to it and would return the result of the search help in an internal table?

Regards,

Pratiksha.

1 ACCEPTED SOLUTION

Former Member

Hi Pratiksha,

'F4IF_SELECT_VALUES' function module will serve your requirement.

Before calling this function module call F4IF_GET_SHLP_DESCR to get the description of the search help you want to use.

CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
       EXPORTING
            shlpname = c_shlp_menu "Custom Search help
       IMPORTING
            shlp     = l_shlp.

Pass search criteria in l_shlp, then call 'F4IF_SELECT_VALUES' function module.

CALL FUNCTION 'F4IF_SELECT_VALUES'
  EXPORTING
    shlp                   = l_shlp
    CALL_SHLP_EXIT         = 'X'
 TABLES
   RETURN_TAB              = l_retval

l_retval will contain all the values returned by the search help.

regards,

Shradhanjali

3 REPLIES 3

Former Member
0 Kudos

Hello,

if u want this thing u can do one thing create a View for that table column that u want for search help and then create a search help by using same view . or in program u can fetch data in internal table from that particular view.

i hope this will solve ur problem

thanks.

Girish

Former Member
0 Kudos

Hi,

You can use the below FM:

F4IF_INT_TABLE_VALUE_REQUEST

F4IF_FIELD_VALUE_REQUEST

For more details on the parameters to be passed, Please check the FM documentation.

Hope this helps

Regards

Shiva

Former Member

Hi Pratiksha,

'F4IF_SELECT_VALUES' function module will serve your requirement.

Before calling this function module call F4IF_GET_SHLP_DESCR to get the description of the search help you want to use.

CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
       EXPORTING
            shlpname = c_shlp_menu "Custom Search help
       IMPORTING
            shlp     = l_shlp.

Pass search criteria in l_shlp, then call 'F4IF_SELECT_VALUES' function module.

CALL FUNCTION 'F4IF_SELECT_VALUES'
  EXPORTING
    shlp                   = l_shlp
    CALL_SHLP_EXIT         = 'X'
 TABLES
   RETURN_TAB              = l_retval

l_retval will contain all the values returned by the search help.

regards,

Shradhanjali