SAP DYNPRO CHECK FLOW ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_DYNPRO - Obsolete Input Check Using SELECT
The example illustrates how input checks work in PAI processing.

ABAP_SOURCE_CODE
ABAP_EXEC

ABAP_DESCRIPTION
The static next dynpro number of dynpro 100 is 100. The fields carrier and connect, which were taken from the program, are assigned to the input fields. 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. Additionally, the function key F8 has the function code EXECUTE assigned to it. The dynpro flow logic is as follows: PROCESS BEFORE OUTPUT.
MODULE init_screen_0100.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
FIELD carrier VALUES (NOT 'AA', 'LH', BETWEEN 'QF' AND 'UA').
MODULE module_1.
FIELD connect SELECT *
FROM spfli
WHERE carrid = carrier AND connid = connect
WHENEVER NOT FOUND SEND ERRORMESSAGE 107
WITH carrier connect.
MODULE module_2.
The user must enter a value for carrier that is in the list following VALUES before module_1 is called. When module_1 is called, connect has not yet been transported. The user can then only enter a value for connect , which exists together with carrier as the primary key in the database table SPFLI. If the user enters a different value, an error message appears in the status bar. Only when a correct value has been entered is connect transported and module_2 called.