Application Development 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: 

Back / Exit / Cancel Buttons Not working

Former Member
0 Kudos
2,205

Hi,

I'm having the toughest time just getting the Back / Exit / Cancel buttons to work properly.  I guess I still do not understand the screen programming that well. 

I have a program with a default screen 1000 that gets called upon execution.  This screen has several checkboxes and an execution button, and calls another screen 0100. 

The problem I have is that the back, exit, and cancel buttons do not respond when 0100 gets called. 

The PBO module for 0100 is getting called, but the PAI module does NOT get called if you hit the back, exit, or cancel button when 0100 is displayed.  I am guessing the PBO module is called before the PAI module.

At the end of the PBO module, I have the following code:

SET PF-STATUS 'STATUS_0100'.

But this does not seem to activate the back, exit, or cancel buttons. 

I have this code in the PAI module, but again, the PAI module for screen 0100 is not getting called when Back, Exit, or Cancel is hit on 0100:

Case sy-ucomm.

  when ' BACK' or 'CANC' or 'EXIT'.

   leave to screen 0.

   endcase.

So when you call another screen, what are the step by step procedures for making sure the back, exit, and cancel buttons can be programmed and will respond to events?  I have not been able to figure this out. 

Thanks,

Kevin

1 ACCEPTED SOLUTION

Former Member
354

Answered my own question. 

Not only do you add SET PF-STATUS 'STATUS_0100', you have to create the GUI Status object STATUS_0100 by double clicking it.  In there, you simply add BACK, EXIT, and CANCEL to the buttons, and then the rest of the code will work.  Very simple. 

1 REPLY 1

Former Member
355

Answered my own question. 

Not only do you add SET PF-STATUS 'STATUS_0100', you have to create the GUI Status object STATUS_0100 by double clicking it.  In there, you simply add BACK, EXIT, and CANCEL to the buttons, and then the rest of the code will work.  Very simple.