Selecting Fields of Matchcode IDs


  1. In the maintenance screen for the attributes of the matchcode ID, choose Goto ® Fields.

    The maintenance screen for the matchcode ID appears.

  2. Position the cursor on a table name and choose Edit ® Choose fields.

    The fields of the corresponding table are displayed in a dialog box.

  3. You can include a field in the matchcode ID by clicking on the corresponding entry and choosing Choose. The entry is highlighted. You can remove a wrongly selected field by positioning the cursor on the field in question and choosing Delete field.

    Press Copy after selecting all the required fields. The selected fields are copied to the matchcode ID.

    The order of the selection exactly corresponds to the order in which the fields are listed in the matchcode ID. The order of the fields in the matchcode ID is of paramount importance for later accessing behavior, for example, in connection with the possible entries help F4. The fields that are most frequently accessed should be placed at the start.

  4. Save your field selections if you do not wish to make any of the optional settings described below.


For reasons of consistency, matchcode IDs may only contain fields of tables that are linked with a foreign key. For example it is not possible to include fields from two tables that are only linked with a third table that is not contained in the matchcode ID. In such a case this linking table must be included in the matchcode ID with a key field.

The data of a matchcode ID of update types A, S and P are stored in pooled tables. The system tries to store all the fields of the matchcode ID in the key of the corresponding pooled table. The key of a pooled table, however, may not be of arbitrary length. It is therefore possible that some of the fields of the matchcode ID cannot be stored in the key of the pooled table. In order to ensure that the records of a matchcode ID are unique, however, at least all the key fields of the matchcode ID (that is all the fields necessary to uniquely identify a matchcode record) must lie within the first 110 bytes.

The fields of the ID must uniquely identify each record in matchcode IDs of update type S. However, not all of the key fields of the tables used in the ID need be included. A further constraint is that the ID must contain at least one key field of a table included in the ID, even if the remaining fields already uniquely identify each record.

Other Options


Here you can define how the matchcode records should be saved.

  • Lngth, Offs: You can define a field as a sub-field by specifying its offset and length. You have to define a suitable data element (the type and length of the referenced domain must agree with that of the sub-field) in the column Data elem. Key fields may not be sub-fields. No sub-fields may be defined for transparent matchcode IDs (update type I).
  • G/K: This flag defines whether to distinguish uppercase and lowercase notation when building the matchcode records. If nothing is specified here, the matchcode records are built and output in uppercase for matchcode IDs of update type A, S or P. The search is not case-sensitive. This field is irrelevant for matchcode IDs of update type I because no separate matchcode records are written (search is via a view).


You can influence how the selected matchcode records are output. The following settings are possible:

  • Ln: Line in which a particular field is to appear in the matchcode output. A maximum of three lines can be output.
  • Cl: Column in which a particular field is to appear in the matchcode output. Column + field length for the matchcode output may not exceed the assumed page width of 80 characters.
  • Mod: This flag is selected automatically if you change the entries in columns Ln and Cl.
  • Ns: If this flag is set, the corresponding field is not used for matchcode selection. It does not appear in the field input list for the possible entries help F4 and is not evaluated in the matchcode search string.


Here you define whether values from matchcode records that were selected using the online help function should be stored in global SAP memory or whether values for the matchcode selection should be obtained from memory.

  • PID: Parameter ID for defining default values for a field in the user master record.
  • SP: Select the flag SP if the field value read from the selected matchcode record should be stored in memory.
  • GP: Select the flag GP if the field value for matchcode analysis should be obtained from memory. The advantage of this method is that the user no longer has to enter a field value obtained from memory on the screen by hand.

Changing Data Elements

The system assigns the matchcode field the data element of the corresponding table field. You can change this data element. This may be necessary, for example, if you want to allocate other documentation to the matchcode field.

Simply overwrite the name of the data element in the field Data elem. The new data element must refer to a domain with the same data type and the same length as the original data element.

Next Action when Creating a Matchcode (Optional):

Define the selection conditions of a matchcode ID