<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SET CURSOR does not work, why? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263768#M779878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the Cursor Position &lt;/P&gt;&lt;P&gt;When a screen is displayed, the system automatically places the cursor in the first field that is ready for input. However, you can also define on which screen element the cursor should appear in your program. The screen element does not have to be an input field. Positioning the cursor can make applications more user-friendly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set the cursor position either statically in the Screen Painter or dynamically in your ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At PBO you can set the cursor on a specific field of a specific row of a table control.&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;SET CURSOR FIELD f LINE lin OFFSET off. &lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Using the optional addition OFFSET, you can enter the offset of the cursor in the field as described under .&lt;/P&gt;&lt;P&gt;Setting the Cursor Position &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this program might help u:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_set_cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  field1(14) TYPE c, field2(14) TYPE c, field3(14) TYPE c,&lt;/P&gt;&lt;P&gt;       name(10) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK bloc WITH FRAME.&lt;/P&gt;&lt;P&gt;PARAMETERS: def RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            txt RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            f1  RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            f2  RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            f3  RADIOBUTTON GROUP rad.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK bloc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS pos TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF txt = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'TEXT'.&lt;/P&gt;&lt;P&gt;ELSEIF f1 = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'FIELD1'.&lt;/P&gt;&lt;P&gt;ELSEIF f2 = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'FIELD2'.&lt;/P&gt;&lt;P&gt;ELSEIF f3 = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'FIELD3'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cursor OUTPUT.&lt;/P&gt;&lt;P&gt;  IF def NE 'X'.&lt;/P&gt;&lt;P&gt;    SET CURSOR FIELD name OFFSET pos.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE back INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;suma sailaja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: suma sailaja pvn on Jan 9, 2008 3:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jan 2008 14:06:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-09T14:06:30Z</dc:date>
    <item>
      <title>SET CURSOR does not work, why?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263767#M779877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to set cursor to the new line which is inserted. Here is the code in MODULE user_command_0100 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;GET CURSOR LINE lin.&lt;/P&gt;&lt;P&gt;CHECK sy-subrc = 0.&lt;/P&gt;&lt;P&gt;lin = tbl-top_line + lin.&lt;/P&gt;&lt;P&gt;SET CURSOR LINE lin.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In flow logic the PBO is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at  i_test&lt;/P&gt;&lt;P&gt;       into wa_test&lt;/P&gt;&lt;P&gt;       with control tbl&lt;/P&gt;&lt;P&gt;       cursor tbl-current_line.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, the SET CURSOR does not work. The cursor does not move to the insert line. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any solutions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 13:57:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263767#M779877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T13:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: SET CURSOR does not work, why?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263768#M779878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the Cursor Position &lt;/P&gt;&lt;P&gt;When a screen is displayed, the system automatically places the cursor in the first field that is ready for input. However, you can also define on which screen element the cursor should appear in your program. The screen element does not have to be an input field. Positioning the cursor can make applications more user-friendly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can set the cursor position either statically in the Screen Painter or dynamically in your ABAP program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At PBO you can set the cursor on a specific field of a specific row of a table control.&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;SET CURSOR FIELD f LINE lin OFFSET off. &lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;Using the optional addition OFFSET, you can enter the offset of the cursor in the field as described under .&lt;/P&gt;&lt;P&gt;Setting the Cursor Position &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this program might help u:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_dynpro_set_cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  field1(14) TYPE c, field2(14) TYPE c, field3(14) TYPE c,&lt;/P&gt;&lt;P&gt;       name(10) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK bloc WITH FRAME.&lt;/P&gt;&lt;P&gt;PARAMETERS: def RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            txt RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            f1  RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            f2  RADIOBUTTON GROUP rad,&lt;/P&gt;&lt;P&gt;            f3  RADIOBUTTON GROUP rad.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK bloc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS pos TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF txt = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'TEXT'.&lt;/P&gt;&lt;P&gt;ELSEIF f1 = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'FIELD1'.&lt;/P&gt;&lt;P&gt;ELSEIF f2 = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'FIELD2'.&lt;/P&gt;&lt;P&gt;ELSEIF f3 = 'X'.&lt;/P&gt;&lt;P&gt;  name = 'FIELD3'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCREEN 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE cursor OUTPUT.&lt;/P&gt;&lt;P&gt;  IF def NE 'X'.&lt;/P&gt;&lt;P&gt;    SET CURSOR FIELD name OFFSET pos.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'SCREEN_100'.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE back INPUT.&lt;/P&gt;&lt;P&gt;  LEAVE SCREEN.&lt;/P&gt;&lt;P&gt;ENDMODULE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;suma sailaja&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: suma sailaja pvn on Jan 9, 2008 3:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 14:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263768#M779878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T14:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: SET CURSOR does not work, why?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263769#M779879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
....
GET CURSOR LINE lin.
CHECK sy-subrc = 0.
lin = tbl-top_line + lin.
SET CURSOR LINE lin.
...

In flow logic the PBO is:

loop at i_test
into wa_test
with control tbl
*cursor tbl-current_line. "comment this line and try again
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanjeev&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jan 2008 14:32:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263769#M779879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-09T14:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: SET CURSOR does not work, why?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263770#M779880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;solved by meself. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jan 2008 15:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-does-not-work-why/m-p/3263770#M779880</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-10T15:10:23Z</dc:date>
    </item>
  </channel>
</rss>

