Defining and using compute statements

A compute statement is an arithmetic equation consisting of Lawson data dictionary items and operation symbols that lets you create customized calculation formulas. Use this procedure to define a compute statement and add it to a column.

Note: If you are using a total name or total range in your compute statement, then you must first define it on either Total Names (RW70.1) or Total Range (RW60.1).

See Defining a total name and Defining a total range.

  1. Access Compute Statement (RW50.1).
  2. Define the compute statement. Use these guidelines to specify the field values:
    Compute

    Specify a name and description that identifies the compute statement that you are defining.

    Folder

    Select the folder where you want to store the compute statement.

    Compute Lines

    Specify the calculation formula for the compute statement. You can use data dictionary items, total names, numbers, and operation symbols to define the equation. These are the valid operation symbols:

    + for addition

    - for subtraction

    * for multiplication

    / for division

    ** for exponents

    ABS for absolute values

    Consider these guidelines before constructing a compute statement:

    • Data dictionary items can be given parameters such as periods, column numbers, budget numbers, total names, and accounting unit overrides.

    • You can use parentheses to determine the order of operations within arithmetic equations.

    Compute Lines - continued
    • You can define a maximum combination of 40 numbers and data dictionary items for each formula. For example, the compute statement (CPBUD-CPAMT) /100, which produces a percent variance, is equivalent to three. Any item preceding or following an operation symbol counts as one element.

    Select Usage

    Compute statements can be used in a variety of Lawson applications. Select the application(s) in which you want to be able to use the compute statement.

    Default Heading

    Specify a default heading that the desktop Report Writer Designer will use.