<?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 problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123730#M445493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are field like MBLNR, MJAHR which are common in both the tables.&lt;/P&gt;&lt;P&gt;Even if some of the field names are not same, if there data element or domain is same u can put inner join condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award point if benefited&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Apr 2007 06:02:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-10T06:02:20Z</dc:date>
    <item>
      <title>inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123723#M445486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I have to make a INNERJOIN on "MKPF AND MSEG" table to select the fields from both tables into one "INTERNAL TABLE"   but there is no relationship exist between these two tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz help how i can do it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;surity for points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 05:55:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123723#M445486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T05:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123724#M445487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi gaurav,&lt;/P&gt;&lt;P&gt;      if there is no relation then it is not possible to use inner joins.There should be some relation in between the two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arun.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 05:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123724#M445487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T05:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123725#M445488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;material Document no and year are the link between these tables. MBLNR and MJAHR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 05:58:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123725#M445488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T05:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123726#M445489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Select a&lt;SUB&gt;mblnr a&lt;/SUB&gt;mjahr b&lt;SUB&gt;zeile  b&lt;/SUB&gt;bwart b&lt;SUB&gt;ebeln b&lt;/SUB&gt;ebelp b~erfmg &lt;/P&gt;&lt;P&gt;into table ITAB &lt;/P&gt;&lt;P&gt;from mkpf as a join MSEG as b on&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;mblnr = b&lt;/SUB&gt;mblnr and&lt;/P&gt;&lt;P&gt;a&lt;SUB&gt;mjahr = b&lt;/SUB&gt;mjahr&lt;/P&gt;&lt;P&gt;where  a~mjahr = p_year&lt;/P&gt;&lt;P&gt;b~ebeln in S_ebeln..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 05:59:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123726#M445489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T05:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123727#M445490</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;   In both tables MBLNR was common field.U can use this field in inner join to get relationship between these two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls give reward if it helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;vana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123727#M445490</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123728#M445491</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;MKPF is the header table for material documents, whereas MSEG is the item table for material documents. You can very well join these two tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the key fields in the MKPF table, MBLNR and MJAHR.&lt;/P&gt;&lt;P&gt;These two fields are also the key fields in MSEG table apart from the third field ZEILE(Item number).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, you can make a join based on the key fields of the MKPF table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;reward all useful answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123728#M445491</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123729#M445492</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;there is relation between these 2 tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select based on the material doc no i.e. MBLNR&lt;/P&gt;&lt;P&gt;select a&lt;SUB&gt;a1 b&lt;/SUB&gt;b1 from mseg  as a inner join mkpf as b&lt;/P&gt;&lt;P&gt;on a&lt;SUB&gt;mblnr = b&lt;/SUB&gt;mblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sonika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123729#M445492</guid>
      <dc:creator>former_member632991</dc:creator>
      <dc:date>2007-04-10T06:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123730#M445493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are field like MBLNR, MJAHR which are common in both the tables.&lt;/P&gt;&lt;P&gt;Even if some of the field names are not same, if there data element or domain is same u can put inner join condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Award point if benefited&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123730#M445493</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123731#M445494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;only mblnr field is sufficient for the innerjoin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:05:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123731#M445494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123732#M445495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;gaurav,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select s&lt;SUB&gt;mblnr s&lt;/SUB&gt;mjahr s&lt;SUB&gt;bwart s&lt;/SUB&gt;matnr s&lt;SUB&gt;werks s&lt;/SUB&gt;menge &lt;/P&gt;&lt;P&gt;appending corresponding fields of table t_mseg &lt;/P&gt;&lt;P&gt;from mseg as s inner join mkpf as k &lt;/P&gt;&lt;P&gt;on s&lt;SUB&gt;mblnr = k&lt;/SUB&gt;mblnr and &lt;/P&gt;&lt;P&gt;s&lt;SUB&gt;mjahr = k&lt;/SUB&gt;mjahr &lt;/P&gt;&lt;P&gt;where &lt;/P&gt;&lt;P&gt;         conditions....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLs. reward if useful..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:10:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123732#M445495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123733#M445496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use select query like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select mkpf&lt;SUB&gt;----&lt;/SUB&gt;&lt;/P&gt;&lt;HR originaltext="------" /&gt; mseg----&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="------------" /&gt;&lt;P&gt; into table itab from mkpf inner join mseg on mkpf&lt;SUB&gt;mblnr = mseg&lt;/SUB&gt;mblnr where -&lt;/P&gt;&lt;HR originaltext="-----------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:11:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123733#M445496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123734#M445497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks to everybody for your help but i got struck in another problem related to "where condition"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) i have to select mblnr , mjahr and budat from MKPF into itab (internal table) for user input in the selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                        +++(Inner join)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select zeile,bwart,matnr,werks,lgort,charg,sobkz,erfmg,erfme,kzbew,kzvbr,kzzug,shkzg from MSEG into itab(internal table) for user input in the selection screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) now i got confused in "For user input in the selection screen " because at selection screen i have only following fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matnr , werks , lgort,charg,lifnr,kunnr,bwart,sobkz,usnam,vgart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i am using a query like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select a-mblnr&lt;/P&gt;&lt;P&gt;       a-mjahr &lt;/P&gt;&lt;P&gt;       a-budat &lt;/P&gt;&lt;P&gt;       b-zeile&lt;/P&gt;&lt;P&gt;       b-bwart&lt;/P&gt;&lt;P&gt;       b-matnr &lt;/P&gt;&lt;P&gt;       b-werks &lt;/P&gt;&lt;P&gt;       b-lgort&lt;/P&gt;&lt;P&gt;       b-charg &lt;/P&gt;&lt;P&gt;       b-sobkz&lt;/P&gt;&lt;P&gt;       b-erfmg &lt;/P&gt;&lt;P&gt;       b-erfme&lt;/P&gt;&lt;P&gt;       b-kzbew &lt;/P&gt;&lt;P&gt;       b-kzvbr &lt;/P&gt;&lt;P&gt;       b-kzzug &lt;/P&gt;&lt;P&gt;       b-shkzg into table t_mat_data from mkpf&lt;/P&gt;&lt;P&gt;                          as a join mseg as b on a-mblnr = b-mblnr&lt;/P&gt;&lt;P&gt;                                             and a-mjahr = b-mjahr&lt;/P&gt;&lt;P&gt;                          where .....................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so wat should i written in Where condition plz reply&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points will be awarded&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:47:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123734#M445497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T06:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: inner join problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123735#M445498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the where condition&lt;/P&gt;&lt;P&gt;write &lt;/P&gt;&lt;P&gt;where a~matnr in s_matnr(if it is selection screen option)&lt;/P&gt;&lt;P&gt;and in the same way other fileds from select options&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the SAP help on select query fot better understanding&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sonika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 06:52:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join-problem/m-p/2123735#M445498</guid>
      <dc:creator>former_member632991</dc:creator>
      <dc:date>2007-04-10T06:52:32Z</dc:date>
    </item>
  </channel>
</rss>

