<?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: No Data Returned from SELECT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066458#M93418</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, but your select statement is bad !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you join 4 BIG tables in a join and select several bukrs!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alternatives:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) use logical database kdf&lt;/P&gt;&lt;P&gt;2) split your select in master data , loop found master data and bukrs and select posting documents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Dec 2005 14:37:10 GMT</pubDate>
    <dc:creator>andreas_mann3</dc:creator>
    <dc:date>2005-12-15T14:37:10Z</dc:date>
    <item>
      <title>No Data Returned from SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066455#M93415</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;No data is being returned when i execute this SELECT statement. Can you let me know where am i  going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT a&lt;SUB&gt;lifnr b&lt;/SUB&gt;bukrs c~dmbtr INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FROM lfa1 AS a INNER JOIN lfb1 AS b ON a&lt;SUB&gt;lifnr = b&lt;/SUB&gt;lifnr&lt;/P&gt;&lt;P&gt;           INNER JOIN bsik AS c ON c&lt;SUB&gt;lifnr = b&lt;/SUB&gt;lifnr AND&lt;/P&gt;&lt;P&gt;                                   c&lt;SUB&gt;bukrs = b&lt;/SUB&gt;bukrs&lt;/P&gt;&lt;P&gt;           INNER JOIN bsak AS d ON d&lt;SUB&gt;lifnr = c&lt;/SUB&gt;lifnr AND&lt;/P&gt;&lt;P&gt;                                    d&lt;SUB&gt;bukrs = c&lt;/SUB&gt;bukrs&lt;/P&gt;&lt;P&gt;                 WHERE a~land1 NE 'XX' AND&lt;/P&gt;&lt;P&gt;                       b~bukrs between '100' and '200'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab ASCENDING BY lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2005 13:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066455#M93415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-15T13:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: No Data Returned from SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066456#M93416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think its because of the company code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


SELECT DISTINCT a~lifnr b~bukrs c~dmbtr INTO CORRESPONDING FIELDS OF TABLE itab
FROM lfa1 AS a INNER JOIN lfb1 AS b ON a~lifnr = b~lifnr
INNER JOIN bsik AS c ON c~lifnr = b~lifnr AND
c~bukrs = b~bukrs
INNER JOIN bsak AS d ON d~lifnr = c~lifnr AND
d~bukrs = c~bukrs
WHERE a~land1 NE 'XX' AND
&amp;lt;b&amp;gt;b~bukrs between '0100' and '0200'.&amp;lt;/b&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2005 14:02:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066456#M93416</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2005-12-15T14:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: No Data Returned from SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066457#M93417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. First get lifnr,bukrs from lfa1 joined with lfb1. Sort on lifnr and bukrs. And, delete adjacent duplicates comparing lifnr and bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. for these lifnr and bukrs values go to bsak and fetch the records, loop on this table and summate the values of dmbtr, to get total amount for each vendor/company code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, your select statement is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2005 14:08:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066457#M93417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-15T14:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: No Data Returned from SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066458#M93418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, but your select statement is bad !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you join 4 BIG tables in a join and select several bukrs!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;alternatives:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) use logical database kdf&lt;/P&gt;&lt;P&gt;2) split your select in master data , loop found master data and bukrs and select posting documents&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2005 14:37:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066458#M93418</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2005-12-15T14:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: No Data Returned from SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066459#M93419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why are you including BSAK at all? You're not retrieving any data from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2005 15:45:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066459#M93419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-15T15:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: No Data Returned from SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066460#M93420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I could get the data using your select statement.  Please check all the tables whether the records exists for the joining condition. As you are using inner join, it might be possible that if the satisfied record does not exist in any one of the table, there may not be records selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2005 16:02:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/no-data-returned-from-select/m-p/1066460#M93420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-12-15T16:02:16Z</dc:date>
    </item>
  </channel>
</rss>

