<?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: SQL Query Help in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332119#M1228613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;done&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2009 15:34:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-27T15:34:19Z</dc:date>
    <item>
      <title>SQL Query Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332117#M1228611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am quite an experienced consultant, but for the love of god I can't figure this out... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    select a&lt;SUB&gt;vbeln b&lt;/SUB&gt;vbeln c&lt;SUB&gt;vbeln d&lt;/SUB&gt;vbeln into table gt_output&lt;/P&gt;&lt;P&gt;      from vbak as a "master contract&lt;/P&gt;&lt;P&gt;      join vbak as b "inquiry&lt;/P&gt;&lt;P&gt;        on b&lt;SUB&gt;vgbel = a&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      join vbak as c "quotation&lt;/P&gt;&lt;P&gt;        on c&lt;SUB&gt;vgbel = b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      join vbak as d "debit memo&lt;/P&gt;&lt;P&gt;        on d&lt;SUB&gt;vgbel = c&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;      WHERE   a~vbeln in s_mc&lt;/P&gt;&lt;P&gt;        and   b~vbeln in s_inq&lt;/P&gt;&lt;P&gt;        and   c~vbeln in s_quo&lt;/P&gt;&lt;P&gt;        and   d~vbeln in s_deb&lt;/P&gt;&lt;P&gt;        and   a~trvog eq '4'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now table C has 23 entries so I would assume that my internal table will have 23 lines. I know table a, b and d bring back one entry... And the output right now is 1 line... How can I rectify this without splitting the query into several for all entries (because the selection screen has 4 options and anyone of them can be chosen or not) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that there are 4 different doc types, and each one is related vgbel = vbeln so i know my query is semi-right as the 1 line it brings back is correct, just there should be more lines!!&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>Thu, 19 Mar 2009 16:58:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332117#M1228611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-19T16:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332118#M1228612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did you try outer join?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2009 17:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332118#M1228612</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-03-19T17:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Query Help</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332119#M1228613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;done&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2009 15:34:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-query-help/m-p/5332119#M1228613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-27T15:34:19Z</dc:date>
    </item>
  </channel>
</rss>

