Definition of Variables 

Use

You define variables if you want to transfer the value of a message characteristic to another process instruction.

You can define variables in the following cases, for example:

  • Variables in entries to refer to the values to be entered
    See also:
Type 0: Definition of Entries
  • Variables in calculations to refer to the values to be calculated
    See also:
  • Type 0: Definition of Calculations
  • Variables that refer to characteristics whose values are assigned automatically;
    See also:
  • Type 0: Definition of Automatic Value Assignment
  • Variables in dynamic function calls to refer to the import parameters that are transferred to the PI sheet;
    See also:
  • Type 0: Definition of Import Parameters

    Features

    You can define a variable for every message characteristic of a process instruction. The data type of the variable is identical to that of the message characteristic (for example, CHAR or NUM).

    The following types of variables are distinguished:

    • Simple variables
    • (PPPI_VARIABLE)
      • Can be defined in PI sheets and process manufacturing cockpits
      • Are only valid for the PI sheet or cockpit in which they have been defined
    • Global variables
    • (PPPI_GLOBAL_VARIABLE)
      • May only be defined in PI sheets and there may only be used in simple data requests

    Activity

    In PI Sheets

    To define a variable, you assign one of the following characteristics immediately before the message characteristic in the process instruction:

    Characteristic

    Meaning

    Value

    PPPI_VARIABLE

    Variable that is valid within the PI sheet

    New variable name

    PPPI_GLOBAL_VARIABLE

    Global variable that is valid for the entire process order

    New variable name

    In Process Manufacturing Cockpits

    To define a variable, you assign one the following characteristic immediately before the message characteristic in the process instruction:

    Characteristic

    Meaning

    Value

    PPPI_VARIABLE

    Variable that is valid within the PI sheet or cockpit

    New variable name

    In general, you can choose any name for a variable. To avoid conflicts with other functions, do not use:

    • Variable name X
    • Variable names that start with SY_ since these are system variables predefined by SAP
    • Blanks and arithmetic operators as part of the variable name
    • The following character strings at the end of the variable name:
      • _<number>, for example, _1, _2
      • _
      • COUNT
      • _
      • SUM

    For more information, see

    Using Variables in Browser-Based PI Sheets.