Application Development and Automation 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: 
Read only

Pls explain te diff between searchhelps & Matchcode objects

Former Member
0 Likes
1,119

Dear friends,

Good morning,

can u pls tell me the difference between search helps and match code objects, and which situation we can use those.

Regards

Jagadeeshwar.B

5 REPLIES 5
Read only

Former Member
0 Likes
736

Both are used for Searching purpose only.

In older versions we used Matchcode

now in newer versions of SAp we use Search helps

See them in SE11 Tcode.

1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

3)An elementary search help defines the standard flow of an input help.

4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.

5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.

6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm

pls go through this for search help creation

http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm

Search Help Exits:

Reward points if useful

Read only

Former Member
0 Likes
736

Hi,

Search Help:Provides a list of values from the database

provide the cusrsor on the respective fields and pressF4

for search helpif it is a simple F4 it can check the tables

independently butit dosent check the relation between the

tables i.ePrmary key and foreign key.

Matchcodes: If it sis matchcodes objects first it can check

the tables independentely later it can check the relation

between the tables also.With matchcodes objects can ovoid

data redundancey.

Regards.

Read only

Former Member
0 Likes
736

Search helps are the Advanced concept of Match codes.

SAP Converted match codes to Search helps.

Index :

An Index is a copy of database table having few numbers of fields. This copy is always in sorted form. As we know, Sorted data would always have a speed access from a database table. Hence, we use an index for the table while reading the database records. Index also contains a pointer pointing towards actual database table so that it can access fields that are not contained in the Index

For More Information About Index :

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/09/19/indexinginSAP+Tables

Please give me Reward points..

Read only

Former Member
0 Likes
736

hi,

Matchcodes are defined in two stages in Abap/4 Dictionary:

1) The revelant table and fields are stipulated in matchcode object. A matchcode object describes the set of all possible search paths for a search item.

2) One or more matchcode ID can be defined for a matchcode object. A matchcode ID describes a special search path for a search term.The fields or combination of fields via which the search is to take place is defined in the matchcode ID.

What is a Match Code ?

Match Code is a tool to help us to search for data records in the system. Match codes are an efficient and user-friendly search aid where key of a record is unknown. What are the two levels in defining a Match Code ?

- Match Code object

- Match Code Id.

What is the maximum number of match code Id's that can be defined for one Match code object ?

- 36. A match code Id is a one character ID which can be a letter or a number.

Can we define our own Match Code ID's for SAP Matchcodes ?

Yes, the numbers 0 to 9 are reserved for us to create our own Match Code IDs for a SAP defined Matchcode object.

What is an Update type with reference to a Match code ID?

If the data in one of the base tables of a matchcode ID changes, the matchcode data has to be updated. The update type stipulates when the matchcode is to be updated and how it is to be done. The update type also specifies which method is to be used for Building matchcodes .

Search Helps

The input help (F4 help) is a standard function of the R/3 System. The user can display the list of all possible input values for a screen field with the input help. The possible input values can be enhanced with further information. This is meaningful especially when the field requires the input of a formal key.

Standard Input Help Process

A user calls an input help with the following steps (some steps can be omitted, depending on the definition of the input help):

The user starts the input help to display the possible input values for a field (search field) in a screen template.

The system offers the user a number of possible search paths. The user selects one of these search paths. Each search path offers a number of restrictions to limit the number of possible input values. These values are offered in a Dialog box for value restriction when the search path is selected.

The user enters restrictions if required and then starts the search.

The system determines the values that satisfy the entered restrictions (hits) and displays them as a list (hit list).

The user selects the most suitable line from the hit list by double-clicking.

The value of the search field is returned to the screen template (possibly together with other values).

Steps 2 and 3 are omitted if there is only a single search path available. In this case the dialog box for the value selection is offered immediately. You can also output the hit list directly after starting the input help. Steps 2 to 4 are omitted in this case.

Function of a Search Help

This standard process can be completely defined by creating a search help in the ABAP Dictionary. This search help only has to be assigned to the screen fields in which they should be available (see Attaching Search Helps to Screen Fields).

There are two types of search help:

Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).

Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.

Example for Search Helps

Each customer of a carrier (see Flight Model) or of a travel agency has a customer number. You want to find a search option for this customer number.

The user must be offered two different search paths.

The user should be able to search for the customer number using the customer data, such as the name and address.

The user should be able to search for the customer number using existing customer bookings.

You can provide the required search option by creating a collective search help SCUSTOM. Two elementary search helps SCUSTOM_NAME (for searching with the customer data) and SCUSTOM_BOOK (for searching with the existing bookings) are created for the actual search paths. These elementary search helps are included in the collective search help.

Elementary Search Help SCUSTOM_NAME

This elementary search help should enable you to search for the customer number using the name and address (street, city, country). All this data is contained in table SCUSTOM. Table SCUSTOM must therefore be selected as the selection method of the elementary search help.

You now have to decide which fields of the selection method are needed for the input help process. These are the fields that should appear either in the dialog box for restricting values or in the hit list.

In the dialog box for restricting values, the user should be able to restrict values with the customer’s name and address, i.e. the fields for the street, city and country. These fields as well as the customer’s number (the information to be found must always be in the hit list) should appear in the hit list. The fields ID, NAME, STREET, CITY and COUNTRY of table SCUSTOM must be included in the search help as parameters.

The parameter ID is declared to be an import parameter. A pattern entered in the corresponding field of a screen template can therefore be used directly for the value selection. Restrictions for the other parameters of the search help must be entered in the dialog box for value selection.

All the parameters of the search help are declared to be export parameters. As a result, all the parameters of the hit list can be returned to the screen template if the corresponding fields are available there.

Elementary Search Help SCUSTOM_BOOK

This elementary search help should enable you to search for the customer number using existing customer bookings. The flight data for the booking (flight number, date of flight, city of departure, city of arrival) and the name of the customer should be used for the search here. This data is distributed on the tables SBOOK (bookings), SCUSTOM (name) and SPFLI (cities of departure and arrival). The following graphic shows the relationship between the relevant tables, that is the existing foreign key relationships.

In this case a database view SCUS_BOOK must be created on these three tables (see Example for Views) as selection method. The tables in the view (join) are linked as defined by the existing foreign key relationships (see Foreign Key Relationship and Join Condition).

In the dialog box for restricting values, the user should be able to restrict the search for booking data with the carrier ID, customer name, city of departure and city of arrival The flight date and of course the customer number should also be displayed in the hit list. Fields CARRID, FLDATE, CUSTOMID, NAME, CITYFROM and CITYTO of view SCUS_BOOK must be included in the elementary search help as parameters of the search help.

The parameter CUSTOMID is declared to be an import parameter. All the parameters of the search help are export parameters.

Collective Search Help SCUSTOM

The two elementary search helps are now included in the collective search help. You must now allocate the parameters of the elementary search helps to the parameters of the collective search help.

The parameter ID of the collective search help is marked as an import parameter. All the parameters are export parameters. The values can thus be copied from the hit list to the screen template.

Attaching the Search Help

In order to be able to use the search help SCUSTOM in screen templates, the attachment of the search help (see Attaching Search Helps with Screen Fields) must be defined.

Attaching to the Check Table SCUSTOM

The search help should be available for all the fields that are checked against table SCUSTOM. The search help therefore must be attached to table SCUSTOM. The search help parameters must therefore be assigned to the key fields of table SCUSTOM.

The parameter ID of search help SCUSTOM is here assigned to the field ID of table SCUSTOM in this field assignment. No assignment is possible for all other parameters of the search help (NAME, CITY and COUNTRY) since table SCUSTOM does not contain this information as key fields.

Attaching to a Field of Table SCUSTOM

In order that the search help is available when the field SCUSTOM-ID is directly copied to the input template, you have to attach the search help to this field.

With this type of attachment, all the parameters of the search help can be assigned to the corresponding fields of the table.

Creating Collective Search Helps

Procedure

...

1. In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.

A dialog box appears in which you must select the type of search help.

2. Select Collective search help and choose .

The maintenance screen for collective search helps is displayed.

3. Enter an explanatory text in the field Short text.

You can for example find the search help at a later time using this short text.

4. 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.

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.

You can assign the parameter a default value in the Default value field.

5. In exceptions it could be necessary to change the standard process defined by the search help. You can implement the deviation from the standard using a search help exit.

In this case enter the name of the search help exit in the corresponding field.

6. On the Included search helps tab page, define the search helps that you want to include in the collective search help.

You can include elementary search helps and collective search helps.

Use the Hide flag to control whether an included search help should appear in the dialog box for selecting the elementary search help. If the flag is set, the search help is not offered.

It makes sense to hide search help inclusions if one or more search paths in the standard system should not be used in a specific SAP System. Similarly, search help inclusions can also be already hidden in the standard system because they only can be used meaningfully in a few cases. You have to cancel the flag in this case.

7. Position the cursor one after the other on each allocated search help and choose Parameter assignment.

In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.

You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal.

8. Save your entries.

A dialog box appears in which you have to assign a development class to the search help.

9. Choose .

Result

The collective search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred when the collective search help was activated, the activation log is automatically displayed.

Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.

Other Options

You can test the flow of an input help defined by the collective search help with . A dialog box appears in which you can simulate the behavior of the search help under different conditions. You can obtain information about the options provided in this window with .

regards,

sreelakshmi.

Read only

Former Member
0 Likes
736

hi,

A search help is an object of the ABAP Dictionary with which input helps (F4 helps) can be defined.

There are the following types of search helps:

Elementary search helps implement a search path for determining the possible entries.

Collective search helps contain several elementary search helps. A collective search help therefore provides several alternative search paths for possible entries.

Append search helps can be used to enhance collective search helps delivered by SAP with customer-specific search paths without requiring a modification.

The three components of the input help process described by a search help are the outer interface, the online behavior and the method of data collection.

The outer interface is defined by specifying the interface parameters. They define the context information to be used in the input help process and the attributes to be sent to the screen by the input help.

The search help attachment defines the field contents for parametrizing an import parameter and the fields of the input template in which the contents of the export parameters should be returned.

The dialog behavior and data collection are defined differently for elementary search helps and collective search helps.

The behavior of a search help can be made more flexible than usual with search help exits.