Example Dependency: Cable Type and LAN Type Locate the document in its SAP Library structure

This example shows how tables can be used in constraints. The table in the example describes the following allowed combinations of values for characteristics C_LAN_TYPE and C_CABLE_TYPE:

C_LAN_TYPE

C_CABLE_TYPE

Ethernet Thinwire

Twisted pair

Ethernet Thinwire

Shielded twisted pair

Ethernet Thickwire

Coax cable

Token Ring

Twisted pair

Token Ring

Shielded twisted pair

Token Ring

Glass fiber

Token Bus

Coax cable

FDDI

Glass fiber

Note

Tables used in dependencies can only contain single-value characteristics. The characteristics of the classes that are compared with the characteristics in the table can also be multiple-value characteristics or restrictable characteristics.

This table is used in the constraint to define which combinations of values are valid. If an invalid combination of values is assigned when you configure a material, the constraint triggers an inconsistency message.

OBJECT:
network is_a (300) c_net

RESTRICTIONS:
table cable_lan
(c_lan_type = network.c_lan_type,
c_cable_type = network.c_cable_type).

The constraint refers to all networks, because class C_NET is entered as an object. This class covers both company networks and department networks.

Under RESTRICTIONS, the characteristics of the table are compared with the characteristics of the class. In this example, the same characteristics are used in both the table and the class.

You can also use tables in constraints to infer values. To do this, you enter the characteristic whose value you want inferred by the table under INFERENCES. However, this is only possible if a unique value can be inferred. If you want to infer a value for the cable type, and the value ‘Token Ring’ is assigned to the LAN type, a unique value cannot be inferred for the cable type, because there are three possible values.

You can also use tables in constraints to restrict the allowed values of a characteristic. However, to do this you must create separate characteristics for the class and the table. The characteristics of the class must be defined as restrictable (refer to Constraints: Inferring Values).

 

 

Leaving content frame