<?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: Inline declaration inside loop and performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413705#M1926059</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;it seems that both variants are equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two FORMS, one with inline declaration in a loop, one with the inline declaration before the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For significance I declared in both cases 10 variables and I used a DO 10^7 TMES loop for both variants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whole testcase needed 7 seconds.&lt;/P&gt;&lt;P&gt;The "In Loop declaration" form needed 3,499 Seconds&lt;/P&gt;&lt;P&gt;The "Out of Loop declaration" form needed also 3,499 seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did several measurments and the runtime of those two methods didn't change much.&lt;/P&gt;&lt;P&gt;The biggest difference between both was around 0,005 seconds. Not very significant, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my conclusion is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To declare a variable in or before a loop does not have any performance inpact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;warm regards&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2015 08:11:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-11-18T08:11:27Z</dc:date>
    <item>
      <title>Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413702#M1926056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen SAP ABAP support inline declaration after release ABAP 7.4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have declare the inline statement inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;loop at it_data. &lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;data(lv_val) = 5.&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;endloop. &lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In another example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have declared the statement without inline declaration in side loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;data(ls_val) = 5.&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;loop at it_data. &lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;lv_val = 5 . &lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333330154419px;"&gt;endloop. &lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is very simple example but in case of declaration of internal table inside loop verses outside inside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I &lt;SPAN style="font-size: 10pt;"&gt;don't know how the inline declaration internally work in ABAP 7.4 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Which will give better performance and why ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413702#M1926056</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2015-11-17T16:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413703#M1926057</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;PRE&gt;&lt;CODE&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Which will give better performance and why ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the first part of your question:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it out and write a little testprogram and meassure it with SAT and please share the results with us. If there is a significant difference we can continue with the discussion...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hermann&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 16:48:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413703#M1926057</guid>
      <dc:creator>HermannGahm</dc:creator>
      <dc:date>2015-11-17T16:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413704#M1926058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hermann,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agree with your suggestion. I will post the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KR.&lt;/P&gt;&lt;P&gt;Ravishankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:25:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413704#M1926058</guid>
      <dc:creator>ravi_lanjewar</dc:creator>
      <dc:date>2015-11-17T17:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413705#M1926059</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;it seems that both variants are equal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two FORMS, one with inline declaration in a loop, one with the inline declaration before the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For significance I declared in both cases 10 variables and I used a DO 10^7 TMES loop for both variants.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whole testcase needed 7 seconds.&lt;/P&gt;&lt;P&gt;The "In Loop declaration" form needed 3,499 Seconds&lt;/P&gt;&lt;P&gt;The "Out of Loop declaration" form needed also 3,499 seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did several measurments and the runtime of those two methods didn't change much.&lt;/P&gt;&lt;P&gt;The biggest difference between both was around 0,005 seconds. Not very significant, I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my conclusion is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To declare a variable in or before a loop does not have any performance inpact.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;warm regards&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 08:11:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413705#M1926059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-11-18T08:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413706#M1926060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the &lt;A href="http://help.sap.com/abapdocu_750/en/index.htm?file=abendata_inline.htm"&gt;documentation&lt;/A&gt; says&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A valid statement with an inline declaration of a variable can generally be interpreted as a short form for a declaration statement used as a direct prefix.&lt;/LI&gt;&lt;/UL&gt;&lt;DL style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;&lt;DD style="padding-left: 30px;"&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold;"&gt;DATA var TYPE ...&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class="qtext" style="font-family: 'Courier New'; font-weight: bold;"&gt;... var ...&lt;/SPAN&gt;&lt;/DD&gt;&lt;/DL&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why should that be less performant?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declarations - whether inline or not - are evaluated at &lt;STRONG&gt;compile time&lt;/STRONG&gt; not at &lt;STRONG&gt;runtime&lt;/STRONG&gt;!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You don't need a test for that simple truth ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 11:27:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413706#M1926060</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2015-12-08T11:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413707#M1926061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;*smile*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the mistake and forgot that ABAP is simple. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought the inline declaration&amp;nbsp; determines the data type at runtime, like some other languages, so that it can be used for already declared and for generic data.&lt;/P&gt;&lt;P&gt;Type determination at runtime could (or could not) have an impact at the runtime, depending on the implementation of the compiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again i tested the simple truth and had to learn, that inline declaration can´t be used with generic data types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another day goes by, another thing learned. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way, i personaly like to test simple truths. To often the truth is hiden behind obscuring obviousness.&lt;/P&gt;&lt;P&gt;Even if sometimes the world is truly as easy as it looked like. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;warm regards&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 12:38:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413707#M1926061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-08T12:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413708#M1926062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Again i tested the simple truth and had to learn, that inline declaration can´t be used with generic data types.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Not?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FIELD-SYMBOLS &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;lt;fs&amp;gt; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;csequence&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;dobj&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&amp;lt;fs&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;-&amp;gt; dobj&lt;/SPAN&gt; hast type &lt;SPAN style="font-family: 'courier new', courier;"&gt;string&lt;/SPAN&gt;, see &lt;A href="http://help.sap.com/abapdocu_750/en/index.htm?file=abapmove.htm"&gt;assignment of data objects&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;CLASS &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;demo &lt;SPAN class="L0S52"&gt;DEFINITION&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;PUBLIC &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;SECTION&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;CLASS-METHODS &lt;/SPAN&gt;main &lt;SPAN class="L0S52"&gt;EXPORTING &lt;/SPAN&gt;p &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;numeric&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;SPAN class="L0S52"&gt;ENDCLASS&lt;/SPAN&gt;&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 style="font-family: 'courier new', courier;"&gt; &lt;SPAN class="L0S52"&gt;CLASS &lt;/SPAN&gt;demo &lt;SPAN class="L0S52"&gt;IMPLEMENTATION&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;main&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDMETHOD&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; &lt;SPAN class="L0S52"&gt;ENDCLASS&lt;/SPAN&gt;&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 style="font-family: 'courier new', courier;"&gt; &lt;SPAN class="L0S52"&gt;START-OF-SELECTION&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; demo&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;main&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;IMPORTING &lt;/SPAN&gt;p &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;dobj&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;-&amp;gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;dobj&lt;/SPAN&gt; has type &lt;SPAN style="font-family: 'courier new', courier;"&gt;decfloat64&lt;/SPAN&gt;, see &lt;A href="http://help.sap.com/abapdocu_750/en/index.htm?file=ABAPCALL_METHOD_PARAMETERS.htm"&gt;parameter passing&lt;/A&gt;.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Or what do you mean?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Cheers!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;Horst&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 12:56:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413708#M1926062</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2015-12-08T12:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413709#M1926063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;with generic i meant that not only the content but also the type of a variable is only known at runtime&lt;/P&gt;&lt;P&gt;In your examples, the data type is "known" at compile time, because the assigned data is of a defined type (csequence and numeric).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it with a assignment of a generic variable, where the type is not known at compile time .&lt;/P&gt;&lt;P&gt;---------------------------------&lt;/P&gt;&lt;P&gt;DATA: type_char TYPE char5.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;type_data&amp;gt; TYPE data.&lt;/P&gt;&lt;P&gt;type_char = 'TEST'.&lt;/P&gt;&lt;P&gt;ASSIGN type_char TO &amp;lt;type_data&amp;gt;.&lt;/P&gt;&lt;P&gt;DATA(new_var) = &amp;lt;type_data&amp;gt;.&lt;/P&gt;&lt;P&gt;---------------------------------&lt;/P&gt;&lt;P&gt;In this case &amp;lt;type_data&amp;gt; is generic and could be of any type. When i try to compile it, i get an error message, that the generic type couldn´t be used for declaration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we build this example a little bit mor complex, the compiler doesn´t have any chance to know which type the field-symbol will have at compile time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you are completly right, the inline declaration declares a variable at compile time. And then it is logical that it is not peformance relevant if the ariable is declared in or out of a loop. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Warm regards&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413709#M1926063</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-08T13:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Inline declaration inside loop and performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413710#M1926064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;SPAN style="color: #333333; font-size: 12px;"&gt;In this case &amp;lt;type_data&amp;gt; is generic and could be of any type. When i try to compile it, i get an error message, that the generic type couldn´t be used for declaration.&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Right, that's what I mean with the sentence "&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;&lt;A href="http://help.sap.com/abapdocu_750/en/index.htm?file=abendata_inline.htm"&gt;It must be possible to derive this type statically in full.&lt;/A&gt;&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any proposal, how to better express this "(not so) simple truth" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You already find a hint "&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt;If the type of a different operand cannot be identified statically (perhaps because it is specified as a generically typed field symbol), either a suitable &lt;/SPAN&gt;&lt;A class="grey" style="color: #505050; font-family: Arial; font-size: 12.8px; background-color: #fefeff;" title="Glossary Entry"&gt;standard type&lt;/A&gt;&lt;SPAN style="color: #000000; font-family: Arial; font-size: 12.8px; background-color: #fefeff;"&gt; is used or no inline declaration is possible.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Horst&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 13:27:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inline-declaration-inside-loop-and-performance/m-p/11413710#M1926064</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2015-12-08T13:27:25Z</dc:date>
    </item>
  </channel>
</rss>

