SAP dialog screen / dynpro Exit Command

The dynpro exit command enables a user to implement dialog screen functionality which gets processed even if the user has entered data into a field which is invalid. An example use for this would be if you had a dialog screen containing fields which are mandatory but you still want to allow the user to exit the application without having to fill these otherwise mandatory fields in. You would therefore create a function code of type exit-command within the PF-STATUS and when this function is selected by the user the ABAP code within the PAI module of the screen is executed regardless of any validity checks associated with the dialog screen.



Once the 'exit command' function code has been created you will then need to add it to the relevant PAI module call within the flow logic of the SAP dynpro.

...
*dynpro PAI flow logic
PROCESS AFTER INPUT.
*EXIT-COMMAND means module will be called first bypassing any feild validation
   MODULE USER_COMMAND_0100 AT EXIT-COMMAND.

Related Articles

ABAP Dialog Programming Techniques - BC410
Insert image onto SAP screen
Insert image onto SAP screen
Creating your first ABAP dialog screen program in SAP
SAP ABAP dynpro programs, dialog screen programs with input fields, buttons, OO ALV grids etc..
SAP ABAP dynpro programs, dialog screen programs with input fields, buttons, OO ALV grids etc..
Dialog programming, dynpro screen field validation
SAP Graphics Development - Example code and information on various areas of graphics development
Grouping SAP dynpro screen radiobuttons
Add a dropdown list to a SAP dynpro screen using the Listbox option
Implementing a subscreen to an ABAP dynpro screen with SAP
F4 help functionality for a dynpro screen field using the PROCESS ON VALUE-REQUEST statement