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

Former Member
0 Kudos

what is an search help exit?

where is it used?

any example?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

A search help describes the standard input help process. In exceptions it could be necessary to deviate in some points from this standard. Such a deviation from the standard can also be implemented with a search help exit.

The input help process should look as much the same as possible throughout the entire system. Search help exits should therefore only be used for exceptions.

A search help exit is a function module that has a predefined interface. A search help exit is called at certain times by the help processor. The administrative data of the help processor are passed to the search help exit using the interface.

You can store your own program logic that manipulates this administrative data in the search help exit. Individual steps of the input help process can be skipped with a search help exit.

for example

Search help exit F4UT_OPTIMIZE_COLWIDTH adjusts the column width in the hit list to the contents of the column. It makes sense to use this search help exit when the columns of the hit list have to be made very wide for extreme cases (e.g. for name fields), but normally they will contain much smaller values.

Each search help exit must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE (is used as pattern for all the search help exits to be created). You can find more information about the interface in the documentation for this function module.

Calling the Search Help Exit

If a search help exit is assigned to a search help, the help processor calls it at the following times:

Before Displaying the Dialog Box for Selecting the Required Search Path.

It is only called for collective search helps. Using the search help exit, the set of elementary search helps available can for example be restricted depending on the context.

Before Starting the F4 Process for the Elementary Search Help

The call is triggered independent of whether the dialog window for entering the search conditions appears or whether the selection is executed immediately (for example, because in the Hot key of the elementary search help Immediate value display is set).

Before Displaying the Dialog Box for Entering Search Conditions.

You can either influence the dialog for entering search conditions or skip it altogether here. You can also influence how the selection screen looks. The call is triggered only if there is no direct selection (that is, if in the Hot key of the elementary search help Immediate value display is not set).

Before Selecting Data.

The data selection can be partly or completely copied from the search help exit. This can become necessary if the data selection cannot be implemented with a SELECT statement for a table or a view.

Before Displaying the Hit List.

You can influence the display of the hit list in this step with the search help exit. You can reduce the number of values displayed here. For example, you can display only values for which the person calling the input help has authorization. You can also copy the complete hit list from the search help exit.

Before Returning the Values Selected by the User to the Input Template.

It could be advisable to intervene at this time if control of the further transaction flow should depend on the value selected. A typical example is setting set/get parameters.

u can check this link

http://help.sap.com/saphelp_nw70/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm

<REMOVED BY MODERATOR>

raam

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 1:38 PM

4 REPLIES 4

Sm1tje
Active Contributor
0 Kudos

When creating a search help in SE11, you can define a selection method (table from which data will be selected). But you can also define an exit (Funtion module) in which some additional coding can be done to customize your search help any way you like.

Lots of examples around: SE37: SHLPEXIT* or HELPEXIT*.

One example standard SAP: F4IF_SHLP_EXIT_EXAMPLE

Former Member
0 Kudos

Hi,

A search help describes the standard input help process. In exceptions it could be necessary to deviate in some points from this standard. Such a deviation from the standard can also be implemented with a search help exit.

The input help process should look as much the same as possible throughout the entire system. Search help exits should therefore only be used for exceptions.

A search help exit is a function module that has a predefined interface. A search help exit is called at certain times by the help processor. The administrative data of the help processor are passed to the search help exit using the interface.

You can store your own program logic that manipulates this administrative data in the search help exit. Individual steps of the input help process can be skipped with a search help exit.

for example

Search help exit F4UT_OPTIMIZE_COLWIDTH adjusts the column width in the hit list to the contents of the column. It makes sense to use this search help exit when the columns of the hit list have to be made very wide for extreme cases (e.g. for name fields), but normally they will contain much smaller values.

Each search help exit must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE (is used as pattern for all the search help exits to be created). You can find more information about the interface in the documentation for this function module.

Calling the Search Help Exit

If a search help exit is assigned to a search help, the help processor calls it at the following times:

Before Displaying the Dialog Box for Selecting the Required Search Path.

It is only called for collective search helps. Using the search help exit, the set of elementary search helps available can for example be restricted depending on the context.

Before Starting the F4 Process for the Elementary Search Help

The call is triggered independent of whether the dialog window for entering the search conditions appears or whether the selection is executed immediately (for example, because in the Hot key of the elementary search help Immediate value display is set).

Before Displaying the Dialog Box for Entering Search Conditions.

You can either influence the dialog for entering search conditions or skip it altogether here. You can also influence how the selection screen looks. The call is triggered only if there is no direct selection (that is, if in the Hot key of the elementary search help Immediate value display is not set).

Before Selecting Data.

The data selection can be partly or completely copied from the search help exit. This can become necessary if the data selection cannot be implemented with a SELECT statement for a table or a view.

Before Displaying the Hit List.

You can influence the display of the hit list in this step with the search help exit. You can reduce the number of values displayed here. For example, you can display only values for which the person calling the input help has authorization. You can also copy the complete hit list from the search help exit.

Before Returning the Values Selected by the User to the Input Template.

It could be advisable to intervene at this time if control of the further transaction flow should depend on the value selected. A typical example is setting set/get parameters.

u can check this link

http://help.sap.com/saphelp_nw70/helpdata/en/cf/21ee52446011d189700000e8322d00/content.htm

<REMOVED BY MODERATOR>

raam

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 1:38 PM

Former Member
0 Kudos

Hi,

A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.

This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).

A search help exit is called at certain timepoints in the input help process.

Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.

Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.

During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.

If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.

The following timepoints are defined:

1. SELONE

Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.

Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.

The timepoint is not accessed again if another elementary search help is to be selected during the dialog.

2. PRESEL1

After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).

3. PRESEL

Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.

4. SELECT

Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.

5. DISP

Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.

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). However, you should note that the process will then depend on whether a value was entered manually or with an input help.

7. RETTOP

You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.

8. EXIT (only for return as next timepoint)

The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.

9. CREATE

The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.

The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.

10. APP1, APP2, APP3

If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.

Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.

If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the moment). This search help exit should not do anything at this timepoint. Any preparatory work should be carried out at timepoint PRESEL1.

Example for a search help exit

Functionality

This module has been created as an example for the interface and design of Search help exits in Search help.

All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.

A search help exit is called repeatedly in connection with several

events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.

However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.

For more detailed information please refer to the documentation describing the concept of the search help exit.

The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Apr 10, 2008 1:51 PM

Former Member
0 Kudos

Hi,

PLease refer the link below:

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

Thanks,

Sriram Ponna.