‎2005 Dec 20 3:06 PM
Hello All,
In Module Pool programming, I have a modal dialog box. When I press the escape button, the modal dialog box should get closed. How do you assign the Function code for the Escape Button.
Priya
‎2005 Dec 20 3:10 PM
Hi Priya,
You need to code for CANCEL button (Function Key 12)
Escape triggers CANCEL button.
So whatever function code you give for F12 for example CANC in GUI Status function keys will be triggered.
And then it goes straight into EXIT_PROCESSING (or whatever you exit command pai module is) AT EXIT-COMMAND module in PAI.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
‎2005 Dec 20 3:10 PM
If u double click that button, right side u will get a box with all properties.
There u can see FCODE. Give something like ESC.
In code
case sy-ucomm.
when 'ESC'.
{---
}
Thanks
Eswar
‎2005 Dec 20 3:25 PM
‎2005 Dec 20 5:27 PM
HI,
While assigning Function Code for a button you need to specify the Function Type also. Assign the Function Type as 'E'. Now in PAI
Module <m1> on EXIT-COMMAND.
You can write the code to exit the Dailog box in the module.