<?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: Problem with tabindex on ALV user_command. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495935#M1557782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,create ur own custom pf-status or copy the standard status and use the pf status in ur report &lt;/P&gt;&lt;P&gt;through that u will get button in grid.&lt;/P&gt;&lt;P&gt;use this code it will give an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SEL_FIELD TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'DETAILS'.    " it is a buttton&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     IF SEL_FIELD-SEL_TAB_FIELD = '1-VBELN'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ TABLE IT_VBAK INTO WA_VBAK INDEX SEL_FIELD-TABINDEX.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;        SELECT VBELN PARVW KNREF LAND1 FROM VBPA INTO TABLE IT_VBPA WHERE VBELN = WA_VBAK-VBELN.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              FOR ALL ENTRIES IN IT_VBAK WHERE VBELN = IT_VBAK-VBELN.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          SORT IT_VBPA BY VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          PERFORM FIELDCAT_VBPA.&lt;/P&gt;&lt;P&gt;          PERFORM DISPLAY_VBPA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ENDCASE.&lt;/P&gt;&lt;P&gt;   ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FORM PF_STATUS USING EX_TAB  TYPE SLIS_T_EXTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ZPRK_STATUS' EXCLUDING EX_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Nov 2010 13:44:07 GMT</pubDate>
    <dc:creator>praveen_reddy2</dc:creator>
    <dc:date>2010-11-24T13:44:07Z</dc:date>
    <item>
      <title>Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495928#M1557775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have an issue with 'REUSE_ALV_GRID_DISPLAY' when calling the user command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We want to list some data refering to the selected line (with double click) and we use p_selfield-tabindex to know the selected line, no problem with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem comes when the user changes the order of the alv whit the button. Then, the p_selfield-tabindex variable gets confused and referes to a wrong line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help me with this please?&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:10:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495928#M1557775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495929#M1557776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check that the internal table from which ur reading against the tabindex ( p_selfield-tabindex  ) and the internal table which is used in ALV display are same i think you are reading another internal table in usercommand and displaying another internal table . This is the problem i think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:20:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495929#M1557776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495930#M1557777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have checked it, it's the same. When not ordering it works correctly, it fails when we change the original order (ordering by date or another field)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:23:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495930#M1557777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495931#M1557778</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 think this is the only problem , as i have also faced the same issue, because once u sort the internal table is also sorted. &lt;/P&gt;&lt;P&gt;Have checked after sort the ALV  and then u double click on line item, have u checked the order of sort in which it is showing in ALV is same in debug of the internal table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Madhukar Shetty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:30:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495931#M1557778</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495932#M1557779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used another way to get the correct line index:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA:
    lo_grid        TYPE REF TO cl_gui_alv_grid,
    lt_index_rows  TYPE lvc_t_row.


  CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
      e_grid = lo_grid.

* Get selected rows
  CALL METHOD lo_grid-&amp;gt;get_selected_rows
    IMPORTING
      et_index_rows = lt_index_rows.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got no problems with this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:33:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495932#M1557779</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495933#M1557780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm an Artur coworker.  The problem is that itab is not resorting when changing ALV order.  So when you double click on visual row '1'  you get tabindex = 1, BUT in itab doesn't correspond to that row because is not resorted.&lt;/P&gt;&lt;P&gt;I think the problem will be solved if We could say to 'REUSE_ALV_GRID_DISPLAY'  that itab must be resorted when user resort the ALV.&lt;/P&gt;&lt;P&gt;Peter: the problem is that We are using 'REUSE_ALV_GRID_DISPLAY'.  (not an option to change it if issue can be solved  )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:39:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495933#M1557780</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495934#M1557781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, sorry! I omit that you are not using the LVC FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can solve the problem, if you register the "after" event exit for the sort ucomm. In the callback form, you can use FM reuse_alv_grid_layout_info_get to determine the actual sort settings for the ALV and sort your internal table in the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sounds complicated to me, but I don't know this ALV display FM. It is just a guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 09:53:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495934#M1557781</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T09:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495935#M1557782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,create ur own custom pf-status or copy the standard status and use the pf status in ur report &lt;/P&gt;&lt;P&gt;through that u will get button in grid.&lt;/P&gt;&lt;P&gt;use this code it will give an idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM USER_COMMAND USING UCOMM LIKE SY-UCOMM SEL_FIELD TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CASE UCOMM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    WHEN 'DETAILS'.    " it is a buttton&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     IF SEL_FIELD-SEL_TAB_FIELD = '1-VBELN'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;READ TABLE IT_VBAK INTO WA_VBAK INDEX SEL_FIELD-TABINDEX.&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;        SELECT VBELN PARVW KNREF LAND1 FROM VBPA INTO TABLE IT_VBPA WHERE VBELN = WA_VBAK-VBELN.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;              FOR ALL ENTRIES IN IT_VBAK WHERE VBELN = IT_VBAK-VBELN.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          SORT IT_VBPA BY VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;          PERFORM FIELDCAT_VBPA.&lt;/P&gt;&lt;P&gt;          PERFORM DISPLAY_VBPA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   ENDCASE.&lt;/P&gt;&lt;P&gt;   ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   FORM PF_STATUS USING EX_TAB  TYPE SLIS_T_EXTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SET PF-STATUS 'ZPRK_STATUS' EXCLUDING EX_TAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 13:44:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495935#M1557782</guid>
      <dc:creator>praveen_reddy2</dc:creator>
      <dc:date>2010-11-24T13:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with tabindex on ALV user_command.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495936#M1557783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi friend,&lt;/P&gt;&lt;P&gt;Please find the code and excute that code i thing ur problem will solved.&lt;/P&gt;&lt;P&gt;CLASS lcl_event_receiver DEFINITION.&lt;/P&gt;&lt;P&gt; handle_user_command&lt;/P&gt;&lt;P&gt;                FOR EVENT user_command OF cl_gui_alv_grid&lt;/P&gt;&lt;P&gt;                 IMPORTING e_ucomm.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;METHOD handle_user_command.&lt;/P&gt;&lt;P&gt;  CASE e_ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD r_grid-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;          IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;             ET_INDEX_ROWS =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;             et_row_no     = it_rows.&lt;/P&gt;&lt;P&gt;      LOOP AT it_rows INTO wa_rows.&lt;/P&gt;&lt;P&gt; READ TABLE ITAB INTO WA INDEX wa_rows-row_id.&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;HERE WE CAN WRITE THE MODIFY CODE&lt;/STRONG&gt;****&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;STRAT-OF-SELECTION.&lt;/P&gt;&lt;P&gt;CREATE OBJECT r_container&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      container_name              = 'CONTAINER_1'&lt;/P&gt;&lt;P&gt;     CREATE OBJECT r_grid&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      i_parent          = r_container&lt;/P&gt;&lt;P&gt; CREATE OBJECT event_receiver1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; call method R_GRID-&amp;gt;register_edit_event&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               exporting&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                  i_event_id = cl_gui_alv_grid=&amp;gt;mc_evt_modifieD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SET HANDLER event_receiver1-&amp;gt;handle_before_user_command FOR r_grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Muralii on Nov 24, 2010 2:58 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 13:58:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-tabindex-on-alv-user-command/m-p/7495936#M1557783</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-24T13:58:23Z</dc:date>
    </item>
  </channel>
</rss>

