<?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: Data selection from Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422276#M1409584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if you can use tables VBUK or VBUP instead of BKPF, e.g. VBUK-BUCHK sounds relevant for your task.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Dec 2009 12:49:44 GMT</pubDate>
    <dc:creator>ThomasZloch</dc:creator>
    <dc:date>2009-12-10T12:49:44Z</dc:date>
    <item>
      <title>Data selection from Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422272#M1409580</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;My requirement is to have Commercial Documents which are not Accounted. So that I've used the following logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT a~vbeln&lt;/P&gt;&lt;P&gt;                 a~vbtyp&lt;/P&gt;&lt;P&gt;                 a~fkdat&lt;/P&gt;&lt;P&gt;                 a~bukrs&lt;/P&gt;&lt;P&gt;         a~kunrg&lt;/P&gt;&lt;P&gt;         SUM( b~netwr )&lt;/P&gt;&lt;P&gt;       FROM vbrk AS a INNER JOIN vbrp AS b&lt;/P&gt;&lt;P&gt;       ON a&lt;SUB&gt;vbeln EQ b&lt;/SUB&gt;vbeln&lt;/P&gt;&lt;P&gt;       INTO ls_bill WHERE a~vbtyp EQ 'M'          AND&lt;/P&gt;&lt;P&gt;                          a~fkdat IN s_fkdat      AND&lt;/P&gt;&lt;P&gt;                          a~bukrs IN s_bukrs      AND&lt;/P&gt;&lt;P&gt;                          a~kunrg IN s_kunrg&lt;/P&gt;&lt;P&gt;                    GROUP BY a~vbeln&lt;/P&gt;&lt;P&gt;                             a~vbtyp&lt;/P&gt;&lt;P&gt;                             a~fkdat&lt;/P&gt;&lt;P&gt;                             a~bukrs&lt;/P&gt;&lt;P&gt;                             a~kunrg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    l_awkey = ls_bill-vbeln.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT awkey FROM bkpf INTO l_awkey&lt;/P&gt;&lt;P&gt;                 WHERE awtyp EQ 'VBRK'  AND&lt;/P&gt;&lt;P&gt;                       awkey EQ l_awkey AND&lt;/P&gt;&lt;P&gt;                       bukrs EQ ls_bill-bukrs.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      APPEND ls_bill TO lt_bill.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLEAR : ls_bill, l_awkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that the above logic for getting data is correct. or  First taking all the entries from VBRK and VBRP table then selecting entries from BKPF and then if any entry of VBRK is not in BKPF then taking that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajiv.V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message - Moved to the correct forum&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Dec 10, 2009 9:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 04:12:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422272#M1409580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T04:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Data selection from Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422273#M1409581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should have searched SDN for Performance Tuning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please search SDN for Performance Tuning and then try to understand the use of various statements that you have used in terms of performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 04:32:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422273#M1409581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T04:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Data selection from Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422274#M1409582</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;you should not use SELECT statements for such complex business logic. I would recommend you to search some BAPI or SAP function module, which is gathering the data for you. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR &lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 05:18:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422274#M1409582</guid>
      <dc:creator>tobiaskugelmann</dc:creator>
      <dc:date>2009-12-10T05:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Data selection from Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422275#M1409583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No Bapi nor FM is available. Pl tel me is that the logic is acceptable or not&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 05:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422275#M1409583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-10T05:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data selection from Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422276#M1409584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check if you can use tables VBUK or VBUP instead of BKPF, e.g. VBUK-BUCHK sounds relevant for your task.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Dec 2009 12:49:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422276#M1409584</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-12-10T12:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data selection from Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422277#M1409585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That BUCHK field is not relevent for me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rajiv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Dec 2009 05:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-selection-from-table/m-p/6422277#M1409585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-12T05:30:14Z</dc:date>
    </item>
  </channel>
</rss>

