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

Cursor Positioning in Screen Painter

Former Member
0 Likes
3,410

Hi

I have a screen element which accepts a file name on a POV. However, if I input a long filename, the cursor position goes towards the end.

Next time, when I try to change the filename to a short one, again on a POV, the cursor position is still at the end, giving me the feeling that it is blank.

If I press the "HOME" button on the keyboard, I can return to the beginning. However,

Is there a way to set the cursor position to offset zero, in a POV ? PBO is not called after POV right ?

Or can the property be set statically for that screen element in the screen painter itself ? If yes, how ?

I could not find it anywhere in the Screen Layout Properties.

Thanks

PS

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,481

Charles

Thanks for the brilliant work around.

The problem is solved now.

Prasad

14 REPLIES 14
Read only

Former Member
0 Likes
2,481

I believe you are correct that your Process on Value (POV) request does not invoke PBO. I tried a brief test in 4.6C to use SET CURSOR in POV but it ignored me.

It sounds like your input field is defined as scrollable. If you make its visible size match its internal size and turn off the scrollable feature, maybe you will like it better.

Let us know how it goes.

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
2,481

Hi Prasad

You can use the "<b>OFFSET</b>" addition of the "SET CURSOR" statement. Pass 1 to <off> .


SET CURSOR FIELD <f> [OFFSET <off>].

<i>And as a last thing, let me introduce you the SDN forums pointing system: You can assign points to posts you find helpful while solving your question. You can reward points by clicking the yellow star icon at header of each reply post. You can reward;

- one 10 points (solved)

- two 6 points (very helpful answer)

- many 2 points (helpful answer)</i>

Kind Regards...

*--Serdar

Read only

0 Likes
2,481

I tried the SET CURSOR..OFFSET command in POV but it ignored me. This was in 4.6C.

Read only

Former Member
0 Likes
2,481

If the scrollable feature is turned off then it would not solve my purpose. I don't see it as a work around.

The OFFSET method cannot be used as the PBO is not invoked after the POV.

Any other suggestions ABAP experts ?

Thanks

Prasad

Read only

0 Likes
2,481

In your original posting you said:

"the cursor position is still at the end, giving me the feeling that it is blank"

Wouldn't turning off the scrollable feature at least fix this issue for you since you could see all the data and not give the feeling that it is blank? If not, could you please elaborate?

Read only

Former Member
0 Likes
2,481

Hi,

You can call method cl_gui_cfw=>set_new_ok_code with new_code = space at the end of your POV module coding. It triggers PAI for the screen and then the cursor is set to the correct position usinf SET CURSOR OFFSET.

Kind Regards,

Sükrü

Read only

Former Member
0 Likes
2,481

Dear Suekrue Birakoglu

Nopes. It did not invoke the PAI at all.

I thought, it was good idea.

Do you have any other alternative / solution ?

Thanks

Prasad S

Read only

kmoore007
Active Contributor
0 Likes
2,481

Isn't this a GUI Option? Under the local GUI options, on tab CURSOR, see if you have checked box 'Position cursor at end of text'.

Read only

Former Member
0 Likes
2,481

You can force PBO from your POV Module by coding:

set screen 100. <==your screen number

leave screen.

I tried this in 4.6C and it invoked PBO.

Make sure the value retrieved from your help is properly tranported back to the screen.

Let us know how it goes.

Read only

Former Member
0 Likes
2,481

Charles, Kenneth

Apologise for the late reply. I was on vacation.

Well, i am afraid to say,

1. Setting the Local Gui Options did not work. Same problem.

2. SET SCREEN 'xyz' and leave screen is not a feasible solution because SCREEN xyz is a modal dialog window and it must appear in a restricted area.( as per my requirement).

The screen is invoked using a CALL SCREEN 'xyz' starting at ... ending at ..

However, with the SET SCREEN approach, I get the window to cover the whole screen which is not desirable.

Any work around for this ?

Thanks

Prasad

Read only

0 Likes
2,481

How about this..

In your POV, do SET SCREEN 0. LEAVE SCREEN.

This will terminate your CALL SCREEN 'xyz'.

Where your CALL SCREEN 'xyz' command in located, put it in a DO LOOP. When screen 'xyz' gets a function code back from the user that indicates the user is done, then use some type of flag to terminate the DO LOOP.

Read only

Former Member
0 Likes
2,482

Charles

Thanks for the brilliant work around.

The problem is solved now.

Prasad

Read only

0 Likes
2,481

Happy that this worked for you. Please remember to award points by clicking on the stars next to the title for all of the people that you think helped you. Pleasure to work with you.

Read only

Former Member
0 Likes
2,481

Hi Charles

Thanks. Pleasure to work with you too.

I am sorry. I have rewarded the points today.

Thanks

Prasad