Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select statment error

Former Member
0 Likes
801

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
758

This message was moderated.

5 REPLIES 5
Read only

Former Member
0 Likes
758

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

Read only

0 Likes
758

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?

Read only

Former Member
0 Likes
759

This message was moderated.

Read only

0 Likes
758

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.

Read only

0 Likes
758

yes, it got time out errors,

i will try this, tks.