08-22-2008 10:30 AM
Hi everyone,
In screen painter there is the code:
WHEN 'EXIT'.
LEAVE PROGRAM.
But it doesn't exit the current screen. What's the problem? (leave screen doesn't work either.)
Thanks!
08-22-2008 10:36 AM
Hi,
In your PAI add a module as follows
MODULE EXIT_XXXX AT EXIT-COMMAND.
MODULE EXIT_XXXX.
if ok_code = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.
EXIT button on the toolbar has FUNCTION TYPE 'E' only function type's can enter a module with addition AT EXIT-COMMAND.
Regards,
Raj.
08-22-2008 10:32 AM
hi,
use this.
WHEN 'EXIT'.
leave to screen 0.
but if u have any manditory fields in screen then u have to use at-exit command module.
08-22-2008 10:33 AM
08-22-2008 10:33 AM
08-22-2008 10:33 AM
Hi,
Make sure whether the function code and ok code is assigned or not. If yes then it should work properly.
Regards,
Sathish Reddy.
08-22-2008 10:36 AM
Hi,
In your PAI add a module as follows
MODULE EXIT_XXXX AT EXIT-COMMAND.
MODULE EXIT_XXXX.
if ok_code = 'EXIT'.
LEAVE PROGRAM.
ENDIF.
ENDMODULE.
EXIT button on the toolbar has FUNCTION TYPE 'E' only function type's can enter a module with addition AT EXIT-COMMAND.
Regards,
Raj.
08-22-2008 10:41 AM
First check in Debug mode what is the ok_code value, is it EXIT or is it different from EXIT check it.,
WHEN 'EXIT'.
LEAVE PROGRAM.
I feel you mentioned the different Ok code.
08-22-2008 10:53 AM
Thanks all of you. In fact I defined a field as required so when I exit there is a error message 'must input the required field'. So how to solve that?
Otherwise don't know much about AT EXIT-COMMAND module and I tried it but it doesn't work...
Thanks!
08-22-2008 10:55 AM
08-22-2008 11:01 AM
Hi,
use this.
Process After Input.
Module exit AT EXIT-COMMAND.
in program.
Case Okcode.
When 'Exit'.
leave to screen 0.
Automatic field checks can be avoided by AT EXIT-COMMAND, Which works exactly the same way as cancel works on application tols bar.
EXIT button on the toolbar has FUNCTION TYPE 'E' only function type's can enter a module with addition AT EXIT-COMMAND
08-22-2008 12:51 PM
Thanks Gautham. I use your code in the programme but it says '. expected after exit' when active. Seems I can't add the module exit AT-EXIT COMMAND. What's wrong?
Thanks.
08-22-2008 11:16 AM
hi,
i think you have written wrong FCT code.
your FCT code should be 'EXIT' in caps.
check it.
hope it may help you.
thanks,
Sachin