Start of Content Area

Procedure documentation Reference Characteristics in Dependencies  Locate the document in its SAP Library structure

Use

You can use reference characteristics in actions and procedures to change the values in master data fields.

Note

We recommend that you always use procedures to change master data, not actions.

In the conditional part of actions and procedures, and in preconditions and selection conditions, you can have read-only access to a table.

MDATA

If you are using a reference characteristic in an action or procedure to change the value of a master data field, enter MDATA before the characteristic, because reference characteristics have no initial value in configuration.

If you try to change the master data field without using the keyword MDATA, the system does not recognize the characteristic as having a value. Processing is terminated.

Example

You have created reference characteristic QUANT, which refers to the component quantity in a BOM item.

You use this reference characteristic in an action or procedure. You want to increase the component quantity by 1:

$SELF.QUANT = MDATA $SELF.QUANT + 1

The expression MDATA refers to the quantity in the BOM. This quantity is increased by 1.

The reference characteristic must be referred to with the variable $SELF, because the reference characteristic refers to the BOM item currently being processed.

Reference Characteristics in Procedures

Reference Characteristics in Actions

MDATA lets you access the original value of a master data field and change it.

You can change the value again. Since you then access the changed value, the expression MDATA is no longer required.

MDATA lets you access the original value of a master data field and change it.

You cannot change the value again.

Restrictions

MDATA cannot be used with a characteristic that refers to structure SDCOM of variant conditions.

Characteristics that refer to this table are multiple-value characteristics, so the expression MDATA cannot express a single value. Besides, this table contains transaction data rather than master data.