What is match code object in SAP ?
Creation and Deletion of Matchcode Objects: 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 strin
SELECTION METHOD
Selection method of an elementary search help
The possible entries for a field displayed in the hit list are determined at runtime by selection from the database. The selection method describes the database object from which the data is read. A database table or view can be defined as selection method.
To use a field of the selection method in the input help (as field in the dialog box for restricting values, as column in the hit list or as value returned to the screen), a parameter with the same name must be inserted in the search help.
HOTKEYS
The hot key permits the user to select an elementary search help from the collective search help directly in the input field with the short notation. The restrictions can also be entered directly in the dialog box for restricting values.
Letters and digits are allowed as hot key.
With the short cut, the user can select an elementary search help of a collective search help and fill in the fields of the dialog box for restricting values directly in the input field. This can save time if the user frequently looks for values using the same search help.The short cut must be entered in the input field according to the following convention:
=HK.S1.S2.S3 etc.
where HK is the hot key of the elementary search help and S1, S2, S3, etc. are the restrictions that are entered in this order in the corresponding dialog box. Each entry is considered to be a pattern with a terminating ‘*’. Restrictions for fields for which no entry could be made in the dialog box are ignored.
The hot key need not be entered if only one elementary search help is assigned to the field or if the elementary search help stored as the standard search help should be used. If S1 consists of more than one character, the first separator ‘.’ can also be omitted.
If the hot key is entered without restrictions (=HK), the dialog box for restricting values appears. If restrictions are defined, the dialog box for restricting values does not appear and the hit list is displayed directly. If exactly one hit is found, the hit list is not displayed.
SEARCH HELP
There are the following types of search helps:
Elementary search helps execute a quest way for deciding t conceivable entries.Collective search contains a few rudimentary hunt makes a difference. aggregate pursuit help in this manner gives a few elective ocean ways to conceivable entries.Append search jars be utilized to upgrade aggregate hunt help conveyed by SAP with client explicit inquiry ways without requiring a modification.The three parts of the info assist with handling portrayed by a pursuit help are the external connection point, the web-based conduct and the technique for d assortment.
ELEMENTARY SEARCH HELP
An elementary search help is a search help that describes an input help process in which it is not possible to select one of a number of search paths.The online behavior of an elementary search help is controlled by defining the dialog type and by speifying the fields to be displayed in the dialog box for restricting values or in the dialog box for displaying the hit list (including the order in these dialog boxes).
For data collection, a database table or a view is normally defined and the possible values are selected here. This table/view is called the selection method of the search help. If the selection method is a table, a text table can also be used for collecting data if one exists. In the selection, those fieds of the selection method (and possibly of the text table) which have parameters with the same names in the search help are used.If the standard options for describing the online behavior or data collection for the search help are not sufficient, you can define its behavior more flexibly by using a search help exit.
Working With Matchcode Objects In Sap ABAP
A Matchcode is an aggregated object and it gives list of possible values for the user. A matchcode is a collection of search terms on which you retrieve a data from the database table.
All matchcode are associated with either selection criteria or parameters. When an input field has a little triangle in the right-hand corner, it indicates that it has an associated matchcode. When you click on drop-down arrow or press F4 button, it gives a list of all possible values. For example Matnr field i.e. material number from MARA table, user might not know all the material number, but they might know other details like material description, type or any other details. You can create matchcode, which has all these search terms i.e. you can create matchcode with description as search term or matchcode with type as search term.
R/3 system includes many predefined matchcode but developers can create new matchcode as is created in following case. Usually, system displays list of possible values for all the primary keys with particular search term. Usually you create matchcode in following cases: Creation and Deletion of Matchcode Objects
When you use non-primary key of input.
You need different search term for the primary key.
Creating Matchcode object:
tire Matchcode object is created in two steps:
Defining of Matchcode object.
Defining one or more search ids for the object.
Defining Matchcode Object:
It includes all the tables and fields, which make up the Matchcode, which are used for Matchcode Ids.
Steps for defining Matchcode object are as follows:
From dictionary, enter name (four character).
Select Matchcode radiobutton and click on CREATE.
Define attributes for the object i.e. description.
Select primary table.
Select the fields for the table by clicking on the fields.
Activate the object.
If at all you are selecting secondary table then it is done after selecting primary table.
And steps are as follows:
Tables Choose secondary table. A dialog box appears, which displays list of possible secondary tales. Select the table by Choose copy.
To activate the object, Matchcode object - activate. (Creation and Deletion of Matchcode Objects)
MatchUp Object:Matchcode Editor:Interface
The Matchcode Editor screen is divided into three distinct sections: a list of available matchcodes in the matchcode database; the properties of the selected Matchcode; and a description of the Matching Rules for the selected matchcode.
Matchcode Name
The top portion of the screen contains a drop-down menu of all the matchcodes found in the current matchcode file.
Below this is a Description: section that contains the description for the currently selected matchcode.
To the right are the Create Matchcode, Remove Matchcode, Copy Matchcode, and Rename Matchcode buttons with which you can create and modify matchcodes. Copying a current matchcode is often the best starting point for creating new matchcodes.
Create Matchcode
To create a matchcode:
- Click the Create Matchcode button.
- Type a name for the new matchcode in the Matchcode Name dialog box and click OK.
- The Matchcode editor presents a blank matchcode screen with no components.
- Begin adding components. Once a Data Type is selected, click anywhere in the window, or press the Enter key. This will input that data type, and have another row appear that may be edited.
Remove Matchcode
To remove a matchcode:
- Select the matchcode to be deleted in the Matchcode Name: drop-down menu.
- Click the Remove Matchcode button.
- Click Yes in the Remove Matchcode dialog box to confirm the deletion.
Copy Matchcode
To make a copy of a matchcode:
- Select the matchcode to be copied in the Matchcode Name: drop-down menu.
- Click the Copy Matchcode button.
- Type a name for the new matchcode in the Matchcode Name dialog box and click OK.
Rename Matchcode
To rename a matchcode:
- Select the matchcode to be renamed in the Matchcode Name: drop-down menu.
- Click the Rename Matchcode button.
- Type a new name for the matchcode in the Matchcode Name dialog box and click OK.
Matchcode List
Below the matchcode name is the Matchcode List section, a list of components used by the currently selected matchcode.
This list shows the basic settings for each combination.
Data Type | The type of data used by this component. See Matchcode Components for a list of all available types. |
Label | (Optional) A description of the data found in this component. Not all component types use this field. Max size of description is 20 characters. |
Size | The maximum number of characters from this component to be used by this matchcode. If the data has fewer characters, it will be padded with spaces. |
Start | Sets where the current matchcode starts counting when selecting characters to use: the left (beginning); the right (end); a specific character position; or a specific word. |
Fuzzy | The type of matching to be used on the selected data type. |
Distance | Context sensitive, sets a range for specific data types or fuzzy matching. |
Short/Empty | These settings control matching between incomplete or empty fields. |
Swap | Swap matching is the ability to compare one component to another component. |
Following these fields, to the right side of the list, there is a grid of editable check boxes that shows the combinations in which component is used.
Add Component
To add a new component to the matchcode:
- Click the down arrow to open the drop-down menu named [Select Data Type]. (There will always be a [Select Data Type] below the last defined matchcode component.)
- Select the desired data type from the drop-down menu.
- The new component is added as the last component in the matchcode.
- Select the settings for the new component by clicking the field you want to change. See the sections below for more information on the controls within this dialog.
Remove Component
To remove a component from a matchcode:
- Click the down arrow to open the drop-down menu of the component to be deleted.
- Select [Remove Component] from the top of the list in the drop-down menu.
- Once selected, click anywhere in the window, or press the Enter key. This will confirm the removal, and remove the component from the matchcode list.
Change Component Order
To change the order of components in a matchcode:
- Click and drag the name of the component.
- Drag the component to the new position.
For more information on how combinations of components are used.
Matching Strategies
This setting controls what criteria the matchcode will use to determine how to compare this component of one match key to another match key
Fuzzy Matching Strategies
- Phonetex
- Soundex
- Containment
- Frequency
- Fast Near
- Accurate Near
- Frequency Near
- Vowels Only
- Consonants Only
- Alphas Only
- Numerics Only
- Jaro
- Jaro-Winkler
- n-Gram
- Needleman-Wunch
- Smith-Waterman-Gotoh
- Dice’s Coefficient
- Jaccard Similarity Coefficient
- Overlap Coefficient
- Longest Common Substring
- Double MetaPhone
Distance
This is the property where you set a range for which two records will still match. This field is context sensitive, depending on the Data Type and Fuzzy algorithm.
Data Type | Description |
---|---|
Proximity | Distance in miles. Range: 0-4000 |
Numeric | Integer number. |
Date | Number of days. |
For example: If the Distance is set to 60:
- Two records with dates 20161225 and 20161031 will match. (they are within 60 days)
- Two records with dates 20161225 and 20160430 will match. (they are further tham 60 days apart)
AlgorithmDescriptionFast NearNumber of typographical errors. Range: Tight(1) – Loose(4)Accurate NearNumber of typographical errors. Range: Tight(1) – Loose(4)
NOTE: Since these algorithms are not published and the range was originally developed to represent a general sliding scale (narrow choice of precision), we recommend using Near:1 and carefully test before you consider using the higher settings in production, as doing so can quickly return false duplicates.
The following algorithms use a percentage range of 0-100%, indicating the minimum percentage of similarity which will return a match between two strings.
- N-Gram
- Jaro
- Jaro-Winkler
- LCS
- Needleman-Wunch
- MD Keyboard
- Smith-Waterman-Gotoh
- Dice’s Coefficient
- Jaccard Similarity Coefficient
- Overlap Coefficient
- Double MetaPhone
More information on the publically published algorithms can be found here: Advanced Algorithms.
Short-Empty Settings
This setting controls whether blank or incomplete fields are considered matches to populated fields or other blank fields. These settings are not exclusive, so two or all three may be selected at one time.
Match if both fields are blank
If two records have the same empty component, that component will be counted as matching.
Match if one field is blank
Allows matching missing data with the full data. For example, “Smith” matches “John Smith.” However, two records with the same component missing will not match.
Match initial to full field
Allows matching abbreviated data with the full data. For example, “J Smith” matches “John Smith.”
Swap Match Pairs
The Swap Match section selects which combination belong to which swap pairs.
Swap Matching allows matching “John Smith” with “Smith John.”
The components must be of the same size and should have the same set of matching options (for example, one can’t use Phonetex the other SoundEx). Up to eight pairs, A through H, can be defined.
For more information on using swap pairs
We recommend using the matchcode interface to configure swap pairs.
If coding matchcodes, see the Matchode Editor interface section for swap pair syntax.
Swap Pair Configuration
To configure a swap pair:
- Click the Swapping… button.
- The Matchcode Swap Pairs dialog will open.
- First select the pair tab you desire to edit. Pair A is selected by default.
- Select the two components that will be used for this swap pair by selecting them in their respective drop down menus.
- Then select the swapping rule:
Both components must match
The contents of both components must be a match according to fuzzy matching strategy in use for both components. “John Smith matches “Smith John” but not “Smith <blank>.”
Either component can match
At least one of the components must match. “John Smith matches both “Smith John” and “Smith <blank>.”
6. Click OK.
Combinations
Use these check boxes to select which of the 16 possible combinations will use this component.
It is easier to visualize the effects of these boxes if you look at the list of matchcode components as well:
It is important to note that each VERTICAL column of check marks designates one matchcode. For example, the screen shot above shows a combination that is made up of 4 matchcodes:
- Zip5, Last Name, First Name, Street Number, Street Name
- Zip5, Last Name, First Name, PO Box
- Zip5, Company, Street Number, Street Name
- Zip5, Company, PO Box
Conclusion Creation and Deletion of Matchcode Objects
In conclusion, the creation and deletion of Matchcode Objects are integral processes in the realm of data management. Understanding their significance, mastering their creation, and adapting to future trends will empower organizations to navigate the ever-expanding landscape of information.
FAQs
- What is the primary purpose of Matchcode Objects?
- Matchcode Objects serve to simplify the process of searching for specific data sets within a database.
- How customizable are Matchcode Objects?
- Matchcode Objects are highly customizable, allowing organizations to tailor them to their unique requirements.
- What challenges may arise during Matchcode Object creation?
- Common challenges include pitfalls to avoid and troubleshooting tips for a seamless creation process.
- Why is SEO optimization essential for Matchcode Objects documentation?
- SEO optimization enhances visibility and accessibility, even in technical content.
- Where can I learn more about Matchcode Objects?