<?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 alv grid (not using objects) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464843#M1251759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;by using below syntax you can catch the line selected..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* getting the cursor line in Alv Grid
  GET CURSOR FIELD selfield LINE selline.
  selindex = t_output-top_line + selline - 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2009 15:40:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-21T15:40:58Z</dc:date>
    <item>
      <title>set cursor alv grid (not using objects)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464842#M1251758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got a question on ALV GRID (not using objects), please let me know if you have pointers. Thanks.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Output has 2 screens both has different contents. The output is generated using internal table1 and 2 and using FM  'REUSE_ALV_GRID_DISPLAY_LVC'  (both screen use same FM).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;First screen has multiple pages of output (say 10 pages). User scrolled page 5 and line 10 of first screen and then double clicked it takes to screen #2. After completion of screen #2, the back arrow should get back to page 5 and line 10 of screen #1. Currently the back arrow gets to screen#1 page 1 and line 1. How to remember the cursor position in alv grid and instruct the cursor to go there?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Appreciate the input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Note: I tried "set cursor line n" with "Scroll" command but no luck. &lt;A href="http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 15:35:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464842#M1251758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-21T15:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: set cursor alv grid (not using objects)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464843#M1251759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ravi,&lt;/P&gt;&lt;P&gt;by using below syntax you can catch the line selected..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* getting the cursor line in Alv Grid
  GET CURSOR FIELD selfield LINE selline.
  selindex = t_output-top_line + selline - 1.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 15:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464843#M1251759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-21T15:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: set cursor alv grid (not using objects)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464844#M1251760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the inputs.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;FYI, I got it implemented using method  CALL METHOD &amp;lt;ref.var. to CL_GUI_ALV_GRID &amp;gt; -&amp;gt;set_current_cell_via_id&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;The method is called by 'REUSE_ALV_GRID_DISPLAY_LVC' form 'PF_STATUS_SET' when the ALV grid output is presented each time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_bypassing_buffer       = 'X'&lt;/P&gt;&lt;P&gt;      i_callback_program       = gc_repid&lt;/P&gt;&lt;P&gt;      i_callback_pf_status_set = 'PF_STATUS_SET'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      i_callback_user_command  = 'USER_COMMAND'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      is_layout_lvc            = lwa_layout&lt;/P&gt;&lt;P&gt;      it_fieldcat_lvc          = git_fc_lvc&lt;/P&gt;&lt;P&gt;      i_default                = ' '&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      t_outtab                 = git_data&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      program_error            = 1&lt;/P&gt;&lt;P&gt;      OTHERS                   = 2. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  FORM alv_event_pf_status_set USING rt_extab                 &lt;/P&gt;&lt;P&gt;                             TYPE slis_t_extab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA lo_ref1 TYPE REF TO cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;*Get the reference to class "lo_ref1" for the ALV report&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      e_grid = lo_ref1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*set the focus of cursor in ALV&lt;/P&gt;&lt;P&gt;  CALL METHOD lo_ref1-&amp;gt;set_current_cell_via_id&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      is_row_no = gv_row. "row number where you want to focus the cursor &lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 18:56:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-cursor-alv-grid-not-using-objects/m-p/5464844#M1251760</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-21T18:56:19Z</dc:date>
    </item>
  </channel>
</rss>

