Dynpros, Holding Data
This example demonstrates how to hold input data across transactions.
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.
The static next dynpro of dynpro 100 is 0. It contains a single input/output field
field. The dynpro flow logic is:
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
In the PBO event of the dynpro, the Hold Data attribute is activated regardless of the static default.
If, after entering a value, the user chooses System → User Profile →
Hold Data or Set Data, the value is displayed again when the dynpro is called a second time and whenever the program is subsequently called (in the same
ABAP session) unless the
user chooses Delete Data. This overwrites any value assigned to the field
field in the ABAP program.