Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

Cursor value on custom editor

Former Member
0 Kudos

Hi All,

I have created a custom editor on the top half of a screen using FM 'RH_EDITOR_SET'.

I need to capture the cursor position on the editor (row and column).

Though below the editor the line no and col no as displayed (like in the ABAP editor), I am not able to capture them inside the program.

The GET cursor function does not work b'cos the screen element for the editor is a container. I also tried some system fields but none returns the value of the row no and column no on the editor on a screen.

Please suggest.

Thanks in advance,



Former Member
0 Kudos

Actually I want to insert some code at a selected cursor position in the editor.

But the problem is that I have to choose a position on the editor and then have to click on a puch button to insert code at that position in the editor.

An example of this is like we call FM's from an ABAP program, select a cursor position in the editor and click on 'Pattern' the code gets inserted on that position.

I need a similar functionality.

Please let me know how we can achieve this on a custom editor.

0 Kudos

Hello Archana,

Please try calling the function module


As mentioned,i have debugged the action of insertion of pattern out of curiosity and found that this function module "GET_CURSOR" is called in OOPs..

The return parameters




will be will be able to insert your code at the location returned

which means -> on the push of the button this FM needs to be called

Please let me know if it worked out

All the best



0 Kudos


Thanks for the effort. I had tried doing that but it works in case you have an object created, but since I used the FM's it doesnt work.

However I have foudn a solution. I created the editor using class cl_gui_textedit and called the method get_selection_pos.

Thanks a lot