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

Error while BACK or EXIT

Former Member
0 Likes
675

I have made Dialog Program there is one Table control in it

i have put some validation in Loop at chain in PAI if user enters wrong value system displays error message. this is working fine

my requirement is that if user enters wrong value then the system shud also allow to go back or EXIT the application.

how to avoid the validation if user press BACK or EXIT button.

6 REPLIES 6
Read only

former_member386202
Active Contributor
0 Likes
630

Hi,

After message statement use leave scrren or call screen "screen number".

Regards,

Prashant

Read only

Former Member
0 Likes
630

if u want to exit before any validation

in the PAI,add the module exit at exit-commandat the first line in Process after input and write the logic for exit

In this screen,U are using a back button i.e., GUI status for BACK,and this is of EXIT type(E).

and U have made a field on the screen as mandatory (using attributes in screen painter).

Now,when u try to go out of this screen using the back button.U will get an error message(Fill in all required fields)

Now,our module ON EXIT COMMAND comes into play.

If this module is prsent in our code.It overtakes control from the mandatory filed and allows U to move out of screen using the BACK button(coz it is of EXIT type)

Reema

Read only

Former Member
0 Likes
630

Assign the Function type of the push buttons as 'E' then the system bypasses the validations and calls a special module in the screen flow logic, check the link and analyse the example program provided.

http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm

Read only

Former Member
0 Likes
630

Hi,

in your pf-stus dont forget to activate back button

here i mentioned for exit and cancel as well.

In your PAI.

module USER_COMMAND_1000 input.

CASE OK_CODE.

WHEN 'BACK' OR '%EX' OR 'RW'.

LEAVE TO SCREEN 0.

ENDCASE.

endmodule. " USER_COMMAND_1000 INPUT

Reward if helpful.

Regards,

Harini.S

Read only

Former Member
0 Likes
630

Hi,

After user enters the value and the presses some button the system go to PAI module. In PAI module check whether user has pressed any button on screen.

Pleace your button press logic before the validation.

If BACK or EXIT button is pressed you cal use CALL SCREEN XXXX.

You can call same or any other screen.

Deserve Reward.

Gaurav

Read only

0 Likes
630

Hi,

I solved the same problem here:

Pls award points if deserving.

Regards,

Kevin