cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard tracking in WD ABAP.

pranav_nagpal2
Contributor
0 Kudos

Hi Experts,

I have a requirement that in an input field a need to block the number of character that can be entered by user to 40 and after 40 char if user tried entering any other char i have to display a message in pop up. Blocking of the size of input field to 40 char is done using data element and binding it with context attribute of input field, but for showing a pop up i m not able to find any solution.

I know that WD ABAP no longer supports JAVASCRIPT so i havent tried it yet. Also just to provide some usefull information the application will be used as an iview in EP portal. So is it possible to create any java script there?? if yes how to use it as i dont have any button or something like this to fire the java script.??

Thanks in advance.

Regards

Pranav

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pranav,

Instread giving error message every time when user exceeds more than 40 characters. I will suggest this simple solution for you.Any how you want to restrict the user to enter up to 40 characters only then give the context attribute type is char40.thats all user can enter up to 40 characters only.

Or else you have other solution i.e read the entered data from text edit element onAction of button in your view then check the length.If it is more than 40 characters then raise the error message.

Dynamic validation is not possible in Web Dynrpo for ABAP.

pranav_nagpal2
Contributor
0 Kudos

Hi Suman,

Thanks for replying. Yes as i had written it in my post that i am able to block the input field length. My client want me to show a pop up after entering 40 chars. i was thinking if it might be possible in EP as we can have java script there. any suggestions in this regard.

regards

Pranav

Former Member
0 Kudos

Hi Pranav,

I am not aware of EP but there is no action is associated with the TextEdit UI element.So if you want to validate then you have to write the logic after any action only.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>i was thinking if it might be possible in EP as we can have java script there. any suggestions in this regard.

This is not possible. No custom JavaScript against Web Dynpro regardless of Portal or not.