Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  User Dialogs →  Screens →  ABAP Statements for Screens →  SET HOLD DATA 

Screens, Holding Data

The example shows how to hold input data across transactions.

Other versions: 7.31 | 7.40 | 7.54

Source Code

REPORT demo_dynpro_set_hold_data.

DATA field(10) TYPE c.

CALL SCREEN 100.

field = 'XXXXXXXXXX'.

CALL SCREEN 100.

MODULE hold_data OUTPUT.
  SET HOLD DATA ON.
ENDMODULE.

Description

The static next screen of screen 100 is 0. It contains a single input/output field field. The screen flow logic is as follows:

PROCESS BEFORE OUTPUT.
  MODULE hold_data.
PROCESS AFTER INPUT.

In the PBO event of the screen, the Hold Data attribute is activated regardless of the static default set. If after entering a value the user chooses System → User Profile → Hold Data or Set Data, the value is displayed again when the screen is called a second time and whenever the program is subsequently called (in the same main session) unless the user chooses Delete Data. The assignment of a value to the field field in the ABAP program is overwritten in this case.