<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803930#M345103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you vijay  but its not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Dec 2006 08:31:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-25T08:31:29Z</dc:date>
    <item>
      <title>inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803928#M345101</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;i have a problem: i have a inner join code and it not bring me the right selection.&lt;/P&gt;&lt;P&gt;my problem is that in table coep it bring me the wrong WOGBTR.&lt;/P&gt;&lt;P&gt;for the first row it bring the data ok and the second all the data ok except for the &lt;/P&gt;&lt;P&gt;WOGBTR that it take it from the first row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help will be appreciated.&lt;/P&gt;&lt;P&gt;Dana.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of gs_data,&lt;/P&gt;&lt;P&gt;        row_selected(1),&lt;/P&gt;&lt;P&gt;        bukrs  like bsis-bukrs,&lt;/P&gt;&lt;P&gt;        hkont  like bsis-hkont,&lt;/P&gt;&lt;P&gt;        zuonr  like bsis-zuonr,&lt;/P&gt;&lt;P&gt;        belnr1 like bkpf-belnr,&lt;/P&gt;&lt;P&gt;        belnr  like cobk-belnr,&lt;/P&gt;&lt;P&gt;        buzei  like bsis-buzei,&lt;/P&gt;&lt;P&gt;        budat  like bsis-budat,&lt;/P&gt;&lt;P&gt;        waers1 like skb1-waers,&lt;/P&gt;&lt;P&gt;        waers  like bsis-waers,&lt;/P&gt;&lt;P&gt;        shkzg  like bsis-shkzg,&lt;/P&gt;&lt;P&gt;        wrbtr  like bsis-wrbtr,&lt;/P&gt;&lt;P&gt;        wogbtr like coep-wogbtr,&lt;/P&gt;&lt;P&gt;        dmbtr  like bsis-dmbtr,&lt;/P&gt;&lt;P&gt;        zuonr2(10) type n,&lt;/P&gt;&lt;P&gt;        zuonr3(10) ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        awkey  like bkpf-awkey,&lt;/P&gt;&lt;P&gt;        awtyp  like bkpf-awtyp,&lt;/P&gt;&lt;P&gt;        gjahr  like bkpf-gjahr,&lt;/P&gt;&lt;P&gt;        dmbe2  like bsis-dmbe2,&lt;/P&gt;&lt;P&gt;      end of gs_data,&lt;/P&gt;&lt;P&gt;     gt_data like table of  gs_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select   bsis&lt;SUB&gt;bukrs   bsis&lt;/SUB&gt;hkont   bsis&lt;SUB&gt;gjahr   bsis&lt;/SUB&gt;zuonr&lt;/P&gt;&lt;P&gt;           bsis&lt;SUB&gt;waers   bsis&lt;/SUB&gt;budat   bsis&lt;SUB&gt;dmbtr   bsis&lt;/SUB&gt;shkzg&lt;/P&gt;&lt;P&gt;           bsis&lt;SUB&gt;bschl   bsis&lt;/SUB&gt;buzei   bsis~dmbe2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           bkpf&lt;SUB&gt;awkey   bkpf&lt;/SUB&gt;awtyp  "bkpf~wrbtr "&lt;/P&gt;&lt;P&gt;           bkpf~belnr as belnr1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           cobk~belnr&lt;/P&gt;&lt;P&gt;           coep~wogbtr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; into corresponding fields of table gt_data&lt;/P&gt;&lt;P&gt;    from ( bsis&lt;/P&gt;&lt;P&gt;           inner join bkpf&lt;/P&gt;&lt;P&gt;           on  bkpf&lt;SUB&gt;belnr = bsis&lt;/SUB&gt;belnr&lt;/P&gt;&lt;P&gt;           and bkpf&lt;SUB&gt;blart = bsis&lt;/SUB&gt;blart&lt;/P&gt;&lt;P&gt;           and bkpf&lt;SUB&gt;bukrs = bsis&lt;/SUB&gt;bukrs&lt;/P&gt;&lt;P&gt;           and bkpf&lt;SUB&gt;gjahr = bsis&lt;/SUB&gt;gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           inner join cobk&lt;/P&gt;&lt;P&gt;           on  cobk&lt;SUB&gt;refbn = bkpf&lt;/SUB&gt;awkey&lt;/P&gt;&lt;P&gt;           and cobk&lt;SUB&gt;awtyp = bkpf&lt;/SUB&gt;awtyp&lt;/P&gt;&lt;P&gt;           and cobk&lt;SUB&gt;gjahr = bkpf&lt;/SUB&gt;gjahr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           inner join coep&lt;/P&gt;&lt;P&gt;           on coep&lt;SUB&gt;kokrs  = cobk&lt;/SUB&gt;kokrs&lt;/P&gt;&lt;P&gt;           and coep&lt;SUB&gt;belnr = cobk&lt;/SUB&gt;belnr&lt;/P&gt;&lt;P&gt;           )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         where bsis~bukrs =  p_bukrs&lt;/P&gt;&lt;P&gt;           and bsis~hkont in so_hkont&lt;/P&gt;&lt;P&gt;           and coep~gkont in so_hkont&lt;/P&gt;&lt;P&gt;           and bsis~blart in so_blart&lt;/P&gt;&lt;P&gt;           and bsis~gjahr =  p_gjahr.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 07:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803928#M345101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T07:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803929#M345102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u make use of field COEP-BUZEI in the join by mapping it with COBK-ALEBZ&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;b&amp;gt;inner join coep
on coep~kokrs = cobk~kokrs
and coep~belnr = cobk~belnr
and coep-buzei = cobk-alebz        "this is also required&amp;lt;/b&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cause in the table COEP BUZEI is also on of the key field ..try to work on this and check .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to fetch the entries of COEP based on all the keys of the table this is important when u r fetching the line items&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 08:04:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803929#M345102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T08:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803930#M345103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you vijay  but its not working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 08:31:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803930#M345103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T08:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803931#M345104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do one thing .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You know that for a particular criteria header is correct and the item is wrong .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just make ur inner join work for that single Criteria on line items by providing only one input ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now make necessary adjustments in the code till this value is being fetched based on the table entires for that single record ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once it works for small ranges in your select criteria then  slowly expand the range .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_bukrs&lt;/P&gt;&lt;P&gt;and bsis~hkont in so_hkont&lt;/P&gt;&lt;P&gt;and coep~gkont in so_hkont&lt;/P&gt;&lt;P&gt;and bsis~blart in so_blart&lt;/P&gt;&lt;P&gt;and bsis~gjahr = p_gjahr. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this give only one value for so_hkont  and so_blart &lt;/P&gt;&lt;P&gt;and check ur select criteria..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 08:48:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803931#M345104</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T08:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803932#M345105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you very much,&lt;/P&gt;&lt;P&gt;apperantly the whole select is wrong so i have to do all thing from the beginning.&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;dana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Dec 2006 10:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1803932#M345105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-25T10:35:00Z</dc:date>
    </item>
  </channel>
</rss>

