ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Screens → Statements in the Screen Flow Logic → FIELD → Data transport at point of time PAI
Screens, FIELD Statement
The example shows how to transport data using the statement FIELD
.
Other versions: 7.31 | 7.40 | 7.54
Source Code
PROGRAM demo_dynpro_field.
DATA: ok_code TYPE sy-ucomm,
save_ok LIKE ok_code,
box1(1) TYPE c, box2(1) TYPE c, box3(1) TYPE c, box4(1) TYPE c,
mod1_result1(1) TYPE c, mod1_result2(1) TYPE c,
mod1_result3(1) TYPE c, mod1_result4(1) TYPE c,
mod2_result1(1) TYPE c, mod2_result2(1) TYPE c,
mod2_result3(1) TYPE c, mod2_result4(1) TYPE c,
mod3_result1(1) TYPE c, mod3_result2(1) TYPE c,
mod3_result3(1) TYPE c, mod3_result4(1) TYPE c.
CALL SCREEN 100.
MODULE init_screen_100 OUTPUT.
SET PF-STATUS 'STATUS_100'.
CLEAR: box1, box2, box3, box4.
ENDMODULE.
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'CANCEL'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.
MODULE module_1 INPUT.
mod1_result1 = box1.
mod1_result2 = box2.
mod1_result3 = box3.
mod1_result4 = box4.
ENDMODULE.
MODULE module_2 INPUT.
mod2_result1 = box1.
mod2_result2 = box2.
mod2_result3 = box3.
mod2_result4 = box4.
ENDMODULE.
MODULE module_3 INPUT.
mod3_result1 = box1.
mod3_result2 = box2.
mod3_result3 = box3.
mod3_result4 = box4.
ENDMODULE.
Description
The static next screen number of screen 100 is 100. The checkboxes which are ready for input have been
assigned the screen fields box1
, box2
, box3
, and box4
. The screen flow logic is as follows:
MODULE init_screen_100.
PROCESS AFTER INPUT.
MODULE user_command_0100.
MODULE module_1.
FIELD box2.
MODULE module_2.
FIELD: box1, box3.
MODULE module_3.
In GUI status STATUS_100 the Cancel icon (F12) has been activated using function code CANCEL. If the user selects the checkboxes ready for input and triggers the PAI event by pressing Enter, the output fields indicate which screen field is available in which dialog module.
- Screen field
box4
is transported in the event PAI since it is not contained in anyFIELD
statement.
- Screen field
box2
is only transported before the dialog module module_2 is called and is therefore not available inuser_command_0100
andmodule_1
.
- Screen fields
box1
andbox3
are only transported before the dialog modulemodule_3
is called and are only available in this module.