<?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: calculation in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367116#M1732748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the correction...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Apr 2013 06:19:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-04-18T06:19:49Z</dc:date>
    <item>
      <title>calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367111#M1732743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KONV&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;KNUMV&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kposn&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kschl&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kbetr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;as &lt;/SPAN&gt;kbetr2&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;into&amp;nbsp; &lt;/SPAN&gt;CORRESPONDING &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;FIELDS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;it_display3 &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;from &lt;/SPAN&gt;konv&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;for &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ALL &lt;/SPAN&gt;ENTRIES &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;it_display &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;knumv &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;it_display&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;knumv &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kschl &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;'ZCAS'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AT &lt;/SPAN&gt;it_display.&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;READ &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;it_display3 &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;KEY &lt;/SPAN&gt;knumv &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;it_display&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;knumv . ( You also need to match the KPOSN )&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IF &lt;/SPAN&gt;sy&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;subrc &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32" style="font-style: inherit; font-family: inherit;"&gt;0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it_display&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;kbetr2 &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= ( &lt;/SPAN&gt;it_display3&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;kbetr2 / 10 ).&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;MODIFY &lt;/SPAN&gt;it_display.&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ENDIF.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;I have created another select statement for pr00 as in the above manner.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;i wanted to do konv~kschl = PR00 - konv~kschl=ZCAS (PR00 - ZCAS). how to write . I wanted knumv in the selection parameter for this . data should populate based on the selection parameter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 01:14:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367111#M1732743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-18T01:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367112#M1732744</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 am combining the select for both ZCAS and PR00 conditions in the below query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KONV~KNUMV&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv~kposn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv~kschl&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv~kbetr as kbetr2&lt;/P&gt;&lt;P&gt;into&amp;nbsp; CORRESPONDING FIELDS OF TABLE it_display3 from konv&lt;/P&gt;&lt;P&gt;for ALL ENTRIES IN it_display where&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv~knumv = it_display-knumv AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( konv~kschl = 'ZCAS'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or KONV~kschl = 'PR00').&lt;/P&gt;&lt;P&gt;sort it_display3 by kschl.&lt;/P&gt;&lt;P&gt;it_display4[] = it_display3[].&lt;/P&gt;&lt;P&gt;delete it_display3 where kschl NE 'ZCAS'. " This internal table will have only ZCAS&lt;/P&gt;&lt;P&gt;delete it_display4 where kschl NE 'PR00'. " This internal table will have only PR00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_display.&lt;/P&gt;&lt;P&gt;* ZCAS value&lt;/P&gt;&lt;P&gt;READ TABLE it_display3 WITH KEY knumv = it_display-knumv . ( You also need to match the KPOSN )&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_kbetr1 = ( it_display3-kbetr2 / 10 ).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*PR00 value&lt;/P&gt;&lt;P&gt;READ TABLE it_display4 WITH KEY knumv = it_display-knumv . ( You also need to match the KPOSN )&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_kbetr2 = ( it_display4-kbetr2 / 10 ).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;lv_kbetr3 = lv_kbetr2 - lv_kbetr1. " PR00 minus ZCAS&lt;/P&gt;&lt;P&gt;*lv_kbetr3 will have the value for PR00 minus ZCAS&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;~Niranjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 04:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367112#M1732744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-18T04:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367113#M1732745</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;You can use the following statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KONV&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;KNUMV&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kposn&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kschl&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kbetr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;as &lt;/SPAN&gt;kbetr2&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;into&amp;nbsp; &lt;/SPAN&gt;CORRESPONDING &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;FIELDS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;it_display3 &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;from &lt;/SPAN&gt;konv&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;for &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ALL &lt;/SPAN&gt;ENTRIES &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;it_display &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;knumv &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;it_display&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;knumv &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kschl&amp;nbsp; IN&lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt; (&lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-family: inherit;"&gt;'ZCAS','PR00').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets take 2 variable V_ZCAS and Z_PR00 &lt;/P&gt;&lt;P&gt;in order for calculation you can do the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;loop at &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;it_display.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;read it_display3 with key Knumv = it_display-knumv and kposn = it_display-kposn and kschl = 'ZCAS'. &lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;add the value of 'ZCAS'&lt;/P&gt;&lt;P&gt;V_ZCAS = it_display3-kbetr / 10 .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear it_display3. ( Should clear the work area )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read it_display3 with key Knumv = it_display-knumv and kposn = it_display-kposn and kschl = 'PR00'. &lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;add the value of 'PR00'&lt;/P&gt;&lt;P&gt;V_PR00 = it_display3-kbetr / 10 .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;clear it_display3. ( Should clear the work area )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;total = Z_PR00 - V_ZCAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Rahul Singh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can close this thread ..... &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1389/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 04:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367113#M1732745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-18T04:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367114#M1732746</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;You can try this statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;SELECT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KONV&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;KNUMV&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kposn&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kschl&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kbetr &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;as &lt;/SPAN&gt;kbetr2&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;into&amp;nbsp; &lt;/SPAN&gt;CORRESPONDING &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;FIELDS &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;it_display3 &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;from &lt;/SPAN&gt;konv&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;for &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ALL &lt;/SPAN&gt;ENTRIES &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;IN &lt;/SPAN&gt;it_display &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;where&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;knumv &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;it_display&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;knumv &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AND&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; konv&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;~&lt;/SPAN&gt;kschl IN &lt;SPAN class="L0S55" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;'ZCAS','PR00').&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;AT &lt;/SPAN&gt;it_display.&lt;/P&gt;&lt;P style="font-style: inherit; font-size: 12px; font-family: inherit; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;READ &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;TABLE &lt;/SPAN&gt;it_display3 &lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;WITH &lt;/SPAN&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;KEY &lt;/SPAN&gt;knumv &lt;SPAN class="L0S55" style="font-style: inherit; font-family: inherit;"&gt;= &lt;/SPAN&gt;it_display&lt;SPAN class="L0S70" style="font-style: inherit; font-family: inherit;"&gt;-&lt;/SPAN&gt;knumv . &lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;* ZCAS value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;if &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;t_display3&lt;/SPAN&gt;-&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;kschl = &lt;/SPAN&gt;&lt;SPAN class="L0S33" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;'ZCAS'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lv_kbetr = ( it_display3-kbetr2 / 10 ).&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;*PR00 value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;lv_kbetr = ( it_display3-kbetr2 / 10 ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;if &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;lv_kbetr&lt;/SPAN&gt; is not initial.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt; it_display&lt;/SPAN&gt;&lt;SPAN class="L0S70" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;kbetr2 &lt;/SPAN&gt;&lt;SPAN class="L0S55" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;= &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&amp;nbsp; lv_kbetr&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-size: 12px; font-family: inherit; color: #333333;"&gt;MODIFY &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;it_display.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;endif.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN class="L0S52" style="font-style: inherit; font-family: inherit;"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 05:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367114#M1732746</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-18T05:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367115#M1732747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Akash check your code once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 06:15:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367115#M1732747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-18T06:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367116#M1732748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the correction...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 06:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367116#M1732748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-18T06:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: calculation in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367117#M1732749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this code and it is not working for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2016 21:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/calculation-in-internal-table/m-p/9367117#M1732749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-02-15T21:32:41Z</dc:date>
    </item>
  </channel>
</rss>

