<?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: Adding one column to another table with no common fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450859#M1999481</link>
    <description>&lt;P&gt;First of all, explained like you did, this requirement has no sense at all. As Jörgen said, maybe you should provide more information about that.&lt;/P&gt;&lt;P&gt;But let's assume your pointy haired boss asked you to print two tables "in parallel". I'd try something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tab1 into data(line1).
* print line1
  check sy-tabix &amp;lt;= lines( tab2 ).
* print tab2[ sy-tabix ]
endloop.
"Matt's refactoring begins here
if lines( tab2 ) &amp;gt; lines( tab1 ).
  loop at tab2 into data(line2).
*   print line2
  endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Remember to loop the largest table to not lose information.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jun 2021 06:31:03 GMT</pubDate>
    <dc:creator>VXLozano</dc:creator>
    <dc:date>2021-06-23T06:31:03Z</dc:date>
    <item>
      <title>Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450857#M1999479</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;
  &lt;P&gt;I have these two tables, I_TABLE structure RSPARAMS &amp;amp; I_OBJECT structure VANZ. I am trying to get I_TABLE-LOW and I_OBJECT-TEXT into the same table to be able to print these two variables on the same line. However the issue I am running into is these tables have nothing in common. If there is another way to print theses variables on the same line without having them in the same table let me know. But there are multiple rows I am printing out so I need to loop through something, and if I loop through both it will create a nested loop, which I do not want.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 16:47:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450857#M1999479</guid>
      <dc:creator>former_member752221</dc:creator>
      <dc:date>2021-06-22T16:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450858#M1999480</link>
      <description>&lt;P&gt;"The tables have nothing in common", you say... I assume they have &lt;EM&gt;something &lt;/EM&gt;in common, or how do you know for which LOW you should print which TEXT?&lt;/P&gt;&lt;P&gt;Or am I totally misunderstanding? What does your data look like, and which output do you want? Can you give a minimal example?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 03:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450858#M1999480</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-06-23T03:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450859#M1999481</link>
      <description>&lt;P&gt;First of all, explained like you did, this requirement has no sense at all. As Jörgen said, maybe you should provide more information about that.&lt;/P&gt;&lt;P&gt;But let's assume your pointy haired boss asked you to print two tables "in parallel". I'd try something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tab1 into data(line1).
* print line1
  check sy-tabix &amp;lt;= lines( tab2 ).
* print tab2[ sy-tabix ]
endloop.
"Matt's refactoring begins here
if lines( tab2 ) &amp;gt; lines( tab1 ).
  loop at tab2 into data(line2).
*   print line2
  endloop.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Remember to loop the largest table to not lose information.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 06:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450859#M1999481</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-06-23T06:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450860#M1999482</link>
      <description>&lt;P&gt;That can be overcome by:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at tab1 into data(line1).
* print line1
  check sy-tabix &amp;lt;= lines( tab2 ).
* print tab2[ sy-tabix ]
endloop.

if lines( tab2 ) gt lines( tab1 ).
  loop at tab2 from lines( tab1 ) + 1.
* print tab2[ sy-tabix ]
endloop.

   &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 06:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450860#M1999482</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-06-23T06:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450861#M1999483</link>
      <description>&lt;P&gt;woooo!!&lt;BR /&gt;updating the answer&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 06:51:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450861#M1999483</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-06-23T06:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450862#M1999484</link>
      <description>&lt;P&gt;tbh, I tend to use a do loop with indexed reads of the table. &lt;/P&gt;&lt;P&gt;None of our solutions so far work with HASHED tables. An exercise for the reader, I think. &lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 09:00:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450862#M1999484</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-06-23T09:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450863#M1999485</link>
      <description>&lt;P&gt;Some day I'll check what are the benefits of non-standard tables. Call me lazy (because I am), but I declare all my internal tables as standard with empty key by default.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 09:04:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450863#M1999485</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-06-23T09:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450864#M1999486</link>
      <description>&lt;P&gt;Mainly speed when dealing with large tables. HASHED tables are good for buffering, and for COLLECT.  SORTED tables are should be used if you ever feel tempted to use BINARY SEARCH (and don't need the table to be STANDARD for use elsewhere, e.g. with an ALV).&lt;/P&gt;&lt;P&gt;Btw, SORT with an empty key does nothing (assuming you've used TYPE STANDARD TABLE OF blah WITH EMPTY KEY).&lt;/P&gt;&lt;P&gt;Always using INSERT INTO TABLE, never APPEND, since the former works will all table types and the latter only STANDARD.&lt;/P&gt;&lt;P&gt;But for most purposes STANDARD is fine.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:33:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450864#M1999486</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-06-23T11:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding one column to another table with no common fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450865#M1999487</link>
      <description>&lt;P&gt;Up to now I have no problems with performance (in my developments, soon I'll have to face one that scares me because it's a spaghetti mess).&lt;BR /&gt;About the SORT, I never understood why people use it without a fields list. "sort by default" looks like a way to disaster. Same with ORDER BY and things like these.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 11:38:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/adding-one-column-to-another-table-with-no-common-fields/m-p/12450865#M1999487</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2021-06-23T11:38:56Z</dc:date>
    </item>
  </channel>
</rss>

