cancel
Showing results for 
Search instead for 
Did you mean: 

validating field value after the cursor is moved out in webdynpro

Former Member
0 Kudos

Hi,

I've many fields in a row for the user to fill out. My requirement is after the user fills the value in the first field and moves the cursor to other field , the value entered in the first field should be validated and throw error message if any. How can I trigger this action ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Bala,

The way you posted the query it is not clear whether you are transfering the control to the other field using a TAB button or directly using the mouse pointer on the next field. If you go for the former, then for every action performed on the browser, the WDDOMODIFYVIEW gets the control, if you don't find it, then check under WDDOAFTERACTION.

Otherwise it is difficult to capture the value without any action on the browser. Let us know the appropriate way you are transfering the control to the other field. If possible try debugging the WDDOMODIFYIVIEW once you use tab.

Regards,

-Syed.

Former Member
0 Kudos

directly using the mouse pointer on the next field. Please give me sample code if possible.

Former Member
0 Kudos

Hi Bala,

If this is your own judgement to use the mouse pointer and get validated with that action, then it is not possible. Try to understand the basics of Web Browser and GUI of SAP. Under Module Pool programming, you can get the values of the input fields of the screen using the modification group or by other means, as they are under SAP GUI. But this is a browser. A browser needs to have performed some sort of action before the control goes to SAP.

If a mouse pointer is used directly to input the values, then there will not be any kind of action performed over the input fields and no control will be returned to SAP. Hence it is recommended to use any of the action to get the desired values or to get the control in SAP.

Please think broadly instead of restricting the requirement. If the client could not understand then make him aware of the possible factors provided by SAP.

Also, if your Enhancement Package is 7.2 then, you need to provide the necessary property of the input field. Then you need not have an explicit catch mechanism to validate the input field value.

Please revert back.

Regards,

-Syed.

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

I don't think it is possible. You will have to make user hit enter (use onenter enent of input field) or u have to use some other UI like button or link to action in order to perform the validation.

Also refer this thread:

Regards