cancel
Showing results for 
Search instead for 
Did you mean: 

Get the cursor position

Former Member
0 Kudos

Hello Experts,

Can anyone please tell me how to identify the cursor position (Window co-ordinates).

My requirement is, when user click the button i need to show the popup screen near to the button.

And that button is dynamic i can be appear in anywhere.

So i planning to get the screen co-ordinates, while clicking the button and then adjust the pop-up screen based on that.

Please Help


Thanks & Regards,

Ashok

Accepted Solutions (0)

Answers (1)

Answers (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Try this WDDOMODIFYVIEW, it will help to set focus in Inputfield

DATA lo_element TYPE REF TO IF_WD_VIEW_ELEMENT.

if first_time eq abap_true

CALL METHOD view->get_element
   
EXPORTING
     
id      = 'Inputfield'"Your required input field
    receiving
      element = lo_element.
 
IF lo_element IS NOT INITIAL.
   
CALL METHOD view->request_focus_on_view_elem
     
EXPORTING
        view_element    = lo_element.
  ENDIF.
endif.

Former Member
0 Kudos

Hello Jeyanthi,

Thanks for your response.

This code is to set the cursor position in particular UI element(Like SET CURSOR in ABAP).

But this is not my question.

I need to identify the cursor position(Window co-ordinates).

Thanks & Regards,

Ashok