Usage Of AT EXIT COMMAND in module pool.
Purpose:
At exit Command is mainly used to quit the program.
Scenario:
Let me explain with the scenario ” I have five input fields in my screen ,all the five fields are mandatory i have to go back to the program (LEAVE PROGRAM).
Normally if there is any one mandatory fields in screen if am triggering any event that time the system automatically throws an error like “Please fill in the mandatory fields”. that case the AT EXIT COMMAND will be used.
Step 1 : create module pool program name say ZXXX.
Create a screen number 2001 like below.
Give the function code as ‘Exit’ and function type as ‘E’.
Activate the screen and create the module under PAI using an addition AT EXIT-COMMAND like below.
Write the logic in program as below.
If you wanted to do the same thing with the standard function code like EXIT or CANCEL in the standard toolbar in the screen means we can do it like below pic..
Double click on the particular function code eg: EXIT and specify the function type E as above.
OUTPUT:
If any one of the action CANCEL EXIT in toolbar or CANCEL button in Screen triggers it will go back to the program.
No comments:
Post a Comment