<?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: cursor in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor/m-p/2440928#M546313</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;you declare the field  &amp;lt;b&amp;gt;record-name&amp;lt;/b&amp;gt; before setting the cursor position on that particuller field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can set the cursor position in two way's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Static Cursor Position&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define the cursor position statically, enter the name of the required screen element in the Cursor position screen attribute in the Screen Painter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Dynamic Cursor Position&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To set the cursor position dynamically, use the following statement in an ABAP dialog module in the PBO event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SET CURSOR FIELD &amp;lt;f&amp;gt; [OFFSET &amp;lt;off&amp;gt;].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f&amp;gt; can be a literal or a variable containing the name of a screen element. You can use the OFFSET addition to place the cursor at a particular point within an input/output field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;follow this sample program.&amp;lt;/b&amp;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), FIELD2(14), FIELD3(14),&lt;/P&gt;&lt;P&gt;      NAME(10).&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;At the start of the program, a selection screen appears on which you can select a cursor position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 100 is then called. The next screen (statically defined) for screen 100 is itself, and it has the following layout:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashok Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Jun 2007 07:24:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-30T07:24:54Z</dc:date>
    <item>
      <title>cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor/m-p/2440927#M546312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;i want to get the cursor in the next line after entering the data, so that i can enter the data in next line . please give me code .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and please check this code its not working...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  set_cursor  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : r_line type i.&lt;/P&gt;&lt;P&gt;module set_cursor output.&lt;/P&gt;&lt;P&gt;set cursor field record-name line TCTRL_PHONELIST-current_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " set_cursor  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  get_cursor  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;module get_cursor input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get cursor field record-name line r_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;r_line = r_line + 1.&lt;/P&gt;&lt;P&gt;TCTRL_PHONELIST-current_line = r_line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.                 " get_cursor  INPUT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 06:59:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor/m-p/2440927#M546312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T06:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: cursor</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cursor/m-p/2440928#M546313</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;you declare the field  &amp;lt;b&amp;gt;record-name&amp;lt;/b&amp;gt; before setting the cursor position on that particuller field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can set the cursor position in two way's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Static Cursor Position&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define the cursor position statically, enter the name of the required screen element in the Cursor position screen attribute in the Screen Painter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Dynamic Cursor Position&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To set the cursor position dynamically, use the following statement in an ABAP dialog module in the PBO event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SET CURSOR FIELD &amp;lt;f&amp;gt; [OFFSET &amp;lt;off&amp;gt;].&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;f&amp;gt; can be a literal or a variable containing the name of a screen element. You can use the OFFSET addition to place the cursor at a particular point within an input/output field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;follow this sample program.&amp;lt;/b&amp;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), FIELD2(14), FIELD3(14),&lt;/P&gt;&lt;P&gt;      NAME(10).&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;At the start of the program, a selection screen appears on which you can select a cursor position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Screen 100 is then called. The next screen (statically defined) for screen 100 is itself, and it has the following layout:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ashok Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2007 07:24:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cursor/m-p/2440928#M546313</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-30T07:24:54Z</dc:date>
    </item>
  </channel>
</rss>

