Show TOC

Example for Using the Formula EditorLocate this document in the navigation structure

Use

The company code field (0COMP_CODE) is not included in your data target or InfoSource. However you can determine the company code from the first four character spaces of the cost center (0COSTCENTER).

You create the following formula for this purpose:

SUBSTRING( cost center, '0' , '4')

Syntax:

SUBSTRING(String, Offset, Length)

Step-by-Step Procedure in Standard Mode:

  1. In the transformation library, on the right hand side under Show Me, choose the category Strings. From the list, select the Substring function by double-clicking on it. The syntax of the formula is displayed in the formula window: SUBSTRING( , , )

    The cursor automatically appears over the first parameter that needs to be specified.

  2. From the list on the left-hand side of the screen, choose the Cost Center field by double-clicking on it.

  3. Place the cursor where you want to enter the next parameter.

  4. Enter the number 0 using the Constant button (for the Offset parameter). The commas are added automatically.

  5. Place the cursor where you want to enter the next parameter.

  6. Enter the number 4 using the Constant button (for the Length parameter).

  7. Choose Back. The formula is now checked and saved if it is correct. You receive a message if errors occurred during the check, and the system highlights the erroneous element in color.