<?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 select statment in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237696#M482073</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Giving below is my select statement. Plz check it and tel;l is itr right or do i need to add anything else into this.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_bkpf like bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select single * from bkpf into wa_bkpf where belnr = p_belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from bseg into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;  where belnr = wa_bkpf-belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab where belnr = wa_bkpf-belnr.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 May 2007 05:15:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-10T05:15:40Z</dc:date>
    <item>
      <title>select statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237696#M482073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Giving below is my select statement. Plz check it and tel;l is itr right or do i need to add anything else into this.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_bkpf like bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select single * from bkpf into wa_bkpf where belnr = p_belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  select * from bseg into corresponding fields of table itab&lt;/P&gt;&lt;P&gt;  where belnr = wa_bkpf-belnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at itab where belnr = wa_bkpf-belnr.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237696#M482073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: select statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237697#M482074</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;If you have company code &amp;amp; year then you can give it in the BKPF select..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:16:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237697#M482074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: select statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237698#M482075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AbhaySingh,&lt;/P&gt;&lt;P&gt;                      May i know what's your problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From,&lt;/P&gt;&lt;P&gt;KK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:17:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237698#M482075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: select statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237699#M482076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;All your staetment are correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But for the 'for loop' , no need to write the condition 'belnr = wa_bkpf-belnr'.&lt;/P&gt;&lt;P&gt;For the table itab you will get the records which will satisfy the condition &lt;/P&gt;&lt;P&gt;belnr = wa_bkpf-belnr only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balakrishna.N&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:21:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237699#M482076</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: select statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237700#M482077</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;chk this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;tables : bkpf,bseg.

data: wa_bkpf like bkpf,
      p_belnr like bseg-belnr.

data : Begin of itab occurs 0.
         include structure bseg.
data : end of itab.
*avoid INTO CORRESPONDING

select * from bseg into table itab where belnr = p_belnr.

if itab[] is not initial.

loop at itab.
endloop. 

endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:22:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237700#M482077</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: select statment</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237701#M482078</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;In the BKPF select you have to pass Company code and fiscal year, since you are using select single (full key has to give).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same will pass in the BSEG also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need to use the Where condition in the loop.&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;Sabu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2007 05:30:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statment/m-p/2237701#M482078</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-10T05:30:57Z</dc:date>
    </item>
  </channel>
</rss>

