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: 

Match Code

Former Member
0 Kudos

Hi

What is Match Code and how it is used???

Regards

Nanda

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

Matchcodes are an SAP technique to help users find information, normally in

connection with the F4 key on an input field. Information from one or more

tables can be combined and queried on using various search criteria: for

example, all companies whose name starts with "TATA" and whose location is

"INDIA."

Traditionally, matchcodes were implemented as redundant collections of data

in pool tables, as illustrated in the following:

Company header table Company detail table Matchcode pool table

(TAB1) (TAB2) (M_POOL)

The advantage of the old pool matchcodes was a quick and easy search, as

long as the significant fields were entered by the end user (in this case,

company name and location). The disadvantage was that for every change in

the master tables, the system had to make redundant updates in the matchcode

tables. In addition, it was impossible to search in a pool matchcode for any

but the significant fields, i.e., it would have been very CPU intensive to

search for all companies in San Francisco.

This limitation led to the creation of matchcodes (more precisely, in SAP

terms, "matchcode IDs") for every possible query you could expect from end

users (one with company name as the significant field, one with location,

yet another with customer number, and so on). Customers with a very high

number of debitors, for example, soon found that their pool matchcode tables

grew to unmanageable sizes.

As of release 2.1, it is now possible to define so-called transparent or

view matchcodes. Transparent matchcodes are implemented by defining a

database view for the information that should be queried. Database views are

not redundant containers of data, but are merely definitions of paths to

obtaining that data. In the example:

Company header table Company detail table Database view:

(TAB1) (TAB2) (M_VIEW)

<b>Advantage</b>

The advantage of this new technique is that it is no longer necessary to

maintain redundant matchcode data: a view takes only a small amount of

database dictionary space. Using this technique, the query is converted by

the database to a query against the original tables, so it becomes very

important that access be supported by the proper indexes.

<b>How to create</b>

Macro Choosefields (&Fieldname [Choose)... [Copy EndMacro

/SE11 "ABAP Data Dictionary

<Object name "the name of the Match Code Object

*Matchcode objects

[Create ><Short Text ><Primary Table

[Tables

[Yes "Save before terminating Editing?

><Development Class [Save

[Choose Sec. Tab. "presents candidate list

(&Tablename [Choose)... [Copy

[Fields

[Yes "Save before terminating Editing?

[Enter

(&Tablename [Choose Fields #Choosefields)..

[Save [Back [Activate

"Match Code Object is now created and activated.

CHECK THIS LINK

http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef46446011d189700000e8322d00/content.htm

http://web.mit.edu/sapr3/docs/webdocs/dontindex/pdf/mcqc.pdf

<b>I'm having a material on Matchcode if u want drop your id here i'll forward that materisl to you</b>

Regards

Pavan

3 REPLIES 3

Former Member
0 Kudos

Hi

Matchcodes are an SAP technique to help users find information, normally in

connection with the F4 key on an input field. Information from one or more

tables can be combined and queried on using various search criteria: for

example, all companies whose name starts with "TATA" and whose location is

"INDIA."

Traditionally, matchcodes were implemented as redundant collections of data

in pool tables, as illustrated in the following:

Company header table Company detail table Matchcode pool table

(TAB1) (TAB2) (M_POOL)

The advantage of the old pool matchcodes was a quick and easy search, as

long as the significant fields were entered by the end user (in this case,

company name and location). The disadvantage was that for every change in

the master tables, the system had to make redundant updates in the matchcode

tables. In addition, it was impossible to search in a pool matchcode for any

but the significant fields, i.e., it would have been very CPU intensive to

search for all companies in San Francisco.

This limitation led to the creation of matchcodes (more precisely, in SAP

terms, "matchcode IDs") for every possible query you could expect from end

users (one with company name as the significant field, one with location,

yet another with customer number, and so on). Customers with a very high

number of debitors, for example, soon found that their pool matchcode tables

grew to unmanageable sizes.

As of release 2.1, it is now possible to define so-called transparent or

view matchcodes. Transparent matchcodes are implemented by defining a

database view for the information that should be queried. Database views are

not redundant containers of data, but are merely definitions of paths to

obtaining that data. In the example:

Company header table Company detail table Database view:

(TAB1) (TAB2) (M_VIEW)

<b>Advantage</b>

The advantage of this new technique is that it is no longer necessary to

maintain redundant matchcode data: a view takes only a small amount of

database dictionary space. Using this technique, the query is converted by

the database to a query against the original tables, so it becomes very

important that access be supported by the proper indexes.

<b>How to create</b>

Macro Choosefields (&Fieldname [Choose)... [Copy EndMacro

/SE11 "ABAP Data Dictionary

<Object name "the name of the Match Code Object

*Matchcode objects

[Create ><Short Text ><Primary Table

[Tables

[Yes "Save before terminating Editing?

><Development Class [Save

[Choose Sec. Tab. "presents candidate list

(&Tablename [Choose)... [Copy

[Fields

[Yes "Save before terminating Editing?

[Enter

(&Tablename [Choose Fields #Choosefields)..

[Save [Back [Activate

"Match Code Object is now created and activated.

CHECK THIS LINK

http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef46446011d189700000e8322d00/content.htm

http://web.mit.edu/sapr3/docs/webdocs/dontindex/pdf/mcqc.pdf

<b>I'm having a material on Matchcode if u want drop your id here i'll forward that materisl to you</b>

Regards

Pavan

former_member188829
Active Contributor
0 Kudos

Hi,

Check this link..

http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef1f446011d189700000e8322d00/content.htm

Check this thread..

Message was edited by:

Vishnu Reddy

Former Member
0 Kudos

<b>A matchcode</b> 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.

Check this link for more details.

http://help.sap.com/saphelp_40b/helpdata/en/cf/21ef1f446011d189700000e8322d00/content.htm

Regards,

Maha