<?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 statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738731#M636182</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;I have a scenario where I need to copy everythng from one of my 'z_test' table(custom table) into my internal table it_tab and for this I have written thr following code, I just want to make sure whether I have written it right or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table it_tab&lt;/P&gt;&lt;P&gt;  from zbs_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 23:42:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-04T23:42:35Z</dc:date>
    <item>
      <title>Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738731#M636182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus, &lt;/P&gt;&lt;P&gt;I have a scenario where I need to copy everythng from one of my 'z_test' table(custom table) into my internal table it_tab and for this I have written thr following code, I just want to make sure whether I have written it right or not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into table it_tab&lt;/P&gt;&lt;P&gt;  from zbs_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rajeev gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 23:42:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738731#M636182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T23:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738732#M636183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course you could have simply tested this, but yes that is the correct syntax as long as IT_TAB is defined as...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: IT_TAB type table of zbs_test.&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>Wed, 05 Sep 2007 00:25:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738732#M636183</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-05T00:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738733#M636184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; to make sure that you have wriiten well for the code , you can check it with sy-subrc &lt;/P&gt;&lt;P&gt;If sy-subrc = 0 , this means that you have copied successfilly .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can define the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : it_tab TYPE TABLE OF zbs_test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select * from zbs_test into table it_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;  Write: ' Copied successfully '.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  write:  'fail to copy'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that it will be helpful for you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 02:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738733#M636184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T02:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738734#M636185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like your code is good and i am not sure how are you declaring internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the below code and here i am using one custom table (ZTEST99).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report ztest_ytt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : ztest99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;internal table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data i_ztest type standard table of ztest99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;work area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;data wa_ztest like line of i_ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;get the data from table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from ztest99 into table i_ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;message e000(z01).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at i_ztest into wa_ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ wa_ztest. " use fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear : wa_ztest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use internal table with out header line for better performance and also use work area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 02:15:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-statement/m-p/2738734#M636185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T02:15:58Z</dc:date>
    </item>
  </channel>
</rss>

