<?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: Inner Join with string operation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044378#M1701331</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krithika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can perform the same operation after getting all data into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Oct 2012 04:19:57 GMT</pubDate>
    <dc:creator>amol_samte</dc:creator>
    <dc:date>2012-10-18T04:19:57Z</dc:date>
    <item>
      <title>Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044376#M1701329</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;Is the below scenario possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select a~field 1 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a~field 2&lt;/P&gt;&lt;P&gt;from ( ( table1 as a inner join table 2 as b on&lt;/P&gt;&lt;P&gt;a~field3 = b~field 3) inner join table 3 as c&lt;/P&gt;&lt;P&gt;on c~field 4 = a~field4+2(4) )&lt;/P&gt;&lt;P&gt;into table internal table1&lt;/P&gt;&lt;P&gt;where a~field 5 = 'XYZ'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When syntax is checked, SAP return with the error a~field4 is unknown. Is this because string operation is not allowed in case of Joins or is my syntax wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 03:56:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044376#M1701329</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T03:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044377#M1701330</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;on c~field 4 = a~field4&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;+2(4)&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; is not allowed on inner join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 04:12:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044377#M1701330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-18T04:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044378#M1701331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krithika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can perform the same operation after getting all data into internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 04:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044378#M1701331</guid>
      <dc:creator>amol_samte</dc:creator>
      <dc:date>2012-10-18T04:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044379#M1701332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in inner join condition you cant but in where condition you can put offset specification in right hand side condition where you wrote 'XYZ', but some time it will give warning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Standard practice is do not put offset specification in select query, do all these kind of operation in internal table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 04:57:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044379#M1701332</guid>
      <dc:creator>former_member194152</dc:creator>
      <dc:date>2012-10-18T04:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044380#M1701333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use For All Entries as it is considered better to use FOR ALL ENTRIES than opting fo r JOIN statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 05:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044380#M1701333</guid>
      <dc:creator>former_member214709</dc:creator>
      <dc:date>2012-10-18T05:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044381#M1701334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain your opinion, as from my experience JOIN get almost always better performance than FOR ALL ENTRIES as soon as there are many records in the internal tables or not de the full primary key provided, also look at some blog like excellent Rob's&amp;nbsp; &lt;A _jive_internal="true" href="https://answers.sap.com/community/abap/testing-and-troubleshooting/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better"&gt;JOINS vs. FOR ALL ENTRIES - Which Performs Better?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 06:18:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044381#M1701334</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-10-18T06:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044382#M1701335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you did not go through the blog properly, in the end the result the author quoted was:&lt;/P&gt;&lt;P&gt;There are other considerations that come into play as well:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;INNER JOINs only look at the intersection of the results that meet the WHERE clause.&lt;/LI&gt;&lt;LI&gt;FOR ALL ENTRIES eliminates duplicates from the results.&lt;/LI&gt;&lt;LI&gt;I find JOINs to be more time consuming to code. (I can never find the “~” key.)&lt;/LI&gt;&lt;LI&gt;When using FOR ALL ENTRIES you generally end up with at least two internal tables. This may or may not be a good thing.&lt;/LI&gt;&lt;LI&gt;The example I have shown uses the full primary key. Some preliminary testing I have done comparing JOINs with FOR ALL ENTRIES show that FOR ALL ENTRIES can give better performance in that case.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 08:16:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044382#M1701335</guid>
      <dc:creator>former_member214709</dc:creator>
      <dc:date>2012-10-18T08:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044383#M1701336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read this document carefully (a long time ago), but the first part of the answer was refering to my (humble) experience, then I added a reference to experience of another member of the community, no problem &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1031/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I mostly use FOR ALL ENTRIES when the set is of relative small size, or when I don't have other option (I dislike those cluster/pool tables, legacy from another time &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/1031/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I became, for two years now, addict on subqueries which can habve better performance than join if data is not required but only selection criteria, also they can help balancing the load between database and application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Also I mapped the '~' on my keyboard to a free key..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2012 08:30:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044383#M1701336</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2012-10-18T08:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Inner Join with string operation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044384#M1701337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Hello,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I got it with new open SQL Syntax avalaible from enhancement 740.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;For example:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Table ZHR_EXAMPLE_TABLE2 has the column ID_EMPLEADO with 6 characters instead of 8 like PERNR in table ZHR_EXAMPLE_TABLE1.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;T0~COLUMN1, T0~COLUMN2, T0~COLUMN3, T0~COLUM4, T1~COLUMN1 AS COLUMRESULT, T1~PERNR&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM ZHR_EXAMPLE_TABLE1 AS T0&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;INNER JOIN ZHR_EXAMPLE_TABLE2 AS T1 ON &lt;STRONG&gt;SUBSTRING( T1~PERNR,3,6 ) = T0~ID_EMPLEADO&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;WHERE T0~IDPARTE = @ZIDPARTE AND T1~BEGDA LE T0~FECHA AND T1~ENDDA GE T0~FECHA&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;INTO CORRESPONDING FIELDS OF TABLE @ITAB.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;your code with the internal table itab&amp;gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;ENDIF.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Instead of "&lt;SPAN style="font-size: 13.3333px;"&gt;INTO CORRESPONDING FIELDS OF TABLE @ITAB&lt;/SPAN&gt;"&amp;nbsp; you can use "INTO TABLE @DATA(result)". With result no declarated before, the result of the select will be in the that table.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I hope it can be useful for someone.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Kind regards,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Julian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 07:06:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-with-string-operation/m-p/9044384#M1701337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-10-03T07:06:45Z</dc:date>
    </item>
  </channel>
</rss>

