<?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/3293400#M788074</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..sameer..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to use &lt;STRONG&gt;for all enteries&lt;/STRONG&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ur inner join is not working ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;i m giving one example how to use for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select l&lt;SUB&gt;vbeln l&lt;/SUB&gt;posnr l&lt;SUB&gt;vgbel l&lt;/SUB&gt;matnr t&lt;SUB&gt;maktx l&lt;/SUB&gt;charg l&lt;SUB&gt;lfimg l&lt;/SUB&gt;umvkz l&lt;SUB&gt;meins l&lt;/SUB&gt;vrkme&lt;/P&gt;&lt;P&gt;           k&lt;SUB&gt;wadat_ist k&lt;/SUB&gt;kunag k&lt;SUB&gt;kunnr n&lt;/SUB&gt;name2 " l~pstyv&lt;/P&gt;&lt;P&gt;     into corresponding fields of table atab&lt;/P&gt;&lt;P&gt;     from ( lips as l&lt;/P&gt;&lt;P&gt;            inner join likp as k on l&lt;SUB&gt;vbeln = k&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;            inner join kna1 as n on n&lt;SUB&gt;kunnr = k&lt;/SUB&gt;kunnr&lt;/P&gt;&lt;P&gt;            inner join makt as t on t&lt;SUB&gt;matnr = l&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;     where ( l~vbeln in dno&lt;/P&gt;&lt;P&gt;             and wadat_ist in agi&lt;/P&gt;&lt;P&gt;             and charg in batch&lt;/P&gt;&lt;P&gt;             and posnr like '9%'&lt;/P&gt;&lt;P&gt;             and l~matnr in mt ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select k&lt;SUB&gt;vbeln k&lt;/SUB&gt;stceg p&lt;SUB&gt;vgbel p&lt;/SUB&gt;vgpos "k&lt;SUB&gt;kunag "p&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      into corresponding fields of table aatab&lt;/P&gt;&lt;P&gt;      from vbrk as k&lt;/P&gt;&lt;P&gt;      inner join vbrp as p on k&lt;SUB&gt;vbeln = p&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      for all entries in atab&lt;/P&gt;&lt;P&gt;      where "k~fkdat in date&lt;/P&gt;&lt;P&gt;         k&lt;SUB&gt;vbtyp = 'U' and p&lt;/SUB&gt;vgtyp = 'J'&lt;/P&gt;&lt;P&gt;        and p~vgbel = atab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select belnr gjahr budat&lt;/P&gt;&lt;P&gt;            into corresponding fields of table t_head_expense&lt;/P&gt;&lt;P&gt;            from bkpf&lt;/P&gt;&lt;P&gt;            where budat in posdate&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt; select belnr buzei gjahr hkont dmbtr shkzg sgtxt&lt;/P&gt;&lt;P&gt;            into corresponding fields of table t_expense&lt;/P&gt;&lt;P&gt;            from bseg&lt;/P&gt;&lt;P&gt;            for all entries in t_head_expense&lt;/P&gt;&lt;P&gt;            where belnr = t_head_expense-belnr and gjahr = t_head_expense-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it is helpful to u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jan 2008 07:17:32 GMT</pubDate>
    <dc:creator>arpit_shah</dc:creator>
    <dc:date>2008-01-07T07:17:32Z</dc:date>
    <item>
      <title>Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293394#M788068</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;I have a problem with innerjoin...whenever i m writing innerjoin our server getting slow.if i stop it ...it is working fine..is there any problm with innerjoin...does writing wrong join effect sys performance..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sameer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 06:57:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293394#M788068</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T06:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293395#M788069</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;for that there r more reasons r there ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. in u r inner join more tables u have used &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. in u inner join u used master tables (more data )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. try to use For all entries logic &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THX&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 07:00:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293395#M788069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T07:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293396#M788070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, give me your code which u use for inner join. Most cases is u may use lot of tables in that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suku&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 07:01:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293396#M788070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T07:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293397#M788071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt; if u r not writing the correct join you will not get wanted records.&lt;/P&gt;&lt;P&gt;Join the columns carrname, connid, fldate of the database tables scarr, spfli and sflight by means of two inner joins. A list is created of the flights from p_cityfr to p_cityto. Alternative names are used for every table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: p_cityfr TYPE spfli-cityfrom, &lt;/P&gt;&lt;P&gt;            p_cityto TYPE spfli-cityto. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF wa, &lt;/P&gt;&lt;P&gt;         fldate TYPE sflight-fldate, &lt;/P&gt;&lt;P&gt;         carrname TYPE scarr-carrname, &lt;/P&gt;&lt;P&gt;         connid   TYPE spfli-connid, &lt;/P&gt;&lt;P&gt;       END OF wa. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA itab LIKE SORTED TABLE OF wa &lt;/P&gt;&lt;P&gt;               WITH UNIQUE KEY fldate carrname connid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT c&lt;SUB&gt;carrname p&lt;/SUB&gt;connid f~fldate &lt;/P&gt;&lt;P&gt;       INTO CORRESPONDING FIELDS OF TABLE itab &lt;/P&gt;&lt;P&gt;       FROM ( ( scarr AS c &lt;/P&gt;&lt;P&gt; JOIN spfli AS p ON p&lt;SUB&gt;carrid   = c&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;                              AND p~cityfrom = p_cityfr &lt;/P&gt;&lt;P&gt;                              AND p~cityto   = p_cityto ) &lt;/P&gt;&lt;P&gt;          JOIN sflight AS f ON f&lt;SUB&gt;carrid = p&lt;/SUB&gt;carrid &lt;/P&gt;&lt;P&gt;                                AND f&lt;SUB&gt;connid = p&lt;/SUB&gt;connid ). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa. &lt;/P&gt;&lt;P&gt;  WRITE: / wa-fldate, wa-carrname, wa-connid. &lt;/P&gt;&lt;P&gt;ENDLOOP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Plzz reward points if it helps.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 07:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293397#M788071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T07:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293398#M788072</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;For performance issue check the following link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrainsonline.com/ARTICLES/TECHNICAL/optimization/optimization.html" target="test_blank"&gt;http://www.sapbrainsonline.com/ARTICLES/TECHNICAL/optimization/optimization.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 07:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293398#M788072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T07:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293399#M788073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank u for  ur reply.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Finally i came to one conclusion that if we writes wrong code&lt;/P&gt;&lt;P&gt;in inner joins if effects the system performance..then and there itself..In my case i did a small mistake and our server CPU usage drastically increased..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please correct me if i m wrong..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my wrong code was.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select a~ebeln&lt;/P&gt;&lt;P&gt;         a~bedat&lt;/P&gt;&lt;P&gt;         a~lifnr&lt;/P&gt;&lt;P&gt;         b~ebelp&lt;/P&gt;&lt;P&gt;         b~txz01&lt;/P&gt;&lt;P&gt;         b~matnr&lt;/P&gt;&lt;P&gt;         b~netwr&lt;/P&gt;&lt;P&gt;         b~pstyp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         into corresponding fields of table it_ekko&lt;/P&gt;&lt;P&gt;         from ekko as a inner join ekpo as b&lt;/P&gt;&lt;P&gt;         on a&lt;SUB&gt;ekko-ebeln = b&lt;/SUB&gt;ekpo-ebeln&lt;/P&gt;&lt;P&gt;         where ebeln in s_ebeln&lt;/P&gt;&lt;P&gt;          and  bedat in s_bedat&lt;/P&gt;&lt;P&gt;          and  werks in s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i corrected it as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select a~ebeln&lt;/P&gt;&lt;P&gt;         a~bedat&lt;/P&gt;&lt;P&gt;         a~lifnr&lt;/P&gt;&lt;P&gt;         b~ebelp&lt;/P&gt;&lt;P&gt;         b~txz01&lt;/P&gt;&lt;P&gt;         b~matnr&lt;/P&gt;&lt;P&gt;         b~netwr&lt;/P&gt;&lt;P&gt;         b~pstyp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;         into corresponding fields of table it_ekko&lt;/P&gt;&lt;P&gt;         from ekko as a inner join ekpo as b&lt;/P&gt;&lt;P&gt;         on a&lt;SUB&gt;ebeln = b&lt;/SUB&gt;ebeln&lt;/P&gt;&lt;P&gt;         where a~ebeln in s_ebeln&lt;/P&gt;&lt;P&gt;          and  a~bedat in s_bedat&lt;/P&gt;&lt;P&gt;          and  b~werks in s_werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanx.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 07:11:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293399#M788073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-07T07:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Inner join</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293400#M788074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..sameer..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to use &lt;STRONG&gt;for all enteries&lt;/STRONG&gt; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ur inner join is not working ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;i m giving one example how to use for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select l&lt;SUB&gt;vbeln l&lt;/SUB&gt;posnr l&lt;SUB&gt;vgbel l&lt;/SUB&gt;matnr t&lt;SUB&gt;maktx l&lt;/SUB&gt;charg l&lt;SUB&gt;lfimg l&lt;/SUB&gt;umvkz l&lt;SUB&gt;meins l&lt;/SUB&gt;vrkme&lt;/P&gt;&lt;P&gt;           k&lt;SUB&gt;wadat_ist k&lt;/SUB&gt;kunag k&lt;SUB&gt;kunnr n&lt;/SUB&gt;name2 " l~pstyv&lt;/P&gt;&lt;P&gt;     into corresponding fields of table atab&lt;/P&gt;&lt;P&gt;     from ( lips as l&lt;/P&gt;&lt;P&gt;            inner join likp as k on l&lt;SUB&gt;vbeln = k&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;            inner join kna1 as n on n&lt;SUB&gt;kunnr = k&lt;/SUB&gt;kunnr&lt;/P&gt;&lt;P&gt;            inner join makt as t on t&lt;SUB&gt;matnr = l&lt;/SUB&gt;matnr )&lt;/P&gt;&lt;P&gt;     where ( l~vbeln in dno&lt;/P&gt;&lt;P&gt;             and wadat_ist in agi&lt;/P&gt;&lt;P&gt;             and charg in batch&lt;/P&gt;&lt;P&gt;             and posnr like '9%'&lt;/P&gt;&lt;P&gt;             and l~matnr in mt ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      select k&lt;SUB&gt;vbeln k&lt;/SUB&gt;stceg p&lt;SUB&gt;vgbel p&lt;/SUB&gt;vgpos "k&lt;SUB&gt;kunag "p&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      into corresponding fields of table aatab&lt;/P&gt;&lt;P&gt;      from vbrk as k&lt;/P&gt;&lt;P&gt;      inner join vbrp as p on k&lt;SUB&gt;vbeln = p&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      for all entries in atab&lt;/P&gt;&lt;P&gt;      where "k~fkdat in date&lt;/P&gt;&lt;P&gt;         k&lt;SUB&gt;vbtyp = 'U' and p&lt;/SUB&gt;vgtyp = 'J'&lt;/P&gt;&lt;P&gt;        and p~vgbel = atab-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select belnr gjahr budat&lt;/P&gt;&lt;P&gt;            into corresponding fields of table t_head_expense&lt;/P&gt;&lt;P&gt;            from bkpf&lt;/P&gt;&lt;P&gt;            where budat in posdate&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt; select belnr buzei gjahr hkont dmbtr shkzg sgtxt&lt;/P&gt;&lt;P&gt;            into corresponding fields of table t_expense&lt;/P&gt;&lt;P&gt;            from bseg&lt;/P&gt;&lt;P&gt;            for all entries in t_head_expense&lt;/P&gt;&lt;P&gt;            where belnr = t_head_expense-belnr and gjahr = t_head_expense-gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i hope it is helpful to u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arpit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jan 2008 07:17:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/3293400#M788074</guid>
      <dc:creator>arpit_shah</dc:creator>
      <dc:date>2008-01-07T07:17:32Z</dc:date>
    </item>
  </channel>
</rss>

