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

STATUS GUI

former_member204025
Participant
0 Likes
662

Hi all!

I would like to know, how to setup the icons EXIT and BACK from the Standard tollbar.

I created a new Status GUI, with that, the standard tollbar is disabled, my code works, but when I clic on BACK or EXIT nothing happens, I wrote this:

at user-command.

CASE sy-ucomm.

when '&BACK'.

when '&EXIT'.

endcase.

But I don't know what I should write there, I wrote EXIT, but is not working. It's a simple program, no dynpros, it's a simple report.

Also, is there any way writing a code, and after pressing a button to show the :

1. Name of the button. and

2. The function asociated to this button ?

I'll appreciate any help.

Thanks,

Gaby

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
533

Try this:


CASE sy-ucomm.
when '&BACK'.
  LEAVE TO SCREEN 0. "takes you back to the selection screen
when '&EXIT'.
  LEAVE PROGRAM. "takes you back to SAP menu
endcase.

3 REPLIES 3
Read only

Former Member
0 Likes
534

Try this:


CASE sy-ucomm.
when '&BACK'.
  LEAVE TO SCREEN 0. "takes you back to the selection screen
when '&EXIT'.
  LEAVE PROGRAM. "takes you back to SAP menu
endcase.

Read only

0 Likes
533

Hi guys!

Thanks for your help! It worked when I wrote LEAVE TO SCREEN 0.

What happen if I want to back to the previous page?

Thanks.

Gaby

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
533

Did you set the function type to exit-command for that buttons ?

check this link

link:[http://www.sapdev.co.uk/dialog/exit_command.htm]

Edited by: Keshu Thekkillam on Oct 6, 2009 7:32 PM