<?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: formula in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345379#M1730745</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 &lt;SPAN style="color: #333333; font-size: 12.222222328186035px; background-color: #ffffff;"&gt; total = - 1 * total.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12.222222328186035px; background-color: #ffffff;"&gt;write : total.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Apr 2013 09:24:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-04-22T09:24:17Z</dc:date>
    <item>
      <title>formula in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345377#M1730743</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;I have an internal table it_display where the invoice wise bill types are appearing with sale value calculated as in my previous thread as follows :&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;My requirement is &lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;I wanted to write a condition if it_display-fkart = f2,fvat,l2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;then total = Z_PR00 - V_ZCAS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;if it_display-fkart = g2,re &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;then total = - (total) (should i need to declare another variable as total1 and for first case total1 = total and for 2nd case total1 = -(total). system doesn't permit to write -(total) or -1 * total. Please guide.&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;____________________________________&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;previous code in my earlier threads.&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;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 style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;lets take 2 variable V_ZCAS and Z_PR00&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;in order for calculation you can do the following.&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;loop at &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;it_display.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;read it_display3 with key Knumv = it_display-knumv and kposn = it_display-kposn and kschl = 'ZCAS'.&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;add the value of 'ZCAS'&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;V_ZCAS = it_display3-kbetr / 10 .&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;clear it_display3. ( Should clear the work area )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;read it_display3 with key Knumv = it_display-knumv and kposn = it_display-kposn and kschl = 'PR00'.&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;add the value of 'PR00'&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;V_PR00 = it_display3-kbetr / 10 .&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;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 style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;total = Z_PR00 - V_ZCAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;total = Z_PR00 - V_ZCAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;I wanted to write a condition if it_display-fkart = f2,fvat,l2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;then total = Z_PR00 - V_ZCAS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 01:50:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345377#M1730743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-22T01:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: formula in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345378#M1730744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pooja, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P style="font-size: 12px; background-color: #ffffff; color: #333333;"&gt;then total = - (total) (should i need to declare another variable as total1 and for first case total1 = total and for 2nd case total1 = -(total). system doesn't permit to write -(total) or -1 * total. Please guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whatever amount u want to get in " minus " , if the system doesnt allow -1* , u can subract it from Zero. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1389/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;a &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;VALUE &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;10&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt; a &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;b &lt;SPAN class="L0S70"&gt;- &lt;/SPAN&gt;a&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;For other issues, i request you to plz recreate the issue.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;Vivek&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 07:54:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345378#M1730744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-22T07:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: formula in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345379#M1730745</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 &lt;SPAN style="color: #333333; font-size: 12.222222328186035px; background-color: #ffffff;"&gt; total = - 1 * total.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12.222222328186035px; background-color: #ffffff;"&gt;write : total.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 09:24:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345379#M1730745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-22T09:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: formula in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345380#M1730746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;simplify your life &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1389/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;total = - total.&lt;/STRONG&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 12:32:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/formula-in-internal-table/m-p/9345380#M1730746</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2013-04-22T12:32:42Z</dc:date>
    </item>
  </channel>
</rss>

