Skip to Content
author's profile photo Former Member
Former Member

Cursor Positioning in Screen Painter

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

10 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2005 at 01:14 PM

    Charles

    Thanks for the brilliant work around.

    The problem is solved now.

    Prasad

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 03:11 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2005 at 02:55 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 10, 2005 at 03:35 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2005 at 10:31 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2005 at 02:42 PM

    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ü

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2005 at 03:17 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 13, 2005 at 04:05 PM

    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'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 11:09 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2005 at 03:35 AM

    Hi Charles

    Thanks. Pleasure to work with you too.

    I am sorry. I have rewarded the points today.

    Thanks

    Prasad

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.