Entering content frameFunction documentation Definition of Variables Locate the document in its SAP Library structure

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:

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:

Can only be used in the same PI sheet or cockpit in which they were defined
You use characteristic PPPI_VARIABLE.

You use characteristic PPPI_GLOBAL_VARIABLE.

For more information on Manufacturing Data Access, see:

Activity

Simple Variables

You define a simple variable by assigning the following characteristic to the process instruction immediately before the message characteristic whose value you want to transfer to the variable:

Characteristic

Meaning

Value

PPPI_VARIABLE

Simple variable that can only be used within one PI sheet or cockpit

New variable name

Example Example for simple variables

The simple variable VAR is defined for the input value "Material quantity". The value of variable VAR is to be displayed somewhere else in the PI sheet.

Process instruction 0010:

 

PPPI_INPUT_REQUEST

Material quantity

 

PPPI_VARIABLE

VAR

 

PPPI_REQUESTED_VALUE

PPPI_MATERIAL_QUANTITY

Process instruction 0020:

 

PPPI_OUTPUT_TEXT

Material quantity

 

PPPI_OUTPUT_VARIABLE

VAR

Global Variables

You define a global variable by assigning the following characteristic to the process instruction immediately before the message characteristic whose value you want to transfer to the variable:

Characteristic

Meaning

Value

PPPI_GLOBAL_VARIABLE

Global variable that can be exchanged between different PI sheets and cockpits

New variable name

Example Example for global variables

A totals calculation is to be executed in cockpit PMC1. The global variable VARSUM was defined for the value calculated.

The value of variable VARSUM is to be read in cockpit PMC2 as a data point using Manufacturing Data Access and transferred to the simple variable VARLC. The value calculated is to be displayed in cockpit PMC2.

Cockpit PMC1:

 

PPPI_INPUT_REQUEST

Calculate value

 

PPPI_GLOBAL_VARIABLE

VARSUM

 

PPPI_CALCULATED_VALUE

PPPI_MATERIAL_CONSUMED

 

PPPI_CALCULATION_FORMULA

VAR1 + VAR2

Cockpit PMC2:

 

PPPI_DATA_ACCESS

Manufacturing Data Access

 

PPPI_BUTTON_TEXT

Read value from PCM1

 

PPPI_FUNCTION_DURING_DISPLAY

Permitted

 

PPPI_IMPORT_DATA

PMC:0001.PMC1.VARSUM

 

PPPI_STRING_VARIABLE

VARLC

 

PPPI_OUTPUT_TEXT

Value calculated

 

PPPI_VARIABLE

VARLC

Note the following:

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

For more information, see Using Variables in Browser-Based PI Sheets.

Leaving content frame