cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Placing cursor in Web dynpro view

Former Member
0 Kudos

Hi All,

I am very new to Web dynpro ABAP.

I have a view which contains two input fields(i.e userid and password).

I want to place the cursor at userid inputfield and by pressing tab it should go to next password field.

To achieve this requirement I have written below code in modifyview( ) method.


  data: lv_v_elem type ref to if_wd_view_element.
          lv_v_elem = view->get_element( 'INPUSERID' ).

          if lv_v_elem is bound. 
            view->request_focus_on_view_elem( lv_v_elem ).
          endif.

By this code I am able to get cursor at userid input field but by pressing Tab here then the cursor it goes to address bar of the browser ...this is my problem.

Can anyone please provide me solution for this.

Thanks in Advance!

Regards,

Sreelakshmi.

Accepted Solutions (0)

Answers (5)

Answers (5)

nishantbansal91
Active Contributor
0 Kudos

HI ABAP Learner,

@@ Syed Sarmath Hussain.

Please Refer the below link.

http://scn.sap.com/message/6572922#6572922

Regards.

Nishant Bansal

former_member205842
Participant
0 Kudos

Hi ABAP Learner,

                           Am not getting cursor position on input field...please let me know how to do it.

ramakrishnappa
Active Contributor
0 Kudos

Hi,

you can try


WD_THIS->SET_FOCUS( exporting id_name = 'EMPLOYEE_NUMBER' )

in WDDOMODIFYVIEW method.

Here 'EMPLOYEE_NUMBER' is the view ui element id on your view.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi ,

check this thread [;

Regards,

Radhika.

Former Member
0 Kudos

Thaks for your replies!

But still I didn't get the solution for my problem. I have placed my UI elements in this order.

label1 inputfield1

label2 inputfield2

Button

After deploying my application, the cursor will appear at inputfield1 and then by pressing "tab" there it goes to Address bar of my browser instead of going to inputfield2.

This is my problem.....

Can anyone provide me solution for this issue....

Thanks in Advance!

Regards,

Sreelakshmi.

Edited by: sreelakshmi.B on Jul 15, 2009 9:49 AM

Former Member
0 Kudos

The cursor should automatically go to next UI element when you press tab key. This does not require any coding. Try to remove your code from WDDOMODIFYVIEW and check if it works fine.

Former Member
0 Kudos

Hi Pooja,

I written my code in MODIFYVIEW ( ) only. But after entering data in first inputfield then i pressed 'TAB" here, it goes to address bar of browser and after completion of one cycle through all browser menus, then it works fine!

This is my problem,

Please help me

Thanks!

Edited by: sreelakshmi.B on Jul 16, 2009 10:15 AM

Former Member
0 Kudos

Hi

I would suggest that you just place the elements in the right order, pressing tab will position the cursor in the same order.

Forcefully setting a cursor on any element will change the tab sequence and will lead to accessibility related issues ( which is a product standard which SAP wants everyone to follow ).

Regards

Manas Dua

shaik_sajid
Active Contributor
0 Kudos

Hi

this link would be helpful

Regards

Sajid