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

ABAP: How to validate user and handle errors in forms

Former Member
0 Likes
584

Hello!

1)We have created an Update form. User are able to select the employee-id from this form, however, how do we retrieve the current information of the selected employee in the same form?

2)In the create user form, we have a message informing user that an object is successfully created, however if user missed out on certain fields, how do we display another error message?

thank you:)

Edited by: Julius Bussche on Dec 29, 2008 11:06 AM

Hello!

1)We have created an Update form. User are able to select the employee-id from this form, however, how do we retrieve the current information of the selected employee in the same form?

2)In the create user form, we have a message informing user that an object is successfully created, however if user missed out on certain fields, how do we display another error message?

thank you:)

Edited by: Julius Bussche on Dec 29, 2008 11:06 AM

3 REPLIES 3
Read only

Former Member
0 Likes
541

Hi Donna,

You can give the validations in PAI event.Use the field and chain statements.

Refer this example program DEMO_DYNPRO_FIELD_CHAIN and this link

http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dba9e735c111d1829f0000e829fbfe/frameset.htm.

Regards,

Charumathi.B

Read only

Former Member
0 Likes
541

Hi,

Welcome to SDN.

First of All dont use CAPS in your subject line.

It means that you are shouting and also use a informative subject line.

For your Answer.

1> When you select the Employee Id Place a button there to find.

in The PAI write code to fetch the employee data and display it in the Screen.

2> Check that the screen field is blank or not.

if it is blank throw a message to the User.

Regards

Sandipan

Read only

Former Member
0 Likes
541

Please use meaningfull subject titles.

For 1) it is perhaps advisable to get the name of the logged on user ID from system field sy-uname within the form routine, and use the PERNR which corresponds to this from InfoType 0105 in your form. That way users can only see their own data and not enter the PERNR's of others.

But your requirement might be different from the above.

Cheers,

Julius