<?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: Copy one Internal table data to another without loop in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341804#M1992192</link>
    <description>&lt;P&gt;If your question is answered then please accept the answer (see &lt;A href="https://blogs.sap.com/2017/08/15/what-to-do-with-my-answered-questions/"&gt;this blog&lt;/A&gt;). Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 17:21:45 GMT</pubDate>
    <dc:creator>Jelena_Perfiljeva</dc:creator>
    <dc:date>2021-02-08T17:21:45Z</dc:date>
    <item>
      <title>Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341797#M1992185</link>
      <description>&lt;P&gt;HI Experts,&lt;/P&gt;
  &lt;P&gt;I have some data it_tab1(with 3 columns A,B and C) and want to update this data into it_tab2(with 4 columns A,X,Y,Z) as below. &lt;/P&gt;
  &lt;P&gt;A= A&lt;/P&gt;
  &lt;P&gt;X = A+B&lt;/P&gt;
  &lt;P&gt;Y = "Hello"&lt;/P&gt;
  &lt;P&gt;Z = First 4 characters of C&lt;/P&gt;
  &lt;P&gt;We are using advanced ABAP and want to update it_tab2 without loop. Could you please help with the logic? &lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 11:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341797#M1992185</guid>
      <dc:creator>former_member710665</dc:creator>
      <dc:date>2021-02-04T11:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341798#M1992186</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;At first I was thinking about the &lt;A href="https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenconstructor_expr_corresponding.htm" target="_blank"&gt;CORRESPONDING operator&lt;/A&gt; with the mapping addition. But I'm not aware of any option of doing for instance A+B or First 4 Characters of C in it. I don't think so, based on the nature of that operator, but somebody might have an idea... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So then it depends on your definition of "without loop". I mean, technically, this is a looping technique, but it's not a LOOP statement in ABAP:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;it_tab2 = VALUE #( FOR tab1 IN it_tab1
                   ( a = tab1-a
                     x = |{ tab1-a }{ tab1-b }|
                     y = 'Hello'
                     z = substring( val = tab1-c off = 0 len = 4 ) ) ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 11:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341798#M1992186</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-02-04T11:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341799#M1992187</link>
      <description>&lt;P&gt;Thanks Jorgen, I am trying to improve performance so looking for any alternate solution which improves performance.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 12:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341799#M1992187</guid>
      <dc:creator>former_member710665</dc:creator>
      <dc:date>2021-02-04T12:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341800#M1992188</link>
      <description>&lt;P&gt;Got it. That would depend mainly on what you do INSIDE of the loop, I would say...Not the loop itself...&lt;/P&gt;&lt;P&gt;For instance, SELECT SINGLE inside a loop is bad. SELECT everything first and then READing internal table (with a proper key) inside the loop will be better.&lt;/P&gt;&lt;P&gt;Also proper table types are increasingly more important for performance when the tables grow in size.&lt;/P&gt;&lt;P&gt;If you're willing to share the code for your loop, we might be able to help you more... And also the sizes of your tables and the performance requirements. Or is what you shared exactly your business requirement?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 12:37:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341800#M1992188</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-02-04T12:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341801#M1992189</link>
      <description>&lt;P&gt;Anyway, it doesn't make much sense to use CORRESPONDING when it's about only one common component. I don't think CORRESPONDING is for making calculations, VALUE is the only appropriate solution.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 12:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341801#M1992189</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-02-04T12:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341802#M1992190</link>
      <description>&lt;P&gt;Is it an option to move these calculations to the SQL statement that fills your [it_tab1]?&lt;/P&gt;&lt;P&gt;And anyway, the question you need to ask as well is if the LOOP statement is really less performant as the VALUE one. If you have a million lines in your internal table, there are a million records to deal with.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 12:44:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341802#M1992190</guid>
      <dc:creator>Patrick_vN</dc:creator>
      <dc:date>2021-02-04T12:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341803#M1992191</link>
      <description>&lt;P&gt;Thanks all for your inputs!!!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 07:15:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341803#M1992191</guid>
      <dc:creator>former_member710665</dc:creator>
      <dc:date>2021-02-08T07:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Copy one Internal table data to another without loop</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341804#M1992192</link>
      <description>&lt;P&gt;If your question is answered then please accept the answer (see &lt;A href="https://blogs.sap.com/2017/08/15/what-to-do-with-my-answered-questions/"&gt;this blog&lt;/A&gt;). Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 17:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/copy-one-internal-table-data-to-another-without-loop/m-p/12341804#M1992192</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2021-02-08T17:21:45Z</dc:date>
    </item>
  </channel>
</rss>

