Show TOC

Function documentationDependencies as Functions

 

You can create custom functions in Java and use them in product modeling.

Features

To be able to use a Java function in product modeling, under Functions, create a function with the same name as the Java function and then define which characteristics you will use as parameters in that function.

You can assign functions to classes and products as dependency type Function Formula.

Activities

Editing Functions
  1. In the product model, choose Functions and then choose New.

  2. Enter a function name and a description.

  3. In section Function Parameters, choose New and open the input help for Characteristic. A dialog box appears in which you can select the characteristics of the product model that you want to use in the function.

  4. Set the Key indicator for one or more characteristics.

    Note Note

    The meaning of this key is described in section "Assigning Functions as a Dependency Type to a Class or Product".

    End of the note.
  5. At this point, the status of the function is In Preparation.To be able to assign the function to a class or product, set the status to Released.

Assigning Functions as a Dependency Type to a Class or Product

When you have edited a function and released it, in section Dependencies, create a Function Formula for a class or product and select a function.

Note Note

Only functions with status Released appear in the selection list.

End of the note.

In the Mapping section, you see the characteristics that you selected before, if you created them for the selected class or product.

For characteristics that you did not indicate as key characteristics, you can select from the following actions:

  • No Value

    The system uses this option as the default. If you select No Value, the function has no effect on this characteristic in the configuration.

  • Set Value

    If you select Set Value, the formula determines a value during the configuration. You cannot change this value.

For characteristics that you have defined as key characteristics, the system automatically selects the Read Value action, which cannot be changed. The effect on configuration is that this value must be chosen by the user and cannot be determined by the function.

More Information

Also refer to SAP Note 870201: Implementing variant functions in Java.