<?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 assignment in expression in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129809#M1512271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; You can achieve this by using field symbols... Just analyze the following sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETER : w_a TYPE i
     , w_b TYPE i
     , w_symbol TYPE c
     .

DATA : w_text_A(10) TYPE c
      , w_text_B(10) TYPE c
      , w_c TYPE i
      .

FIELD-SYMBOLS : &amp;lt;FS_A&amp;gt;,&amp;lt;FS_B&amp;gt;,&amp;lt;FS_C&amp;gt;.

w_text_A = 'W_A'.

w_text_B = 'W_B'.

WRITE : w_a, w_b, w_c.
WRITE /.

ASSIGN (w_text_A) TO &amp;lt;FS_A&amp;gt;. " assigns the value of field name(w_a) contained in variable(w_text_a)

ASSIGN (w_text_b) TO &amp;lt;FS_B&amp;gt;. " assigns the value of field name(w_b) contained in variable(w_text_b)

CASE W_SYMBOL.
  WHEN '-'.
    W_C = &amp;lt;FS_A&amp;gt; - &amp;lt;FS_B&amp;gt;.
  WHEN '+'.
    W_C = &amp;lt;FS_A&amp;gt; + &amp;lt;FS_B&amp;gt;.
  WHEN '/'.
    W_C = &amp;lt;FS_A&amp;gt; / &amp;lt;FS_B&amp;gt;.
  WHEN '*'.
    W_C = &amp;lt;FS_A&amp;gt; * &amp;lt;FS_B&amp;gt;.
  WHEN OTHERS.
ENDCASE..



WRITE : w_a, w_b, w_c.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;copy paste to SE38 and try.You will get what you want.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Senthil Kumar Anantham..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jul 2010 07:01:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-14T07:01:26Z</dc:date>
    <item>
      <title>dynamic assignment in expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129808#M1512270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement such that, based on some conditions, a = b + c, or a = b + d, or a = a - c, or a = a + c, and so on...  All variables are of currency type (13,2). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the logic of this condition-based equation comes from table ( i.e. if a = a - c, then 'a' ,  '-' and  'c' are maintained in a custom table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to populate a text by concatenating 'a' '-' 'c' such that the text equals 'a - c'. Now I want to equate a with text  (a = text )to get the value as that of (a - c). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can throw some light on this please...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Birendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 06:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129808#M1512270</guid>
      <dc:creator>birendra_chatterjee</dc:creator>
      <dc:date>2010-07-14T06:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic assignment in expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129809#M1512271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; You can achieve this by using field symbols... Just analyze the following sample code..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETER : w_a TYPE i
     , w_b TYPE i
     , w_symbol TYPE c
     .

DATA : w_text_A(10) TYPE c
      , w_text_B(10) TYPE c
      , w_c TYPE i
      .

FIELD-SYMBOLS : &amp;lt;FS_A&amp;gt;,&amp;lt;FS_B&amp;gt;,&amp;lt;FS_C&amp;gt;.

w_text_A = 'W_A'.

w_text_B = 'W_B'.

WRITE : w_a, w_b, w_c.
WRITE /.

ASSIGN (w_text_A) TO &amp;lt;FS_A&amp;gt;. " assigns the value of field name(w_a) contained in variable(w_text_a)

ASSIGN (w_text_b) TO &amp;lt;FS_B&amp;gt;. " assigns the value of field name(w_b) contained in variable(w_text_b)

CASE W_SYMBOL.
  WHEN '-'.
    W_C = &amp;lt;FS_A&amp;gt; - &amp;lt;FS_B&amp;gt;.
  WHEN '+'.
    W_C = &amp;lt;FS_A&amp;gt; + &amp;lt;FS_B&amp;gt;.
  WHEN '/'.
    W_C = &amp;lt;FS_A&amp;gt; / &amp;lt;FS_B&amp;gt;.
  WHEN '*'.
    W_C = &amp;lt;FS_A&amp;gt; * &amp;lt;FS_B&amp;gt;.
  WHEN OTHERS.
ENDCASE..



WRITE : w_a, w_b, w_c.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;copy paste to SE38 and try.You will get what you want.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Senthil Kumar Anantham..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 07:01:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129809#M1512271</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-14T07:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic assignment in expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129810#M1512272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The func. module 'EVAL_FORMULA' should help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 08:06:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129810#M1512272</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-07-14T08:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic assignment in expression</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129811#M1512273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this &lt;SPAN __jive_macro_name="thread" id="1444895"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jul 2010 08:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-assignment-in-expression/m-p/7129811#M1512273</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-07-14T08:18:51Z</dc:date>
    </item>
  </channel>
</rss>

