<?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: Join tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660341#M881647</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;Find the check table of the promary keys of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to find the common fields from one of the check tables of the primary keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, &lt;/P&gt;&lt;P&gt;If you want to join tables A and B.&lt;/P&gt;&lt;P&gt;Both tables don't contain common fields.&lt;/P&gt;&lt;P&gt;A has primary key fields X and Y.&lt;/P&gt;&lt;P&gt;go to check table of X or Y.&lt;/P&gt;&lt;P&gt;Let check table of X is C.&lt;/P&gt;&lt;P&gt;check any field in C which are exist in table B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join tables A and C.&lt;/P&gt;&lt;P&gt;Based on this pick the data from B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Apr 2008 04:43:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-21T04:43:14Z</dc:date>
    <item>
      <title>Join tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660339#M881645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to join tables without having common fields,I am facing this problem several times I don't know how to fetch  the data from these tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;regds,&lt;/P&gt;&lt;P&gt;sree.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 04:25:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660339#M881645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T04:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660340#M881646</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;Why do you want to join tables if you dont have any condition specified. Select the entries separately and proceed with the query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have such a query,post the requirement here.We could try and help your problem get solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 04:32:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660340#M881646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T04:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660341#M881647</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;Find the check table of the promary keys of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to find the common fields from one of the check tables of the primary keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, &lt;/P&gt;&lt;P&gt;If you want to join tables A and B.&lt;/P&gt;&lt;P&gt;Both tables don't contain common fields.&lt;/P&gt;&lt;P&gt;A has primary key fields X and Y.&lt;/P&gt;&lt;P&gt;go to check table of X or Y.&lt;/P&gt;&lt;P&gt;Let check table of X is C.&lt;/P&gt;&lt;P&gt;check any field in C which are exist in table B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join tables A and C.&lt;/P&gt;&lt;P&gt;Based on this pick the data from B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 04:43:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660341#M881647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T04:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Join tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660342#M881648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my query ,I am using ADDRNUMBER to join LFA1 and ADRC but LFA1 having the field ADRNR how to join these tables,I need to join LFM1,ADRC,ADR6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZMMTEST2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables:lfm1,lfa1,adrc,adr6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab1 type lfm1 occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab2 type lfa1 occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab3 type adrc occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : itab4 type adr6 occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of Itab occurs 0,&lt;/P&gt;&lt;P&gt;       lifnr like lfm1-lifnr,&lt;/P&gt;&lt;P&gt;       ekorg like lfm1-ekorg,&lt;/P&gt;&lt;P&gt;       ernam like lfm1-ernam,&lt;/P&gt;&lt;P&gt;       ekgrp like lfm1-ekgrp,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      lifnr like lfa1-lifnr,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       adrnr like lfa1-adrnr,&lt;/P&gt;&lt;P&gt;       addrnumber like adrc-addrnumber,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      addrnumber like adr6-addrnumber,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       smtp_addr  like adr6-smtp_addr,&lt;/P&gt;&lt;P&gt;     end of itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a&lt;SUB&gt;lifnr a&lt;/SUB&gt;ekorg a&lt;SUB&gt;ernam a&lt;/SUB&gt;ekgrp b&lt;SUB&gt;lifnr b&lt;/SUB&gt;adrnr  c&lt;SUB&gt;ADDRNUMBER  d&lt;/SUB&gt;ADDRNUMBER d~SMTP_ADDR&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;       FROM ( ( lfm1 AS a&lt;/P&gt;&lt;P&gt;         INNER JOIN lfa1 AS b ON a&lt;SUB&gt;lifnr   = b&lt;/SUB&gt;lifnr )&lt;/P&gt;&lt;P&gt;         INNER JOIN lfm1 AS c ON b&lt;SUB&gt;adrnr = c&lt;/SUB&gt;ADDRNUMBER )&lt;/P&gt;&lt;P&gt;         INNER JOIN adrc AS d ON c&lt;SUB&gt;ADDRNUMBER   = d&lt;/SUB&gt;ADDRNUMBER ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&amp;amp;regds,&lt;/P&gt;&lt;P&gt;Sree.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Apr 2008 04:49:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/join-tables/m-p/3660342#M881648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-21T04:49:54Z</dc:date>
    </item>
  </channel>
</rss>

