Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function Code for the Escape button

Former Member
0 Likes
3,923

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

4 REPLIES 4
Read only

Former Member
1,556

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

Read only

Former Member
0 Likes
1,556

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

Read only

Former Member
0 Likes
1,556

Its FctCode not FCODE

Read only

Former Member
0 Likes
1,556

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.