cancel
Showing results for 
Search instead for 
Did you mean: 

Search Help

Murali_Shanmu
Active Contributor
0 Kudos

Hi

I have an input field attached to a search help. I want the user to only select values from search help. I dont want the user to keyin any values manually.Is this possible in ABAP ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U need to create a serach help exit for this purpose.

F4IF_SHLP_EXIT_EXAMPLE - documents the different reasons to use a search help exit, and shows how it is done.

http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_exit.htm

http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm

Create an Elementary Search help:

Eg: Zsearch

In the defintion tab:

Give the search help exit name: Zsearch_exit.

Also give the search help param and data element.

Copy F4IF_SHLP_EXIT_EXAMPLE into Zsearch_exit

Comment:

* callcontrol-step = 'SELECT'.  (1st line)


Inside:

  IF CALLCONTROL-STEP = 'SELECT'.
* Select required data for the search help
   * Select stmnts as per your requirement and populate in itab.

* Move all the selected records to Record_Tab
    LOOP AT itab INTO wa_itab.
      MOVE wa_itab TO record_tab-string.
      APPEND record_tab.
      CLEAR record_tab.
    ENDLOOP.
 
    RC = 0 .
 
    IF RC = 0.
      CALLCONTROL-STEP = 'DISP'.
    ELSE.
      CALLCONTROL-STEP = 'EXIT'.
    ENDIF.
    EXIT. "Don't process STEP DISP additionally in this call.

Let me know if its working for you.

Also, chek this link if it helps you:

Regards,

Anjali

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Murali,

Thanks for the points.

We would like to know how you solved the problem:

1-> thru search help exit or

2-> thru the link i gave u.

Regards,

Anjali

Murali_Shanmu
Active Contributor
0 Kudos

Hi Anjali,

Actually it is possible using search Help Exit. But since my list of values were less, i decided to go using a dropdown list box. Soon after realizing this, i got a reply from Neil with the same logic. Thanks anyway.

former_member186741
Active Contributor
0 Kudos

is this a custom screen or a selection screen? not sure about a selection screen but on a custom screen you can set the 'dropdown' attribute to listbox or 'listbox with key' and I think that achieves what you're after. I don't believe you need an exit for this case.