<?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: Problem with select * into table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911969#M1329945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please read more in the helpportal or wikipedia about transactions, consistent data, locks etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should always read the committed data at the point t when you start your program, and not at the point t + epsilon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siiegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jul 2009 13:32:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-21T13:32:08Z</dc:date>
    <item>
      <title>Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911966#M1329942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a question about select into syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my problem is , i write zreport  use data from mseg , mkpf table . i know if any transaction occur with these table in processing report , i never get a correct report.  so, my solution is use "select * into table"  retrieve data that meet with my condition into my other create table ( like :  wa_mseg). and use data in this  table only. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

***declaration***

DATA:  wa_mseg TYPE STANDARD TABLE OF mseg WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 100,
             i_mseg TYPE mseg.

***select into***

select  * into table wa_mseg from mseg where X = Y A = C.

***use***

loop at wa_mseg into i_mseg where X = Y
........
......
........
.....


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but result still incorrect. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i think , is possible that transaction occur with mseg table has effect with data i retreive into my table?&lt;/P&gt;&lt;P&gt;anyone please tell me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kittisak&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kittisak B on Jul 21, 2009 8:38 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 06:37:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911966#M1329942</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T06:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911967#M1329943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if there has long interval within retrieve data from mseg to end the report,&lt;/P&gt;&lt;P&gt; i think there has not good sultion to solve your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 07:11:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911967#M1329943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T07:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911968#M1329944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you select data from some table into internal table then it has nothing to do with what changes happens in &lt;/P&gt;&lt;P&gt;database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case may be you can put some more filter to make the data more specific so database response time will be less.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way what is the issue you are facing in the selected data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Augustin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 12:29:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911968#M1329944</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T12:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911969#M1329945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please read more in the helpportal or wikipedia about transactions, consistent data, locks etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should always read the committed data at the point t when you start your program, and not at the point t + epsilon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siiegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jul 2009 13:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911969#M1329945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-21T13:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911970#M1329946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;By the way what is the issue you are facing in the selected data?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because in this report, i'm select data from mbew and mard table into my create table for calculate BF Qty. of Each material in each month. but result change every time when run this report. some material qty is correct , some not .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jul 2009 02:02:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911970#M1329946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-22T02:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911971#M1329947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;u proper clearing work area in loop endloop process??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Praveen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2009 15:31:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911971#M1329947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-26T15:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911972#M1329948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what do you mean with CORECT, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;either you are not able to do correct calculations&lt;/P&gt;&lt;P&gt;or you compare it with something, what is it waht you use for comparison?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jul 2009 20:34:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911972#M1329948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-26T20:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911973#M1329949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;u proper clearing work area in loop endloop process??&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;yes , i do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; what do you mean with CORECT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;either you are not able to do correct calculations&lt;/P&gt;&lt;P&gt;or you compare it with something, what is it waht you use for comparison?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a hard copy of material qty. result from checking stock in end of month to compare with report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kittisak B on Jul 27, 2009 5:30 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Kittisak B on Jul 27, 2009 5:30 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2009 03:29:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911973#M1329949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-27T03:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911974#M1329950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It does not help much, if you say the quantity if incorrect, you must find out, what is different.&lt;/P&gt;&lt;P&gt;Is the hardcopy created at a different time, or whatever. What is different, then you will find &lt;/P&gt;&lt;P&gt;out the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason should not be the statement, but the way how it is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2009 09:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911974#M1329950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-27T09:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911975#M1329951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAP ERP is based on &lt;STRONG&gt;real time&lt;/STRONG&gt; data integration, the moment somebody posts a goods movement you have updated stock levels, and each time you run your program with data selections you might have a different result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you must work with fixed snapshots, use a BI/BW system or select by past posting or even better CPU dates, like MKPF-CPUDT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * INTO TABLE ... has nothing to do with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2009 10:54:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911975#M1329951</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-07-27T10:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911976#M1329952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kittisak B ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with SELECT FOR UPDATE *    to lock the records that will be handled and prevent updates on the tables while running the report.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally:&lt;/P&gt;&lt;P&gt;- Check the internal table structure because when using "select  * into table"  the internal table must be identical to the database table, all fields must exist in the same order, otherwise it will store data in fields that do not match and this could change the result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Do "CLEAR" and "REFRESH" of the internal table and the work area before populate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information is help to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 21:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911976#M1329952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-24T21:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with select * into table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911977#M1329953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:  

 lt_mseg TYPE SORT TABLE OF mseg 
               WITH NON-UNIQUE KEY X,
wa_mseg TYPE mseg.
 
***select into***
 
select  * into table lt_mseg from mseg where X = Y A = C.
 
***use***
 
loop at lt_mseg into wa_mseg
         where X = Y
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please look again into the ABAP documentation, it is much better than you think&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ wa_ is a structure and not a table, you should not use widely used naming conventions in a different way,&lt;/P&gt;&lt;P&gt;+ the table is lt_&lt;/P&gt;&lt;P&gt;+ together with LOOP ... WHERE ... you should not use a standard table but a SORTED TABLE&lt;/P&gt;&lt;P&gt;+ and a default key is for lazy guys .... who are highly fault-tolerant, not really recommended&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2009 07:26:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-select-into-table/m-p/5911977#M1329953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-25T07:26:58Z</dc:date>
    </item>
  </channel>
</rss>

