SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → User Dialogs → Screens → Statements in the Screen Flow Logic → FIELD → Handling of messages at event PAI → Input Checks - Examples →Screens, Automatic Input Checks
The example illustrates what an automatic input check does.
Source Code
PROGRAM demo_dynpro_automatic_checks .
DATA: ok_code TYPE sy-ucomm,
date TYPE d.
TABLES demo_conn.
CALL SCREEN 100.
MODULE init_screen_100 OUTPUT.
SET PF-STATUS 'STATUS_100'.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE pai INPUT.
MESSAGE i888(sabapdemos) WITH text-001.
ENDMODULE.
Description
The static next screen number of screen 100 is 100. The date field (taken from the program) date is assigned to the input field Date. The remaining input field are the components CARRID, CONNID and MARK of the structure DEMO_CONN (taken from the ABAP Dictionary). All input fields are obligatory. The function code of the pushbutton is EXECUTE.
In the GUI status STATUS_100, the symbol Cancel (F12) is activated by the function code CANCEL with the function type E. In addition, the function code EXECUTE is assigned to the function key F8. The screen flow logic is:
The user must first correctly fill all input fields, before the module PAI can be called:
The user can exit the screen via Cancel (F12) without correctly entering all values, as the module call was programmed accordingly with AT EXIT-COMMAND.