<?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: How to get the values dynamically in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223141#M1207665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Actually when you update any values then it changes in your internal table also&lt;/P&gt;&lt;P&gt;that why u will always get changed values&lt;/P&gt;&lt;P&gt;For handling it first get the original data from db table and then compare it with internal table which holds changed data&lt;/P&gt;&lt;P&gt;In this way you can handle both kind of value and do the functionality you want.&lt;/P&gt;&lt;P&gt;Then because you are sortin data its index get changed again need to call get_selected_rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Smita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Smita Gupta on Mar 3, 2009 1:20 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Smita Gupta on Mar 3, 2009 1:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2009 12:19:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-03T12:19:33Z</dc:date>
    <item>
      <title>How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223136#M1207660</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;          I am displaying the grid output. If i select a row is there any way to pick the values depends on that row. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Can you please let me know. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Sreekala.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 09:18:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223136#M1207660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T09:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223137#M1207661</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;Refer this wiki code &lt;STRONG&gt;ALV Grid Display with checkbox to process selected records at runtime&lt;/STRONG&gt;, it will definitely help you:-&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 09:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223137#M1207661</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-02-27T09:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223138#M1207662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         Thanks for u r reply. I called the method get_selected_rows. thorugh that index i am reading the data fro internal table. Again i came back and i sorted the output depends on field then my output gets changed. Now if i select one row and press display button, through the index it is reading from the internal table because of that it is showing wrong data. can u please suggest me how to follow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for u r reply,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 10:30:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223138#M1207662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T10:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223139#M1207663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tarun,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         Thanks for u r reply. I called the method get_selected_rows. thorugh that index i am reading the data fro internal table. Again i came back and i sorted the output depends on field then my output gets changed. Now if i select one row and press display button, through the index it is reading from the internal table because of that it is showing wrong data. can u please suggest me how to follow?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for u r reply,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2009 10:44:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223139#M1207663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-27T10:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223140#M1207664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sreekala,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;    Can u please elaborate the question more so that I can help u out because I am not able to understand it properly paste the code also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Ruchi Tiwari&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2009 10:21:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223140#M1207664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-02T10:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223141#M1207665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Actually when you update any values then it changes in your internal table also&lt;/P&gt;&lt;P&gt;that why u will always get changed values&lt;/P&gt;&lt;P&gt;For handling it first get the original data from db table and then compare it with internal table which holds changed data&lt;/P&gt;&lt;P&gt;In this way you can handle both kind of value and do the functionality you want.&lt;/P&gt;&lt;P&gt;Then because you are sortin data its index get changed again need to call get_selected_rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Smita&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Smita Gupta on Mar 3, 2009 1:20 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Smita Gupta on Mar 3, 2009 1:24 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 12:19:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223141#M1207665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-03T12:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the values dynamically</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223142#M1207666</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;If you double-click on a line to select and then wish to pick the value for field name and field value, the follow the below steps:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you double-click on any cell of alv grid, use this code to fetch the data of the line that you currently clicked, its working:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you double click on the ALV grid line, you will have sy-ucomm = &lt;STRONG&gt;'&amp;amp;IC1'&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when you define a &lt;STRONG&gt;i_callback_user_command&lt;/STRONG&gt; for the &lt;STRONG&gt;FM reuse_alv_grid_display&lt;/STRONG&gt;, and create it as:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
  DATA : ok_code TYPE sy-ucomm.
  ok_code = ucomm.
  CASE ok_code.
    WHEN '&amp;amp;IC1'. "for double click on alv grid line
      " your code
  ENDCASE.
ENDFORM.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you have used &lt;STRONG&gt;selfield TYPE slis_selfield&lt;/STRONG&gt;, the field &lt;STRONG&gt;selfield&lt;/STRONG&gt; will hold all the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To know on which row you have clicked and to retain that line, use code:-&lt;/P&gt;&lt;P&gt;Suppose you are currently displaying data from internal table &lt;STRONG&gt;itab&lt;/STRONG&gt; and corresponding to it you have work area &lt;STRONG&gt;wa&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
read table itab into wa index selfield-tabindex. "index value of line you clicked
" now you have the contents of line that you double clicked currently
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now to know the field name that you clicked, use:-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
selfield-fieldname " will fetch you the name of field that you clicked
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now using the work-area and the name of field that you clicked, you can easily make out the details of the field i.e., field name and field value and you can code as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tarun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2009 12:32:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-the-values-dynamically/m-p/5223142#M1207666</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-03-03T12:32:44Z</dc:date>
    </item>
  </channel>
</rss>

