<?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 Example of code inside new for iteration in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791750#M2024353</link>
    <description>&lt;P&gt;Hello every one,&lt;/P&gt;
  &lt;P&gt;could you please provide some examples of code inside a for iteration cycle?&lt;/P&gt;
  &lt;P&gt;With new abap code we can substitute loop with for to make iteration faster but how can i write code inside the iteration?&lt;/P&gt;
  &lt;P&gt;With loop:&lt;/P&gt;
  &lt;P&gt;Loop at itab assigning field-symbols(&amp;lt;fs&amp;gt;).&lt;/P&gt;
  &lt;P&gt;Write your code i.e perform o call function or any other code.&lt;/P&gt;
  &lt;P&gt;endloop.&lt;/P&gt;
  &lt;P&gt;How can I write my code inside for cycle? &lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2023 09:20:58 GMT</pubDate>
    <dc:creator>Pier_1973</dc:creator>
    <dc:date>2023-09-19T09:20:58Z</dc:date>
    <item>
      <title>Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791750#M2024353</link>
      <description>&lt;P&gt;Hello every one,&lt;/P&gt;
  &lt;P&gt;could you please provide some examples of code inside a for iteration cycle?&lt;/P&gt;
  &lt;P&gt;With new abap code we can substitute loop with for to make iteration faster but how can i write code inside the iteration?&lt;/P&gt;
  &lt;P&gt;With loop:&lt;/P&gt;
  &lt;P&gt;Loop at itab assigning field-symbols(&amp;lt;fs&amp;gt;).&lt;/P&gt;
  &lt;P&gt;Write your code i.e perform o call function or any other code.&lt;/P&gt;
  &lt;P&gt;endloop.&lt;/P&gt;
  &lt;P&gt;How can I write my code inside for cycle? &lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 09:20:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791750#M2024353</guid>
      <dc:creator>Pier_1973</dc:creator>
      <dc:date>2023-09-19T09:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791751#M2024354</link>
      <description>&lt;P&gt;I never used FOR expressions in ABAP so far.&lt;BR /&gt;But as far as I understood, it can be only used to fill data from one internal table to another:&lt;BR /&gt;&lt;A href="https://blogs.sap.com/2017/11/08/for-expression-in-abap-7.40-best-case-scenarios/" target="test_blank"&gt;https://blogs.sap.com/2017/11/08/for-expression-in-abap-7.40-best-case-scenarios/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From my point of view, you can't perform a CALL FUNCTION etc. inside the FOR statement.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 09:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791751#M2024354</guid>
      <dc:creator>thkolz</dc:creator>
      <dc:date>2023-09-19T09:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791752#M2024355</link>
      <description>&lt;P&gt;Hi Kolz, thanks for your reply.&lt;/P&gt;&lt;P&gt;I thought as much.&lt;/P&gt;&lt;P&gt;Since I must process more than 80.000 items in a loop, the best way is to parallel processing or to divide this iteration into short ranges of records.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 09:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791752#M2024355</guid>
      <dc:creator>Pier_1973</dc:creator>
      <dc:date>2023-09-19T09:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791753#M2024356</link>
      <description>&lt;P&gt;It's bad programming in my view but:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA(something) = VALUE #( FOR wa IN Itab ( zmy_class-&amp;gt;mymethod( wa ) ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and have mymethod have some kind of side-effect. E.g. calling a function module.&lt;/P&gt;&lt;P&gt;Oh, and PERFORM is obsolete in most circumstances. Don't use it.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 10:03:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791753#M2024356</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2023-09-19T10:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791754#M2024357</link>
      <description>&lt;P&gt;Where did you find this myth? ("With new abap code we can substitute loop with for to make iteration faster")&lt;/P&gt;&lt;P&gt;I guess many people are mistaken about what are Constructor Expressions for...&lt;/P&gt;&lt;P&gt;Maybe you'd better ask this question: "why should ABAP developers use Constructor Expressions instead of older syntax? In what situations?"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 11:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791754#M2024357</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-09-19T11:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791755#M2024358</link>
      <description>&lt;P&gt;Hello Matthew,&lt;/P&gt;&lt;P&gt;I see.&lt;/P&gt;&lt;P&gt;I named perform only to explain all and ask if it was possible to add code into for cycle and replace loop with for.&lt;/P&gt;&lt;P&gt;However, please, since we are here, what do you suggest to replace the obsolete calling perform?&lt;/P&gt;&lt;P&gt;In any case, the for cycle is indicated to fill data into a different table from another one, but if we have to make different code, the best way is to use loop. Doesn't it?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 14:32:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791755#M2024358</guid>
      <dc:creator>Pier_1973</dc:creator>
      <dc:date>2023-09-19T14:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Example of code inside new for iteration</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791756#M2024359</link>
      <description>&lt;P&gt;Use classes and methods instead of performs. Note: this is &lt;EM&gt;only&lt;/EM&gt; in new code. Not legacy.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 15:27:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/example-of-code-inside-new-for-iteration/m-p/12791756#M2024359</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2023-09-19T15:27:50Z</dc:date>
    </item>
  </channel>
</rss>

