<?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: Joining Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321280#M509649</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get the object class in TCDOB Table by using table name BKPF and enter object class in CDHDR ,you will get idea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2007 14:33:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-23T14:33:05Z</dc:date>
    <item>
      <title>Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321275#M509644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select MANDT BUKRS BELNR BLART BLDAT BUDAT CPUDT AEDAT OBJECTCLAS USERNAME UDATE UTIME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    From BKPF INNER JOIN CDHDR on OBJECTCLAS = MANDT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    into corresponding fields of wa_BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i am getting an error saying that MANDT doesnt exist in any of the tables but it does exist in BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW the join would bring back no results but its just a test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321275#M509644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321276#M509645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Join should be this way....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select BKPF~MANDT BUKRS BELNR BLART BLDAT BUDAT CPUDT AEDAT OBJECTCLAS USERNAME UDATE UTIME
INTO TABLE T_DATA
From ( BKPF INNER JOIN CDHDR 
           on BKPF~MANDT = CDHDR~MANDT )
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you would need to include the Client Specified condition....And...Why use MANDT as the join key???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:12:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321276#M509645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321277#M509646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I dont want to use MANDT it was just a test to see if i have my sintax was correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:16:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321277#M509646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321278#M509647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; Hi&lt;/P&gt;&lt;P&gt;&amp;gt; I dont want to use MANDT it was just a test to see if&lt;/P&gt;&lt;P&gt;&amp;gt; i have my sintax was correct&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok -:) So you need to find the keys to join both tables and use the sintax that I posted -;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:23:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321278#M509647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321279#M509648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dunne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Joins, ON condition will be used to join the tables, generally it will have the common field between the tables which can join on tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this sample program.&lt;/P&gt;&lt;P&gt;TYPES : BEGIN OF int_table_type,&lt;/P&gt;&lt;P&gt;carrid LIKE sflight-carrid,&lt;/P&gt;&lt;P&gt;connid LIKE sflight-connid,&lt;/P&gt;&lt;P&gt;fldate LIKE sflight-fldate,&lt;/P&gt;&lt;P&gt;price LIKE sflight-price,&lt;/P&gt;&lt;P&gt;seatsmax LIKE sflight-seatsmax,&lt;/P&gt;&lt;P&gt;seatsocc LIKE sflight-seatsocc,&lt;/P&gt;&lt;P&gt;cityfrom LIKE spfli-cityfrom,&lt;/P&gt;&lt;P&gt;cityto LIKE spfli-cityto,&lt;/P&gt;&lt;P&gt;END OF int_table_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: itab1 TYPE TABLE OF int_table_type WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT * &lt;/P&gt;&lt;P&gt;INTO CORRESPONDING &lt;/P&gt;&lt;P&gt;FIELDS OF TABLE itab1&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;sflight AS a1&lt;/P&gt;&lt;P&gt;INNER JOIN &lt;/P&gt;&lt;P&gt;spfli AS b1&lt;/P&gt;&lt;P&gt;ON a1&lt;SUB&gt;carrid = b1&lt;/SUB&gt;carrid&lt;/P&gt;&lt;P&gt;AND a1&lt;SUB&gt;connid = b1&lt;/SUB&gt;connid.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / itab1-carrid,&lt;/P&gt;&lt;P&gt;itab1-connid,&lt;/P&gt;&lt;P&gt;itab1-fldate,&lt;/P&gt;&lt;P&gt;itab1-price,&lt;/P&gt;&lt;P&gt;itab1-seatsmax,&lt;/P&gt;&lt;P&gt;itab1-seatsocc,&lt;/P&gt;&lt;P&gt;itab1-cityfrom,&lt;/P&gt;&lt;P&gt;itab1-cityto.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321279#M509648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321280#M509649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get the object class in TCDOB Table by using table name BKPF and enter object class in CDHDR ,you will get idea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:33:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321280#M509649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321281#M509650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The OBJECTCLAS field in CDHDR is a concatenation of the fields MANDT BUKRS BELNR GJAHR in BKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how i make this join?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry if my questions are basic, i am brand new to this and this is my first program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:34:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321281#M509650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321282#M509651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Mandt is the field which represents the table is client specific.&lt;/P&gt;&lt;P&gt;when even u r joining 2 tables no need to use mandt.&lt;/P&gt;&lt;P&gt;And u said objectcals is concatination of few fields in bkpf.&lt;/P&gt;&lt;P&gt;in this concept inner join or outer join never works.&lt;/P&gt;&lt;P&gt;There shoul b atleast one key field relating both the tables.&lt;/P&gt;&lt;P&gt;ex : take kna1 an vbak.&lt;/P&gt;&lt;P&gt;key field is kunnr.&lt;/P&gt;&lt;P&gt;like this u need to check the foreign key b/w the tables u want to join b4 appling joins concept on them.&lt;/P&gt;&lt;P&gt;feel free to ask for elobarated info , if u r still not sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2007 14:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321282#M509651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-23T14:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321283#M509652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2007 09:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/joining-tables/m-p/2321283#M509652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-24T09:48:04Z</dc:date>
    </item>
  </channel>
</rss>

