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(SAP-ABAP)

Former Member
0 Kudos
234

Hi Friends,

I am working on Matchcode.I have a elementary matchcode(z_match) which contains two fields form MCHB table which has been assigned to a collective match code(MCH1) .But as per new requirement i need to add two more fields from different table (LIPS) in existing matchcode(z_match) .So that my match code shows 4 fields altogether .

Could u guide me how to do it with small example step_by_step ?

Thx in Adv,

Bobby

1 REPLY 1

former_member196299
Active Contributor
0 Kudos
54

hi ,

please find an example with details for collective search help ...

Collective Search helps ( CSH 😞 These kind of search helps are the combination of various elementary search paths, so they can provide a some alternative search paths.

While defining the CHS we need to provide all the ESH we want to include in that

CSH .A collective search help also has an associated interface for transporting the values they use both the ESH parameter and the input template.

A CSH is a collection of single or multiple elementary search helps and it combines all the meaningful search paths. While linking the elementary search helps with the collective search help there must be at-least one parameter assignment done for linking both of them. This parameter assignment should be done between the interface parameters of the collective search help with that of the included search helps.

Creation of Elementary Search Help:

The creation of an elementary search help is described below with example.

1. Open TCode – SE11 for DDIC objects -> select the radio button for Search helps -> give the name of the search help you want to create, ex – ZSH004.Click on Create .

2. In the next screen select the option “ Elementary search help “ .

3. Now you need to provide the short text for your search help.

4. In the selection method provide the table or view name you want to use for data retrieval. Ex. ZMARA_01.

5. Select the dialog type according to your scope, ex. “ display values immediately’.

6. Then provide the search help parameters i.e. the interface parameters for the search help .

7. The ZMARA_01 table fields MATNR, ERSDA,MHDHB,MHDHT,MHDRZ are provided by selecting the table fields , by doing this the data elements for these fields are automatically copied to the interface from the selection method.

8. Now define the type of parameter ( import or export ) here for the selection and return of values in runtime.

9. Provide the positions to these parameters to specify how they will be arranged in the hit list display.

10. Now save the object in the respective development class and check the same for errors and then activate .Finally the creation of a ESH ( ex: ZSH004 ) is complete and can be used for providing the input help.

You can test the operation of your search help by clicking F8.

The appearance of your search help will be like the fig. provided below.

Creation of Collective Search Helps:

The creation of an elementary search help is described below with example.

1. Open TCode – SE11 for DDIC objects -> select the radio button for Search helps -> give the name of the search help you want to create, ex – ZSH005.Click on Create .

2. In the next screen select the option “ Collective search help “ .

3. Now you need to provide the short text for your search help.

4. Select the dialog type according to your scope, ex. “ display values immediately’.

5. Then provide the search help parameters i.e. the interface parameters for the search help .

6. The ZMARA_01 table fields MATNR, ERSDA,MHDHB are provided by selecting the table fields . Define the types for the parameters of a collective search help by assigning a data element. Enter the name of the data element that describes the contents of the search help parameter in the Data element field.

7. In the Definition tab page enter the parameters of the collective search help.

Select the Imp flag if it is an import parameter. Select the Exp flag if it is an export parameter. Optional-You can assign the parameter a default value in the Default value field.

8.

Next, Select the tab “ Included Search help “ and provide the elementary search helps you want to include here . In the current example 2 elementary search helps ZSH004 and ZSH003 are being included.

9. Create a parameter assignment between all the included search helps and the collective search help here ( Note that at-least one of the parameter assignment must be done for linking the includes ) .This can be done by clicking on the tab

10. “Parameter assignment “ .ex. we have done the parameter assignment here by using the MATNR field for both the includes i.e. the selection paths should be based on the provided material number.

11. After performing the steps save the search help and activate for use in the later stage.

Additions to the Search helps :

There are few additional functionalities which can be achieved by providing the following :

• Hot Key: The hot key is used to select the elementary search help from the collective search help and to enter the restrictions in the dialog box for restricting values directly from the entry field. If the user often searches for values using the same search help, this procedure can save time. The hot key is available only if for the relevant screen field there is an entry in the Screen Painter in the Search help attribute, that is, if this attribute is not initial.

• Search Help Exits: In exceptions, you might have to change the standard flow defined by the search help with a search help exit. In this case enter the name of the search help exit in the corresponding field. In the later part of the document one example has been provided for describing and understanding Search Help Exits.

Search Help Exits: 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 using a search help exit. The search helps should look as much same as possible through out the entire system so all the exceptions only should be put in the search help exits.

The 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 and the administrative data of the help processors are passed to the search help exit using the interface.

There are some of the search help exits provided by the SAP system and they are used when needed. All the search help exits are stored under the function group SDHI.

hope this helps ...

Reward if helpful !

Regards,

Ranjita