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: 

Search Help Exit - problems returning values

Former Member
0 Kudos

Hi,

I have created a new Search Help that uses the search help exit.

In this exit, I have done my own data selection in SELECT event. Everything works ok, I populate the corresponding data into the RECORD_TAB parameter, and it's displayed on the screen using DISP event (when RECORD_TAB has more than 1 row).

But, when the selection data returns only one row, it's not displayed on the screen nor returned back to the Dynpro.

Looking into Function Module F4IF_SHLP_EXIT_EXAMPLE, I saw that in DISP event, when RECORD_TAB has only one row, I have to set the next event to RETURN.

I have done this, but instead of returning the selected row, it goes back to the selection screen of the search help (where you can filter the displayed data).

Anyone knows why?

2 REPLIES 2

Former Member
0 Kudos

I found this comment in the documentation in case it helps you:

6. RETURN (usually as return value for the next timepoint)

The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.

It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). <b>However, you should note that the process will then depend on whether a value was entered manually or with an input help.</b>

0 Kudos

Hi, thanks for your response.

While debuggin onto Standard SAP after calling my Search Help exit, I saw that it's checking the number of rows in RECORD_TAB when the DISP event is thrown.

If this is the case, Standard SAP changes the next step (event) to RETURN.

I have saw that the problem occurs when the user has set the flag "Only return value directly in only one hit" on menu HELP --> SETTINGS --> F4 Help. I have done a test with this flag cleared, and if my selection sets RECORD_TAB with only one row, this data is displayed on the screen, and if I select the row, it's returned correctly to the Dynpro.

So, I suppose that the problem is with RETURN event processed by SAP.