cancel
Showing results for 
Search instead for 
Did you mean: 

Search help values in internal table

former_member193460
Contributor
0 Kudos


Hi Experts,

     i have a requirement to create dropdown by key in an alv cell. I want to get all the search help values and attach it to the value set ( along with the texttable field)

company code and company code description

i used this code:

MOVE 'seacrch help name'  TO  l_shlp-SHLPNAME.
MOVE 'SH'  TO  l_shlp-SHLPTYPE.


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

In l_retval, I am getting the company code but i am not getting the text table text (txtmd field) company description. Please let me know how i can achive it.

If there is any class method call which i can use instead of FM, i would prefer.

Thanks & REgards,

Tashi

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member193460
Contributor
0 Kudos

The search help has this as the parameter

I will not be able to share the hit list as it contains details about my client, when i execute this searchelp object, i am getting company code as well as the txtmd.

But when i execute through the FM, i get only the company code.

Regards,

Tashi

former_member193460
Contributor
0 Kudos


My issue is not solved, i am still not able to get the text (2nd export parameter of the search help) . i am assuming its the l_shlp structure where i am populating only searchhelp name and type currently. Do i need to populate some thing more to get the text ?

ramakrishnappa
Active Contributor
0 Kudos

Hi Tashi,

Please try the below code


CALL FUNCTION 'F4IF_GET_SHLP_DESCR'

       EXPORTING

            shlpname = 'ZSH_HELP_NAME' "Custom Search help

       IMPORTING

            shlp     = ls_shlp.

Then call 'F4IF_SELECT_VALUES' function module.


CALL FUNCTION 'F4IF_SELECT_VALUES'

  EXPORTING

    shlp                   = ls_shlp

    CALL_SHLP_EXIT         = 'X'

TABLES

   RETURN_TAB              = lt_retval

Hope this helps you.

Regards,

Rama

Message was edited by: Ramakrishnappa Gangappa

former_member193460
Contributor
0 Kudos

Hi Rama,

     I had tried that already, for some strange reason if i get the SH decription with the FM and then use that in the 'F4IF_SELECT_VALUES', i dont get any records (not even company code).

if i manually fill the description structure ,

MOVE 'seacrch help name'  TO  l_shlp-SHLPNAME.

MOVE 'SH'  TO  l_shlp-SHLPTYPE

i get the records, but it fill only the company code not the description

ramakrishnappa
Active Contributor
0 Kudos

Hi Tashi,

Please share the snap shot of your search help with parameters. Also share the hit list of search help.

Regards,

Rama

ramakrishnappa
Active Contributor
0 Kudos

Hi Tashi,

Is you issure resolved? If so please close the discussion.

Regards,

Rama

ramakrishnappa
Active Contributor
0 Kudos

Hi Tashi,

You have to choose a search help which gives you the company code & description as export parameters.

Then you will be able to get the description along with company code in your internal table l_retval.

Loop over l_retval entries and construct the records as you wish.

Regards,

Rama