<?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: DOUBLE_CLICK and LOOP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034880#M417897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;  Below is the reply to each of your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How to trigger Double-click? &lt;/P&gt;&lt;P&gt;A. In the PBO of screen, set PF-STATUS. In the PF-STATUS, activate the   Function code 'PICK' (F2). Thats all. Now when u double click, the ok_code field will contain the value 'PICK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How to identify the double clicked record? In the PAI of the screen, write this code.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     DATA t_rowids TYPE lvc_t_roid OCCURS 0.&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  USER_COMMAND_0100  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; PAI for Screen 100&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 USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   REFRESH t_rowids.&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_row_no = t_rowids.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;b&amp;gt;Here t_rowids will contain the row number which is double clicked.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE t_rowids INDEX 1.&lt;/P&gt;&lt;P&gt;      READ TABLE itab INDEX t_rowids-row_id.&lt;/P&gt;&lt;P&gt;     &amp;lt;b&amp;gt; Now itab work area contains the Double clicked record. ITAB is the Internal table displayed in the first screen.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. how can i loop at internal table g_t_sloc and search only records that correspond to the DOUBLE_CLICKED row, my search criteria should be MATNR field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT g_t_sloc INTO wa_sl WHERE matnr EQ itab-matnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Do your processing here.  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Same way for g_t_mbew.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Please dnt forget to award points if this was helpful.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Mar 2007 09:38:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-13T09:38:13Z</dc:date>
    <item>
      <title>DOUBLE_CLICK and LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034876#M417893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 internal tables g_t_mbew and g_t_sloc. &lt;/P&gt;&lt;P&gt;g_t_mbew is appended trough loop into output table itab_custdata of ALV list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after display of the first ALV i would like to trigger DOUBLE CLICK event on that ALV. DOUBLE_CLICK should trigger an output of another screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is as follows: how can i loop at internal table g_t_sloc and search only records that correspond to the DOUBLE_CLICKED row, my search criteria should be MATNR field. &lt;/P&gt;&lt;P&gt;with:&lt;/P&gt;&lt;P&gt;READ TABLE g_t_sloc INTO wa_sl INDEX e_row-index. &lt;/P&gt;&lt;P&gt;i only get one record, how can i retrieve all the record that have same MATNR in g_t_mbew and g_t_sloc????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:14:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034876#M417893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: DOUBLE_CLICK and LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034877#M417894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You &amp;lt;b&amp;gt;hide&amp;lt;/b&amp;gt; the double click field(MATNR) in the internal table g_t_mbew  of first list.&lt;/P&gt;&lt;P&gt;Fetch the corresponding data from MARC/MARD into internal table g_t_sloc.&lt;/P&gt;&lt;P&gt;First basic list pass the internal table g_t_mbew   and for use command event for Interactive list of ALV call the internal table g_t_sloc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Anji Reddy Vangala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:19:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034877#M417894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: DOUBLE_CLICK and LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034878#M417895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the method get_selected_cells. This will tell you the details you require.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:21:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034878#M417895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: DOUBLE_CLICK and LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034879#M417896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM
                        P_SELFLD TYPE SLIS_SELFIELD.

  
  CASE P_UCOMM.

    WHEN '&amp;amp;IC1'.    "Double click
      READ TABLE itab_custdata INDEX P_SELFLD-TABINDEX.
      v_matnr = itab_custdata-marnr.

     loop at g_t_mbew where matnr eq v_matnr.
       *here you will get all the records
     endloop.

     loop at g_t_sloc where matnr eq v_matnr.
       *here you will get all the records
     endloop.

     ENDCASE.


ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:22:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034879#M417896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: DOUBLE_CLICK and LOOP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034880#M417897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;  Below is the reply to each of your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. How to trigger Double-click? &lt;/P&gt;&lt;P&gt;A. In the PBO of screen, set PF-STATUS. In the PF-STATUS, activate the   Function code 'PICK' (F2). Thats all. Now when u double click, the ok_code field will contain the value 'PICK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. How to identify the double clicked record? In the PAI of the screen, write this code.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     DATA t_rowids TYPE lvc_t_roid OCCURS 0.&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  USER_COMMAND_0100  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; PAI for Screen 100&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 USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;   REFRESH t_rowids.&lt;/P&gt;&lt;P&gt;  CALL METHOD obj_alv_grid-&amp;gt;get_selected_rows&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      et_row_no = t_rowids.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;b&amp;gt;Here t_rowids will contain the row number which is double clicked.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ TABLE t_rowids INDEX 1.&lt;/P&gt;&lt;P&gt;      READ TABLE itab INDEX t_rowids-row_id.&lt;/P&gt;&lt;P&gt;     &amp;lt;b&amp;gt; Now itab work area contains the Double clicked record. ITAB is the Internal table displayed in the first screen.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. how can i loop at internal table g_t_sloc and search only records that correspond to the DOUBLE_CLICKED row, my search criteria should be MATNR field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT g_t_sloc INTO wa_sl WHERE matnr EQ itab-matnr.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Do your processing here.  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Same way for g_t_mbew.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Please dnt forget to award points if this was helpful.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Mar 2007 09:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/double-click-and-loop/m-p/2034880#M417897</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-13T09:38:13Z</dc:date>
    </item>
  </channel>
</rss>

