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: 

if user enter wrong entry in Manditory field give a Message without save

Former Member
0 Kudos
145

Dear Experts,

Stadard Tcode : ES30.

Here, Rate Category field is a monditory field. If the user enter a wrong entry in that field, give a message ie. " Enter value is not exist " and return cursor to the same field or screen without saving.

In my case, giving message and but saving.

I have used a user exit for this requirement.

It should not save and the cursor should return back to that field or screen.

Could you please help me out

Reward points for helpful answer!!

Sekhar

1 ACCEPTED SOLUTION

Former Member
0 Kudos
118

Hi,

After you display the error, use a RETURN statement so that the below codelines are not execute.

Shruthi

7 REPLIES 7

Former Member
0 Kudos
118

After giving the message,

leave to screen <screen number>

Former Member
0 Kudos
119

Hi,

After you display the error, use a RETURN statement so that the below codelines are not execute.

Shruthi

0 Kudos
118

HI,

Where can I use RETURN?

it shouldn't work.

thanks

0 Kudos
118

Hi,

After you display the message , make sure you save code is not executed, it exits the PAI and PBO of your screen is executed.

Shruthi

0 Kudos
118

Hi,

Thank you for your reply.

I want to execute my code(message) and rest of all standard code is executed(automatically & we cant control), but should not save, if i entered wrong value in the Rate category field(manditory) when I pressed SAVE button.

help me out

sekhar

0 Kudos
118

Hi,

What you need to do is, at the place where you call you message, set a flag if the error message is executed and based on this flag, control the execution of the standard program.

This is just an idea since i do not know the flow of the program.

Shruthi

0 Kudos
118

Hi,

Thanks

I have come to know that, we can't control the execution of standard program with Function Module Exit and customer code. If screen exit available, it might be possible.

So, thank you for your kind reply.

sekhar