<?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/1599209#M269048</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;INTO TABLE gt_output&lt;/P&gt;&lt;P&gt;FROM ( VIAUFKST AS V&lt;/P&gt;&lt;P&gt;INNER JOIN IFLO AS I ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN PMCO AS P ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE V~TPLNR = '0001-GRUP-0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not sure abt the where condition check with only the bold part and check if it is fetching any value in the debugger.&lt;/P&gt;&lt;P&gt;Reward if it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Sep 2006 08:44:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-14T08:44:57Z</dc:date>
    <item>
      <title>INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599207#M269046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!! I'm tryhig to do a query on three database views and read it on an internal table, the sintax is ok (at least there's no error messsage when I verify it)but it's not working propperly because when I run the debugging mode the program doesn't execute the select. &lt;/P&gt;&lt;P&gt;My internal table is declared like this:&lt;/P&gt;&lt;P&gt;TYPES:BEGIN OF st_output,&lt;/P&gt;&lt;P&gt;      tplnr LIKE viaufkst-tplnr,&lt;/P&gt;&lt;P&gt;      pltxt LIKE iflo-pltxt,&lt;/P&gt;&lt;P&gt;      acpos LIKE pmco-acpos,&lt;/P&gt;&lt;P&gt;      objnr LIKE viaufkst-objnr,&lt;/P&gt;&lt;P&gt;   END OF st_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA gt_output TYPE STANDARD TABLE OF st_output WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;The database views are viaufkst, iflo and pmco and they are declared with the TABLES statement.&lt;/P&gt;&lt;P&gt;The query's sintax is:&lt;/P&gt;&lt;P&gt;SELECT V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      FROM ( ( VIAUFKST AS V&lt;/P&gt;&lt;P&gt;               INNER JOIN IFLO AS I ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR&lt;/P&gt;&lt;P&gt;               )&lt;/P&gt;&lt;P&gt;               INNER JOIN PMCO AS P ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR )&lt;/P&gt;&lt;P&gt;               INTO TABLE gt_output&lt;/P&gt;&lt;P&gt;               WHERE V~TPLNR = '0001-GRUP-0001'.&lt;/P&gt;&lt;P&gt;I do know that the where condition is true, so: &lt;/P&gt;&lt;P&gt;Anybody can tell me why is it not working?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:37:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599207#M269046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:37: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/1599208#M269047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi juna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will work for u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk the new code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:BEGIN OF gt_output occurs 0,&lt;/P&gt;&lt;P&gt;       tplnr LIKE viaufkst-tplnr,&lt;/P&gt;&lt;P&gt;       pltxt LIKE iflo-pltxt,&lt;/P&gt;&lt;P&gt;       acpos LIKE pmco-acpos,&lt;/P&gt;&lt;P&gt;       objnr LIKE viaufkst-objnr,&lt;/P&gt;&lt;P&gt;END OF gt_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO TABLE gt_output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM  VIAUFKST AS V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN IFLO AS I &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN PMCO AS P &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE V~TPLNR = '0001-GRUP-0001'.&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;anver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if hlped mark points&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:44:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599208#M269047</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-09-14T08:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599209#M269048</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SELECT V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;INTO TABLE gt_output&lt;/P&gt;&lt;P&gt;FROM ( VIAUFKST AS V&lt;/P&gt;&lt;P&gt;INNER JOIN IFLO AS I ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INNER JOIN PMCO AS P ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE V~TPLNR = '0001-GRUP-0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not sure abt the where condition check with only the bold part and check if it is fetching any value in the debugger.&lt;/P&gt;&lt;P&gt;Reward if it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Senthil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: senthil kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:44:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599209#M269048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599210#M269049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just check  this ..may  be because of  missmatch ..in&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;TPLNR = '0001-GRUP-0001'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES:BEGIN OF st_output,
tplnr LIKE viaufkst-tplnr,
pltxt LIKE iflo-pltxt,
acpos LIKE pmco-acpos,
objnr LIKE viaufkst-objnr,
END OF st_output.

DATA gt_output TYPE STANDARD TABLE OF st_output WITH HEADER LINE.
The database views are viaufkst, iflo and pmco and they are declared with the TABLES statement.
The query's sintax is:
SELECT V~TPLNR V~OBJNR I~PLTXT P~ACPOS

FROM ( ( VIAUFKST AS V
INNER JOIN IFLO AS I ON V~TPLNR = I~TPLNR
)
INNER JOIN PMCO AS P ON V~OBJNR = P~OBJNR )
INTO TABLE gt_output&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599210#M269049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599211#M269050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no need for the brackets but I think it must be executing the statement but since there is no data to be fetched you no able to view the result...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To check that please check on the SY-SUBRC after the select statement.&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>Thu, 14 Sep 2006 08:46:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599211#M269050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599212#M269051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan&lt;/P&gt;&lt;P&gt;    I guess  Table VIAUFKST is not having records for field TPLNR Value '0001-GRUP-0001'. Please check. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srikanth M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 08:49:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599212#M269051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T08:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599213#M269052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok guys!! We are appraching the solution, I think the problem is on the where clause. I've disabled the where clause an I've made a loop at the table gt_output, to write its content on the screen. Everything is ok and the program shows on the screen all the rows of gt_output, the problem now is that in this list there're 25 rows with the value 0001-GRUP-0001 on the field tplnr. What the hell is going on????&lt;/P&gt;&lt;P&gt;This is thenew sintax:&lt;/P&gt;&lt;P&gt;SELECT V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;      INTO TABLE gt_output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      FROM VIAUFKST AS V&lt;/P&gt;&lt;P&gt;      INNER JOIN IFLO AS&lt;/P&gt;&lt;P&gt;      I ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR&lt;/P&gt;&lt;P&gt;      INNER JOIN PMCO AS P&lt;/P&gt;&lt;P&gt;      ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     WHERE I~TPLNR = '0001-GRUP-0001'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT gt_output into wa_output.&lt;/P&gt;&lt;P&gt;write:/ wa_output-tplnr,WA_OUTPUT-OBJNR,wa_output-acpos,wa_output-pltxt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 10:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599213#M269052</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T10:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599214#M269053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the  reason is ..&lt;/P&gt;&lt;P&gt;TPLNR  is char type  and  ur  value ('0001-GRUP-0001'.&lt;/P&gt;&lt;P&gt;)stsrted by 000 so ir Surplus the  zeros  and  it  take  it  like -GRUP-0001' and  it  not  fount  it  in table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 10:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599214#M269053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T10:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599215#M269054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi juan ollero ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem with ur select query is that u have not used the 'into corresponding fields of' statement. The following Select query will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE gt_output&lt;/P&gt;&lt;P&gt;FROM VIAUFKST AS V INNER JOIN IFLO AS I ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR INNER JOIN PMCO AS P ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR &lt;/P&gt;&lt;P&gt;WHERE V~TPLNR = '0001-GRUP-0001'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 10:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599215#M269054</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T10:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599216#M269055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The entire code is correct may be check out the where condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vikranth Khimavath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 11:19:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599216#M269055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T11:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: INNER JOIN</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599217#M269056</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 V&lt;SUB&gt;TPLNR V&lt;/SUB&gt;OBJNR I&lt;SUB&gt;PLTXT P&lt;/SUB&gt;ACPOS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM ( ( VIAUFKST AS V&lt;/P&gt;&lt;P&gt;INNER JOIN IFLO AS I ON V&lt;SUB&gt;TPLNR = I&lt;/SUB&gt;TPLNR&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;INNER JOIN PMCO AS P ON V&lt;SUB&gt;OBJNR = P&lt;/SUB&gt;OBJNR )&lt;/P&gt;&lt;P&gt;INTO TABLE gt_output&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;WHERE V~TPLNR like '%0001%'.&amp;lt;/b&amp;gt;Regards&lt;/P&gt;&lt;P&gt;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Sep 2006 11:29:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/inner-join/m-p/1599217#M269056</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-14T11:29:23Z</dc:date>
    </item>
  </channel>
</rss>

