Defining Flexible Functions

Prerequisites

To define a flexible function, you need a function with table assignments (see Implementing Functions , section "Table for flexible functions").

Note Note

Functions referencing internal structures (for examples, BOMs or routings) are colored in the function tree.

End of the note.

Procedure

  1. Double click on the cell in the quantity column of the template in which you want to define a flexible function. Editor and function selection are displayed in the lower screen area.

  2. Use the function tree to select a function with a table assignment (highlighted in color) and drag the function to the input screen of the editor (Drag&Drop). The system displays the selection toolbar Flexible Function Condition.

  3. If you want to enter a condition, choose Flexible Function Condition. This takes you to the editor.

  4. Enter a condition. Proceed as if defining a method. For more information, see Defining Methods .

  5. Choose Flexible Function Formula from the selection toolbar. This takes you to the editor.

  6. Enter a formula. Proceed as if defining a standard formula. For more information, see Defining Formulas .

  7. Choose Transfer . This takes you to the editor, where you can see the flexible function call-up that you created.

    Caution Caution

    Never change the internal names of flexible functions beginning with a dollar sign ($). The SAP system cannot find the function otherwise.

    End of the caution.
  8. The entries in the editor are saved when you save the entire template.

The call up of the flexible function appears in the quantity column of the item from which you entered the editor for activity quantities.

Example Example

You can choose the flexible function TotalOfBOMItems.

One possible condition is ” CheckMaterialClassTrue ”, with the parameters CLASS TYPE = ‘001’, MATERIAL NUMBER = BOM_ITEM_COMPONENT and CLASS = ‘AB’.

You can enter “ BOMItemRequiredQuantity * 1.1/ OrderTotalQuantity ”.

The SAP system then selects all bills of material components where the materials belong to class AB in type 001. The formula generates a numeric value for each chosen component. The final result of the flexible function is the sum of all values.

End of the example.

See also:

Maintaining Flexible Functions

Example: Quantity Determination .