<?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 Dynamic Calculation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761280#M1676504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In DATA_CHANGED event, you can do the calculations and set the value for the other cells using the method, MODIFY_CELL of the object ER_DATA_CHANGED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this would help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT er_data_changed-&amp;gt;mt_good_cells INTO lwa_good_cells.
&amp;nbsp; CASE lwa_good_cells-fieldname.
&amp;nbsp; WHEN 'ZEDIT_FIELD'.

&amp;nbsp; READ TABLE li_output INTO lwa_output INDEX lwa_good_cells-row_id.
&amp;nbsp; lv_Val1 = lv_edit_Field * 10.
&amp;nbsp; CALL METHOD er_data_changed-&amp;gt;modify_cell
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_row_id&amp;nbsp;&amp;nbsp;&amp;nbsp; = lwa_good_cells-row_id
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_fieldname = 'ZZFLD1'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = lv_val1.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2012 19:14:39 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2012-05-07T19:14:39Z</dc:date>
    <item>
      <title>ALV Dynamic Calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761279#M1676503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp; a question regards to ALV and the requirement is as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having some fields editable in ALV.Most of the other fields in the ALV are derived based on the Editable Fields(some calculation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my requirement is, If the editable fields are changed,is there any way that the dependent or derived fields gets changed automaticaly based on the input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX :&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input1&amp;nbsp;&amp;nbsp; input2&amp;nbsp;&amp;nbsp; output&lt;/P&gt;&lt;P&gt;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input1+input2&lt;/P&gt;&lt;P&gt;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input1 of first row * input2 of second row&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the above example..if i change input1 of first row..it should reflect in output field dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way for this..Any assistance will help me a lot and appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surya Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 18:22:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761279#M1676503</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-07T18:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Dynamic Calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761280#M1676504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In DATA_CHANGED event, you can do the calculations and set the value for the other cells using the method, MODIFY_CELL of the object ER_DATA_CHANGED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this would help:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT er_data_changed-&amp;gt;mt_good_cells INTO lwa_good_cells.
&amp;nbsp; CASE lwa_good_cells-fieldname.
&amp;nbsp; WHEN 'ZEDIT_FIELD'.

&amp;nbsp; READ TABLE li_output INTO lwa_output INDEX lwa_good_cells-row_id.
&amp;nbsp; lv_Val1 = lv_edit_Field * 10.
&amp;nbsp; CALL METHOD er_data_changed-&amp;gt;modify_cell
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXPORTING
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_row_id&amp;nbsp;&amp;nbsp;&amp;nbsp; = lwa_good_cells-row_id
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_fieldname = 'ZZFLD1'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i_value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = lv_val1.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 19:14:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761280#M1676504</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2012-05-07T19:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Dynamic Calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761281#M1676505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naimesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply..But sorry am unable to understand.Could u pls describe the above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Surya Reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 06:37:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761281#M1676505</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-08T06:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Dynamic Calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761282#M1676506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;once the data is changed in alv, call the below bethod..which wil be having the changed data in the internal table.&lt;/P&gt;&lt;P&gt;It can be achieved with alv_grid-&amp;gt;check_changed_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then change the internal table as required and use method to alv_grid-&amp;gt;&lt;SPAN style="font-size: 10pt;"&gt;refresh_table_display to display the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 14:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761282#M1676506</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-05-17T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: ALV Dynamic Calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761283#M1676507</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;check this link,&lt;/P&gt;&lt;P&gt;&lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/Making+ALV+to+react+to+Change+data+automatically"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/Making+ALV+to+react+to+Change+data+automatically&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 14:28:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv-dynamic-calculation/m-p/8761283#M1676507</guid>
      <dc:creator>nishant_jain3</dc:creator>
      <dc:date>2012-05-17T14:28:10Z</dc:date>
    </item>
  </channel>
</rss>

