Show TOC

 Using System Variables in Browser-Based PI Sheets Locate this document in the navigation structure

Use

System variables have been predefined by SAP. You can use these variables in formulas or, for example, to pass on certain pieces of information to a function module. How the function called by the function module behaves depends on the type of information passed on.

At present, you can use the following system variables:

System Variable

Use

Meaning

SY_MODE

In function modules

Current mode of the PI sheet

SY_TEST

In function modules

Status of the PI sheet (test or active)

SY_ROW

In function modules

Current table line

SY_VALUE

or X

Generally

Refers to the immediately preceding input value

Features

Variable SY_MODE

You use variable SY_MODE to tell the function module in which mode you currently are the PI sheet. Depending on this information, the function called by the function module is either started in the display or change mode.

You can pass on the following values for SY_MODE:

Variable Value

Meaning

'EDIT'

For change mode

'SHOW'

For display mode

'SIMULATION'

For simulation mode

Variable SY_TEST

You use variable SY_TEST to tell the function module whether you currently are in an active PI sheet or a test PI sheet. Depending on this information, the function called by the function module is either started in the display or change mode.

You can pass on the following values for SY_TEST:

Variable Value

Meaning

' ' (blank)

For active PI sheet

'X'

For test PI sheet

Variable SY_ROW

If you have defined dynamic function calls in a repeated data request (table), you can use variable SY_ROW to tell the function module in which table line you currently are.

Variable SY_VALUE or X

Variable SY_VALUE or X always refer to the value entered immediately before.

Example

If you want to be able to jump to inspection results recording for the inspection point in quality management in the PI sheet, you must use function module COPFX_QM_INSPECTION_RESULT_REC to define a function call.

For the function module to be able to know in which mode the called transaction is to be started, you must use system variables SY_MODE and SY_TEST to pass on the information about the current status of the PI sheet to the function module. In this function module, you use parameters MODE and TEST_FLAG to pass on the variables.

To specify this information in the process instruction, you assign the following characteristics:

Characteristic

Value

 

PPPI_FUNCTION_NAME

COPFX_QM_INSPECTION_RESULT_REC

 

PPPI_EXPORT_PARAMETER

MODE

PPPI_STRING_VARIABLE

SY_MODE

PPPI_EXPORT_PARAMETER

TEST_FLAG

PPPI_STRING_VARIABLE

SY_TEST

 

Depending on the mode in which you currently are in the PI sheet, the corresponding mode is called in inspection results recording:

Variable Value

Transaction Called

SY_TEST

SY_MODE

 

' ' (blank) = active

SHOW = display

Display Results for Inspection Point: Initial Screen

' ' (blank) = active

EDIT = change

Change Results for Inspection Point: Initial Screen

' ' (blank) = active

SIMULATION = simulation

Display Results for Inspection Point: Initial Screen

'X' = test

SHOW = display

Display Results for Inspection Point: Initial Screen

'X' = test

EDIT = change

Display Results for Inspection Point: Initial Screen

'X' = test

SIMULATION = simulation

Display Results for Inspection Point: Initial Screen