<?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 Dynamically changing variables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250653#M144868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to contain a DATA statement within an IF statement, or similarly define variables according to existing data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to fix a problem with a program for calculating index values. Some systems use indexes with two decimals, others use indexes with four decimals. I don't want to make the calculations using four decimals all of the time, but I also don't want to write IF statements wherever the index is used, to check whether it is a two or four decimals index. Is there a way to check the number of decimals and define the variable according to the result?&lt;/P&gt;&lt;P&gt;If changing the DATA definition is not possible, perhaps it is possible to accomplish that using constants in some way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;  Itay Horev&lt;/P&gt;&lt;P&gt;  SAP Israel Localization Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Apr 2006 11:54:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-24T11:54:27Z</dc:date>
    <item>
      <title>Dynamically changing variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250653#M144868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to contain a DATA statement within an IF statement, or similarly define variables according to existing data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to fix a problem with a program for calculating index values. Some systems use indexes with two decimals, others use indexes with four decimals. I don't want to make the calculations using four decimals all of the time, but I also don't want to write IF statements wherever the index is used, to check whether it is a two or four decimals index. Is there a way to check the number of decimals and define the variable according to the result?&lt;/P&gt;&lt;P&gt;If changing the DATA definition is not possible, perhaps it is possible to accomplish that using constants in some way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;  Itay Horev&lt;/P&gt;&lt;P&gt;  SAP Israel Localization Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 11:54:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250653#M144868</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-24T11:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250654#M144869</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 create a variable of a specifc type at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : var type ref to data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA VAR TYPE (DYNAMIC VARIABLE NAME).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DYNAMIC VARIABLE NAME could refer to any data type.&lt;/P&gt;&lt;P&gt;Is this what you were looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 12:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250654#M144869</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-24T12:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250655#M144870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi itay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. we cannot write data in IF condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. possibly u can use two variables,&lt;/P&gt;&lt;P&gt;  and depending upon the condition,&lt;/P&gt;&lt;P&gt;  use either of them.&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 12:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250655#M144870</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-24T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250656#M144871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Itay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If dynamic declaration is not allowed, you can use the following logic. Just try it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***************************************&lt;/P&gt;&lt;P&gt;If index is 4. &lt;/P&gt;&lt;P&gt;   perform calculateindex2 using ind.&lt;/P&gt;&lt;P&gt;else .&lt;/P&gt;&lt;P&gt;  perform calculate index4 using ind.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form calculateindex2 using ind typ i. &lt;/P&gt;&lt;P&gt;  data : index type i decimals 2.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Logic for calculation of index&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;you can cast any value to the index. &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form calculateindex4 using ind typ i. &lt;/P&gt;&lt;P&gt;  data : index type i decimals 4.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Logic for calculation&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 12:25:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250656#M144871</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-24T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250657#M144872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all the repliers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a different logic or two variables is impossible, since there are many many places and many ways in which the variable is used, and making such a repair would take a long time and make the program cumbersome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem has been solved by making a specific repair to the variable type in the customer's system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Itay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 08:47:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamically-changing-variables/m-p/1250657#M144872</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-25T08:47:57Z</dc:date>
    </item>
  </channel>
</rss>

