‎2009 Oct 07 9:12 AM
All experts,
i got a problem in select statment about this,
select count( * ) into var-verno from nast
where objky = nast-objky
and kschl = nast-kschl
and aende = 'X'.
in Dev system, it works well, but in QAS, it get long time to run this, and then got errors, can ervery one tell thow deal with this, thanks.
‎2009 Oct 07 9:30 AM
‎2009 Oct 07 9:20 AM
Hi,
What value does nast-objky and nast-kschl hold in the where conditions of the select? Are you populating any value in those before the select? Else it would just take them as blank values and try to get the count of the table records whose aende = 'X' which is not a primary key. That must be the reason why its taking long time in QAS
Vikranth
‎2009 Oct 07 9:28 AM
hi,
both the conditions get values, and i also tested them in database nast by SE11, it can select value from database.
i don not know why it can not select value in this select.
is it the database config error, or others?
‎2009 Oct 07 9:30 AM
‎2009 Oct 07 9:40 AM
venkat,
please test ONCE at least if your code is giving syntax error or not. ( count can be added with fieldnames only with come only with DISTINCT.
kevin,
dev server has very less data. so you can get it in small time... but in QR or PRD you have too much data.. so that takes time.. and might giving you dump for this
'time out error' - is it so??
do one thing..
select * from nast into table gt_nast "gt_nast is a standard table of type nast
where objky = nast-objky
and kschl = nast-kschl. " i have removed aende.
if sy-subrc = 0.
delete gt_nast where aende NE 'X'. " deleted not required entries
describle table gt_nast lines var-verno.
endif.
‎2009 Oct 07 9:47 AM