<?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 Create View from three tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408001#M196791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have three tables : &lt;/P&gt;&lt;P&gt;KONDD&lt;/P&gt;&lt;P&gt;KOTD001&lt;/P&gt;&lt;P&gt;KOTD002 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a view that : gets all the records from the KONDD for both the tables :&lt;/P&gt;&lt;P&gt;All the records for KOTD001-knumh = kondd-knumh &lt;/P&gt;&lt;P&gt;All the records for kotd002-knumh = kondd-knumh . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible ? Is there any other way out ?&lt;/P&gt;&lt;P&gt;because when i created view and gave the join condition :&lt;/P&gt;&lt;P&gt;KOTD001-knumh = kondd-knumh it worked good and got all the records from kondd for kotd001 . Then  I added one more row in join cond for : kotd002-knumh = kondd-knumh ..it dint work !!&lt;/P&gt;&lt;P&gt;I want to know if there is any possibility of specifying an 'OR' condition while fetching the data ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Jul 2006 15:07:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-21T15:07:15Z</dc:date>
    <item>
      <title>Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408001#M196791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have three tables : &lt;/P&gt;&lt;P&gt;KONDD&lt;/P&gt;&lt;P&gt;KOTD001&lt;/P&gt;&lt;P&gt;KOTD002 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a view that : gets all the records from the KONDD for both the tables :&lt;/P&gt;&lt;P&gt;All the records for KOTD001-knumh = kondd-knumh &lt;/P&gt;&lt;P&gt;All the records for kotd002-knumh = kondd-knumh . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible ? Is there any other way out ?&lt;/P&gt;&lt;P&gt;because when i created view and gave the join condition :&lt;/P&gt;&lt;P&gt;KOTD001-knumh = kondd-knumh it worked good and got all the records from kondd for kotd001 . Then  I added one more row in join cond for : kotd002-knumh = kondd-knumh ..it dint work !!&lt;/P&gt;&lt;P&gt;I want to know if there is any possibility of specifying an 'OR' condition while fetching the data ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 15:07:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408001#M196791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T15:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408002#M196792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give it as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;kondd-knumh  = KOTD001-knumh
kondd-knumh  = kotd002-knumh&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thomas.&lt;/P&gt;&lt;P&gt;Please mark points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 15:13:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408002#M196792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T15:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408003#M196793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When i do this : &lt;/P&gt;&lt;P&gt;It says no table entry found . &lt;/P&gt;&lt;P&gt;Only with one condition , it gets the record ..but for this it looks like it does an AND...? &lt;/P&gt;&lt;P&gt;any way out ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 15:18:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408003#M196793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T15:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408004#M196794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Database view implement Inner join, so if you create a view like you've mentioned you don't get any records because If KNUMH exist in one table it doesn't exist in other condition table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to write a outer join select statement in the abap program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 15:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408004#M196794</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-07-21T15:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408005#M196795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a veiw with sap tables successfully. Can you check whether you have given &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;View field
Table name
Table field&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;              under view field.&lt;/P&gt;&lt;P&gt;These are the fields which you are going to display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Thomas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Thomas Mann&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 15:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408005#M196795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T15:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408006#M196796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes , i have given the same ....it worked well for one join condition and got the records for kotd001-knumh = kondd-knumh...!! &lt;/P&gt;&lt;P&gt;could you create a view that is getting all the records from kondd for all in KOTD001 and KOTD002???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 15:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408006#M196796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T15:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408007#M196797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes dude &lt;/P&gt;&lt;P&gt;it will work fine for these 3 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Give 3 table names&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) conditions as&lt;/P&gt;&lt;P&gt;kondd-knumh  = KOTD001-knumh&lt;/P&gt;&lt;P&gt;kondd-knumh  = kotd002-knumh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Fields which you want to display. (select all the key fields in all the tables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;View field&lt;/P&gt;&lt;P&gt;Table name&lt;/P&gt;&lt;P&gt;Table field&lt;/P&gt;&lt;P&gt; under view fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Manually go and check there is a common knumh in all the 3 tables. If so it will display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Thomas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408007#M196797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408008#M196798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas , &lt;/P&gt;&lt;P&gt;Thanks much ...:) but , the problem is that : &lt;/P&gt;&lt;P&gt;the knumh is not common (value wise ) in the three...&lt;/P&gt;&lt;P&gt;KONDD has all the records ( base table ) &lt;/P&gt;&lt;P&gt;and kotd001 and kotd002 have diff set of knumhs in them . &lt;/P&gt;&lt;P&gt;I wanted to put a condition which would fetch all the records frrom KONDD if the knodd-knumh matched with any of the knumh ( knotd001 or kotd002)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:14:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408008#M196798</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408009#M196799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sridhar, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; I am looking for the outer join thing....i cant find how to write the select statement for outer join on multiple(three) tables ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: SAP BEE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:15:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408009#M196799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408010#M196800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might need to use outer joins since if one of the table does not have the corresponding entry it would result in no records. I feel it is precisely the reason for your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408010#M196800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408011#M196801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for outer joins you can write it as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT a.x a.y b.z&lt;/P&gt;&lt;P&gt;from abcd as  a&lt;/P&gt;&lt;P&gt;outer join xyz as b on a.x = b.z;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:26:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408011#M196801</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408012#M196802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT c~SMATN&lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;       FROM KONDD AS c&lt;/P&gt;&lt;P&gt;         left outer JOIN KOTD001 AS P ON p&lt;SUB&gt;KNUMH = C&lt;/SUB&gt;KNUMH&lt;/P&gt;&lt;P&gt;         left outer join kotd002 as z on z&lt;SUB&gt;knumh = c&lt;/SUB&gt;knumh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, whether i give the second join expression or not ...It already fetches all the records from table kondd ...its almost like doing a select w/o any condition on kondd..??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408012#M196802</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408013#M196803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, outer join fetches all records from KONDD, and you need to delete duplicate records later from itab, best way is to write two seperate inner join select statements and append the resulting internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408013#M196803</guid>
      <dc:creator>sridhar_k1</dc:creator>
      <dc:date>2006-07-21T16:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408014#M196804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Outer join will select all the records from all the condition with KNUMH value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;TM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:33:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408014#M196804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408015#M196805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry just a typo error in the previous reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is an example for left outer join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select A~VBELN&lt;/P&gt;&lt;P&gt;         B~POSNR&lt;/P&gt;&lt;P&gt;         A~VSTEL&lt;/P&gt;&lt;P&gt;         A~VKORG&lt;/P&gt;&lt;P&gt;         B~VTWEG&lt;/P&gt;&lt;P&gt;         A~KUNNR&lt;/P&gt;&lt;P&gt;         A~LFART&lt;/P&gt;&lt;P&gt;         A~VBTYP&lt;/P&gt;&lt;P&gt;         A~LIFEX&lt;/P&gt;&lt;P&gt;         B~MATNR&lt;/P&gt;&lt;P&gt;         B~LFIMG&lt;/P&gt;&lt;P&gt;         B~ARKTX&lt;/P&gt;&lt;P&gt;         A~ROUTE&lt;/P&gt;&lt;P&gt; from LIKP as A left outer join LIPS as B&lt;/P&gt;&lt;P&gt; on A&lt;SUB&gt;VBELN = B&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt; into LIKP&lt;/P&gt;&lt;P&gt; where A~LIFEX in SO_LIFEX&lt;/P&gt;&lt;P&gt;   and A~KUNNR in SO_KUNNR&lt;/P&gt;&lt;P&gt;   and A~VBELN in SO_VBELN&lt;/P&gt;&lt;P&gt;   and A~VBTYP eq 'J'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 16:36:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408015#M196805</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T16:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Create View from three tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408016#M196806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone ...thankx for all the replies. I m assigning the points and closing the thread : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Sridhar ...I finally created a report program ur way ...!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2006 18:43:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-from-three-tables/m-p/1408016#M196806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-21T18:43:24Z</dc:date>
    </item>
  </channel>
</rss>

