Show TOC

New Functionality for Matchcodes

Description

Transparent matchcodes

With Release 3.0A, most SAP matchcodes are converted to the transparent implementation method. This means that the matchcode data is no longer kept in an additional table but is made accessible via a database view. The matchcode data structure using the program SAPMACO is also inapplicable for transparent matchcodes.

When a transparent matchcode ID (indicated by update type 'I') is activated, there is a check if an appropriate database index exists for this ID. Such an index is generally necessary to support the matchcode selection. If a corresponding index does not exist, considerable performance problems can occur during matchcode selection.

The check assumes that the first field in the matchcode definition (for client-specific matchcodes, the first field after the client field) is the search field relevant for this matchcode, that is, it assumes that this field is restricted by the user entering a selection value for the matchcode search. An index which contains the relevant matchcode search field (possibly after a client field) is therefore regarded as an appropriate index.

If such an appropriate database index does not exist, a corresponding warning is issued when activating the matchcode ID. Two cases are distinguished for the further procedure:

The fields for which an equality search is carried out (client, language or - more generally - all the fields for which the Get parameter indicator, that is, the flag GP is set on the screen Maintain Matchcode ID (Fields) ) should be contained in the first position in an index for supporting the matchcode selection.

The index should thus have the following structure:

This index structure does not, however, always ensure that the created index is also used for data selection by the underlying database system. The index that is actually used depends on the optimizer of the database system. You must therefore ensure that the secondary index that you have created is better than the default primary index created for the corresponding table.

You can check whether the index that you created is used for supporting the matchcode selection as follows:

1. Open a second session and choose System -> Utilities -> SQL trace
2. Press Trace on.
3. Make a search entry in the original session and send it.
4. In the second session, press Trace off and then List trace.
5. In the displayed list, search for statements in which the matchcode view M_<matchcode-object_name><matchcode-Id> is used. Display further information for these statements with Explain one SQL request. This explains which index was used.

Deactivating matchcode IDs

In applications, many matchcode IDs are created as standard which are only rarely used in some areas. These unnecessary IDs can load the system under some circumstances.

The function Deactivate in the menu Matchcode ID on the screen Maintain Matchcode ID (Attributes) allows you to reduce this load. In contrast to deleting, the definition of the ID is retained in the ABAP Dictionary when deactivating. If the ID is needed again later, it can simply be reactivated.

Deactivate can only be performed on active matchcode IDs. Before a matchcode ID can be deactivated, the objects belonging to the ID must be deleted in the database. For transparent matchcodes, this means deleting the view in the database. For non-transparent matchcodes, the corresponding matchcode data must first be deleted using the program SAPMACO before deactivation (or via Utilities -> Matchcode data -> Delete in Transaction SE11).

Please note for matchcode IDs of update type S, that the matchcode records of a deactivated ID are not automatically adapted to changes in the data. After reactivation, the matchcode records must be set up again using the matchcode utilities.

Please note that deactivated matchcode IDs are not displayed for selection by the F4 help.

Note:

Deactivated matchcode IDs are reactivated during an update. Deactivation is therefore purely a Customizing function. For this reason, you must deactivate deactivated matchcode IDs again after an update.