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

How to configure Cancel Button on selection throught function key.

Former Member
0 Likes
625

Hello All,

I need to configure a cancel button beside the execute button on my selcetion screen.

i used the statement :

selection-screen function key 1.

i got a button beside the execute button.but how do i assign the functionality of the cancel to button to this button

Regrads,

varun

Hello All,

I need to configure a cancel button beside the execute button on my selcetion screen.

i used the statement :

selection-screen function key 1.

i got a button beside the execute button.but how do i assign the functionality of the cancel to button to this button

Regrads,

varun

3 REPLIES 3
Read only

Former Member
0 Likes
573

Hi Varun,

Just do as below :-

CASE SY-UCOMM
WHEN 'CANCEL'
LEAVE TO SCREEN 0

Or erlse you have to do as below using AT EXIT COMMAND.

1) Define SET PF-status statement in your program.

2) While designing a button select CANCEL button from the STANDARD TOOL BAR. On double clicking on it, you have to assign the *FUNCTIONAL TYPE as E *

So whenever you execute your program & select that button it will work as you expected.

Kindly set to resolved if it helps you.

Regards

Abhii

Read only

Former Member
0 Likes
573

Hi,

Try this



if sy-ucomm eq 'FC01'.  "Code for the button assigned using Function Key 1
  leave to screen 0.
endif.

Read only

former_member217544
Active Contributor
0 Likes
573