<?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: Dynamic Computation / Formula in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443829#M1054124</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran thanks for reply but i am not using the dynamic computation in sql, the reason i am doing these because the computation will just be fetch in maintenance table and i'll just replacing the value please see some sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: c_val(20) type c value 'amount / 0.12',&lt;/P&gt;&lt;P&gt;      p_amt(16) type p decimals 2,&lt;/P&gt;&lt;P&gt;      p_amt1(16) type p decimals 2 value '1000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: command type string,&lt;/P&gt;&lt;P&gt;       com1(16) type p.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt; concatenate  'p_amt1' '/' '0.12'&lt;/P&gt;&lt;P&gt; into command separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; compute p_amt = &lt;STRONG&gt;(command)&lt;/STRONG&gt;.  "--&amp;gt; unable to interpret expression (command).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2008 05:38:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-09-15T05:38:42Z</dc:date>
    <item>
      <title>Dynamic Computation / Formula</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443827#M1054122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know is it possible dynamic compute in ABAP. &lt;/P&gt;&lt;P&gt;Ex: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_amt = computation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where computation = 1000 / 0.12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is same logic with dynamic sql where in you have the option to put the table and condition dynamically. thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 05:20:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443827#M1054122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T05:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Computation / Formula</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443828#M1054123</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;Yes that is definitely possible.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if condition1 = 'cond1'.
   computation = 1000 / 10.
else.
   computation = 200.
endif.

data: query type string.

concatenate 'P_AMT =' (computation) into query. 

select * from &amp;lt;tab1&amp;gt; into &amp;lt;itab&amp;gt;
   where (query).
&lt;/CODE&gt;&lt;/PRE&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;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 05:25:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443828#M1054123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T05:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Computation / Formula</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443829#M1054124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kiran thanks for reply but i am not using the dynamic computation in sql, the reason i am doing these because the computation will just be fetch in maintenance table and i'll just replacing the value please see some sample code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: c_val(20) type c value 'amount / 0.12',&lt;/P&gt;&lt;P&gt;      p_amt(16) type p decimals 2,&lt;/P&gt;&lt;P&gt;      p_amt1(16) type p decimals 2 value '1000'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; data: command type string,&lt;/P&gt;&lt;P&gt;       com1(16) type p.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt; concatenate  'p_amt1' '/' '0.12'&lt;/P&gt;&lt;P&gt; into command separated by space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; compute p_amt = &lt;STRONG&gt;(command)&lt;/STRONG&gt;.  "--&amp;gt; unable to interpret expression (command).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2008 05:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-computation-formula/m-p/4443829#M1054124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-15T05:38:42Z</dc:date>
    </item>
  </channel>
</rss>

