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

Screen painter

Former Member
0 Likes
777

Hi,

I need to quit a screen with a red button OK_CODE = EXIT, but SAP give me a message : we have to fill obligatory fields.

my purpose is to leave the screen without fill in the obligatory fields.

Best regard

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
640

Hi saad,

If you do have obligatory fields on your screen and you have not defined your exit procedure in moduel with addition at exit-command, you'll have to enter values into the obligatory fields before exiting. The only way around is to define the module where you have the code for exiting the screen with addition at exit command. In the PAI section define as follows,

Process After Input.

Module <modulename> at exit-command.

and inside the module write

if ok_code = 'EXIT'.

leave program

endif.

Here if you click on the button whose fcode is EXIT, it will bypass and validations as it is defined under at exit-command.

Hope this helps in resolving your issue.

Regards,

Sachin

4 REPLIES 4
Read only

Former Member
0 Likes
640

You need to change the Function Type of the EXIT button to 'E'

The screen where you maintain the GUI status, go there and double click on FCODE for EXIT, it will open "Function attribute" window.Set Function Type = "E"

In the screen flow logic, add a new Module called"EXIT"

MODULE EXIT AT EXIT-COMMAND.

Inside that module write

LEAVE PROGRAM.

Edited by: Swastik Bharati on Nov 4, 2008 11:31 AM

Edited by: Swastik Bharati on Nov 4, 2008 11:33 AM

Read only

VikasB
Active Participant
0 Likes
640

Create module using AT EXIT-COMMAND in PAI. Write your code for EXIT into this module.

Search more on AT EXIT-COMMAND to get the examples on it.

Regards,

Vikas

Read only

Former Member
0 Likes
640

Hello,

As said by Swastik in his reply in this thread earlier you need to specify the Function code as 'E' and then in PBI event you can write the code at 'at exit-commant'.

- Jayant Sahu.

Read only

Former Member
0 Likes
641

Hi saad,

If you do have obligatory fields on your screen and you have not defined your exit procedure in moduel with addition at exit-command, you'll have to enter values into the obligatory fields before exiting. The only way around is to define the module where you have the code for exiting the screen with addition at exit command. In the PAI section define as follows,

Process After Input.

Module <modulename> at exit-command.

and inside the module write

if ok_code = 'EXIT'.

leave program

endif.

Here if you click on the button whose fcode is EXIT, it will bypass and validations as it is defined under at exit-command.

Hope this helps in resolving your issue.

Regards,

Sachin