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

CANCEL button processing

Former Member
0 Likes
696

hi all,

what is the code for cancel button meance without process of current screen leave to another transaction.

thanx in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
642

hi,

you have write the code In the User-command form .

Case sy-ucomm.

When 'CANC'.

call the transaction what you want.

endcase.

regards,

Aj

5 REPLIES 5
Read only

Former Member
0 Likes
643

hi,

you have write the code In the User-command form .

Case sy-ucomm.

When 'CANC'.

call the transaction what you want.

endcase.

regards,

Aj

Read only

0 Likes
642

HI Ajay,

i did the same but there is requird field and whenever i press for cancel is give red meassage Fill in all required entry fields

Read only

0 Likes
642

can any one solve my problem????????

Read only

0 Likes
642

Hi ,

in the gui status set the Functional Type to E, write a module in PAI with

MODULE EXIT AT EXIT-COMMAND.

and in exit module write

if okcode eq 'CANC'.

call transaction

endif.

this will work chk it

Read only

Former Member
0 Likes
642

Define functional type = E for this 'CANCEL' button in gui status.

In the PAI of the screen add MODULE EXIT_SCREEN at EXIT_COMMAND.

Inside this module you should enter the following code:

case sy-ucomm.

when ''CANC'.

  • If you want you can add a warning here

set screen 0. " This will take you back to the calling screen

leave screen.

when others.

endcase.

if you overwrote old values (from previous screen) in the current screen (that you are exiting) then make sure these changes are reverted. I am guessing this happends automatically, its been a while since I worked on screen ...

Raj