<?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: alv grid display in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730546#M318130</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can notice that when the alv grid starts, the 1st row, 1st column is yellow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as soon as you click anywhere in that row, the whole row gets selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, if you use the method 'get_selected_rows', then this will:&lt;/P&gt;&lt;P&gt;1) return an empty table if there are only cells or columns selected.&lt;/P&gt;&lt;P&gt;2) return a non-empty table if there are rows selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can determine whether a user has actually clicked on a row or not.&lt;/P&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;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2006 00:25:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-06T00:25:05Z</dc:date>
    <item>
      <title>alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730544#M318128</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;   when iam displaying the output using ALV Grid display, in the output always the first row first column is showing yellow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; the problem with this is iam using this scree for interactive ALV so even the user doesnt select any line it will take the first line as the default one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    So when i select any push button on the ALV display without select any row it is taking the first one as default and displaying the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Hope iam clear in putting my problem before you experts, please help me out in resolving this issue thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 11:37:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730544#M318128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T11:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730545#M318129</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;In Your User Command routine, first you have to check whether any record is selected or not. If selected then only your logic should be executed. otherwise not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;sksingh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 13:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730545#M318129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-05T13:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730546#M318130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can notice that when the alv grid starts, the 1st row, 1st column is yellow. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as soon as you click anywhere in that row, the whole row gets selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, if you use the method 'get_selected_rows', then this will:&lt;/P&gt;&lt;P&gt;1) return an empty table if there are only cells or columns selected.&lt;/P&gt;&lt;P&gt;2) return a non-empty table if there are rows selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can determine whether a user has actually clicked on a row or not.&lt;/P&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;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 00:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730546#M318130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T00:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730547#M318131</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;Thanks for responding i am stuck with the logic how to implement the one which you said if possible please send me the example code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 09:09:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730547#M318131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T09:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: alv grid display</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730548#M318132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Madan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just put it In the place where you have the code that gets executed when the button gets pushed.&lt;/P&gt;&lt;P&gt;Maybe something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
form user_command_occured importing i_ucomm.

DATA:
LT_INDEX_ROWS	Type	LVC_T_ROW,
LT_ROW_NO	Type	LVC_T_ROID,
row             type    lvc_s_roid,
wa              like    line of out_tab. 
* assuming out_tab is what you passed to the ALV

if i_ucomm = &amp;lt;the button you want to respond to&amp;gt;.
*   first check a row has been selected.
  call method alv_grid-&amp;gt;get_selected_rows
      importing
         et_index_rows = lt_index_rows
         et_row_no       = lt_row_no.
  
  if lt_index_rows is initial.
*   no rows selected, only cells.
  else.
    read table lt_row_no into row index 1. "assuming only 1 row selected
    read table out_tab into wa index row-row_id.
    perform &amp;lt;output_form&amp;gt; using wa.
  endif.

endif.

endform.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Phillip Manning&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2006 22:22:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-grid-display/m-p/1730548#M318132</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-06T22:22:23Z</dc:date>
    </item>
  </channel>
</rss>

