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

Matchcode

Former Member
0 Likes
705

Anyone please tell me what is a matchcode and whats is its use?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
582

Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.

Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.

A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:

You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.

You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.

A material number is to be entered in a screen field. Since the user cannot be expected to know this number, it must be possible to search for this number using the attributes of the corresponding material.

Several search paths are possible for this search. For example, you can search for the material number with the material name, the material class or the material manufacturer.

The corresponding matchcode object then comprises the fields for the material number, material name, material class and manufacturer. One matchcode ID corresponds to each search path. For example, ID A could describe the search for the material number by manufacturer. This ID only contains the fields for the material number and manufacturer.

Matchcode Object

The tables relevant for the search are included in a matchcode object. The table selection is based on one primary table. Further secondary tables can also be included, which are linked with the primary table by foreign keys. The fields of the matchcode object can then be selected from the Basis tables.

A matchcode object is not stored physically. It only describes a complete logical view on one or more tables.

Matchcode IDs

Several matchcode IDs can be created for one matchcode object. The matchcode IDs are derived from the matchcode object by projection (field selection) and selection (definition of a selection condition).

A matchcode ID must be identified within a matchcode object with one letter or digit. This means that a maximum of 36 matchcode IDs (26 letters and 10 digits) can be defined for each matchcode object.

Selection conditions can be defined for each matchcode ID. These are used as a filter for the matchcode to be built. These selection conditions can define restrictions for all the fields from the Basis tables of the relevant matchcode ID.

3 REPLIES 3
Read only

Former Member
0 Likes
582

Hi Riyaz,

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.

Matchcodes are replaced by SEARCH HELPs in latest versions

see the doc

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.

CREATION:

Go to SE11 Tcode

select search help

give the 'z' search help name and create

select the selection method ur table name eg : 'mara'

dialog module 'display value immediately'.

add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.

where left position when displaying and spos = search position

and then save and activate ..

See the links:

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

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

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=2176485

https://forums.sdn.sap.com/click.jspa?searchID=3173469&messageID=3601619

pls go through this for search help creation

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

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

Search Help Exits:

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

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

https://forums.sdn.sap.com/click.jspa?searchID=4390517&messageID=1712818

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

A Collective search help provides alternative search

Paths by combining elementary search helps.

Only one search help can be attached to a field, table or data element. Several search paths are therefore attached with a collective search help.

A collective search help also has interface parameters like

an elementary search help.

Like an elementary search help, a collective search help has an interface of IMPORT and EXPORT parameters with which the search help exchanges data. Using this interface, the collective search help can be attached to fields, tables and data elements exactly like an elementary search help.

Parameter assignment needs to be done for each of the

Included search helps.

When you define a collective search help, there are no components for describing the dialog behavior and data selection; instead the included search helps are listed here. You must assign the parameters of the collective search help to the interface parameters of the included search help for each inclusion.

User may choose the tab and thus the elementary

search maethod.

When we execute the search help SCUSTOM, we are confronted with a dialog which gives us an option of either restricting

By 1)Search for customer according to booking

2)Search for customer according to name.

These are effectively the elementary search helps (SCUSTOM_BOOK and SCUSTOM_NAME) which have been included in the collective search help SCUSTOM.

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.

Steps to create a Collective Search Help

1)Enter the search help name and click on create.

2)Choose Collective search help radio button option as the search help type.

3)Enter the search help parameters.

4)Instead of the selection method, we enter the included

search helps for the collective search help.

5)We need to assign parameters for each of the included

search helps.

6)Complete the parameter assignment by clicking on the push button

7)Collective search help offers the user to obtain F4 help

using any of the included search helps.

Reward if helpful.

Read only

Former Member
0 Likes
583

Matchcodes were replaced with Search Helps starting with Release 4.0. Please use search helps to assign an input help to a field.

Existing matchcodes were automatically converted to search helps. A matchcode object is hereby converted to a collective search help with the same name. Each matchcode ID of the matchcode object is converted into an elementary search help with the same name and assigned to the collective search help created from the matchcode object.

A matchcode is a means of finding data records stored in the system. The matchcode is defined in the ABAP Dictionary in two steps:

You first define the relevant tables and fields for the search in a matchcode object. A matchcode object describes the set of all possible search paths for a search string.

You then create one or more matchcode IDs for a matchcode object. A matchcode ID describes a special search path for a search string. The matchcode ID defines the fields or field combinations to be used in the search.

A material number is to be entered in a screen field. Since the user cannot be expected to know this number, it must be possible to search for this number using the attributes of the corresponding material.

Several search paths are possible for this search. For example, you can search for the material number with the material name, the material class or the material manufacturer.

The corresponding matchcode object then comprises the fields for the material number, material name, material class and manufacturer. One matchcode ID corresponds to each search path. For example, ID A could describe the search for the material number by manufacturer. This ID only contains the fields for the material number and manufacturer.

Matchcode Object

The tables relevant for the search are included in a matchcode object. The table selection is based on one primary table. Further secondary tables can also be included, which are linked with the primary table by foreign keys. The fields of the matchcode object can then be selected from the Basis tables.

A matchcode object is not stored physically. It only describes a complete logical view on one or more tables.

Matchcode IDs

Several matchcode IDs can be created for one matchcode object. The matchcode IDs are derived from the matchcode object by projection (field selection) and selection (definition of a selection condition).

A matchcode ID must be identified within a matchcode object with one letter or digit. This means that a maximum of 36 matchcode IDs (26 letters and 10 digits) can be defined for each matchcode object.

Selection conditions can be defined for each matchcode ID. These are used as a filter for the matchcode to be built. These selection conditions can define restrictions for all the fields from the Basis tables of the relevant matchcode ID.

Read only

Former Member
0 Likes
582

Hi Riyaz,

Match codes are..

->Devices for users to find values stored in SAP database system based on defined criteria.

->For retrieving data based on non-key fields.

->It is a keyword used to call the Search help for the Selection Screen element.

Reward points if useful..

Regards,

Goutham.