08-22-2006 3:07 PM
Hello;
Is there a faster way to read table S026(material consumptions table)? My select statement is as follows but it takes too much time to read.
select s026matnr s026werks s026~mcomp
into (s026-matnr, s026-werks, s026-mcomp)
from s026 client specified
where vrsio = '000' and
ssour = space and
mandt = sy-mandt and
werks in werks and
mcomp in mcomp and
sptag in dates.
........
........
endselect.
Thanks in advance.
Ali abbasgil
08-22-2006 3:13 PM
hi,
As we are not specifying all the key fields, it is taking much time. Check if there are secondary indexes on that table. Specify that index while selecting data using HINT statement.
Regards,
Sailaja.
08-22-2006 3:13 PM
hi,
As we are not specifying all the key fields, it is taking much time. Check if there are secondary indexes on that table. Specify that index while selecting data using HINT statement.
Regards,
Sailaja.
08-22-2006 3:19 PM
Try this:
data: begin of t_s026 occurs 0,
matnr like s026-matnr,
werks like s026-werks,
mcomp like s026-mcomp,
end of t_s026.
select matnr werks mcomp
into table t_s026
from s026 client specified
where mandt = sy-mandt and
ssour = space and
vrsio = '000' and
sptag in dates and
werks in werks and
mcomp in mcomp.
Regards,
ravi
08-22-2006 3:22 PM
try not to use select-endselect....it'l affect performance.instead use the following.
data : s026 like table of s026 with header line.
select s026matnr s026werks s026~mcomp
into corresponding fields of table s026
from s026 client specified
where vrsio = '000' and
ssour = space and
mandt = sy-mandt and
werks in werks and
mcomp in mcomp and
sptag in dates.
........
........
u need not use append.this will put the data directly into the table n not the work area
11-09-2006 12:48 AM
Instead of using ABAP, try using the Report Painter. Once the table has been installed for report painter, it should be good to go for any flexible reporting by the user.
Good luck.