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 on CDHDR time taking

Former Member
0 Likes
1,029

hello all,

I have below statement ( copied from FM SD_CHANGE_DOCS_LOAD)

SELECT * INTO TABLE i_cdhdr FROM cdhdr "Read changedoc header

WHERE objectclas = chgdoc-class

AND username IN so_user

AND udate IN so_date

AND utime IN so_time

AND tcode IN so_tcode.

It is taking too much time which is unacceptable.

do you have any idea to improve the efficiency in the above

useful answers will be rewarded.

thanks

Can you please suggest

hello all,

I have below statement ( copied from FM SD_CHANGE_DOCS_LOAD)

SELECT * INTO TABLE i_cdhdr FROM cdhdr "Read changedoc header

WHERE objectclas = chgdoc-class

AND username IN so_user

AND udate IN so_date

AND utime IN so_time

AND tcode IN so_tcode.

It is taking too much time which is unacceptable.

do you have any idea to improve the efficiency in the above

useful answers will be rewarded.

thanks

Can you please suggest

7 REPLIES 7
Read only

Former Member
0 Likes
860

hi,

try replacing IN operator by = sign in case so_* are not tables.

Thanks,

Kasiraman R

Read only

0 Likes
860

hi,

sorry they are all tables. (ranges)

Read only

Former Member
0 Likes
860

Hi,

Try reducing the number of columns . instead of select * use only selected columns.

There is no other way to improve the performance of this query.

Thanks,

kasiraman R

Read only

Former Member
0 Likes
860

hi

good

try to use the MOVE CORREPOSDING FIELDS OF statement with the select query and see the difference,try to use the key field in the select query.

thanks

mrutyun^

Read only

0 Likes
860

Hi Kasi,

there are not many fields in the table

Hi Mruthyun,

do mean to say INTO CORRESPONDING FIELDS OF ?

I was thinking avoiding this is better.

ok, let me try that too

Read only

0 Likes
860

No

INTO CORRESPONDING FIELDS does not make any considerable difference.

I can not give all the key fields because I will be knowing only OBJECTCLASS.

Read only

Former Member
0 Likes
860

Hi Surendra,

performance of the select statement might be low bcoz of the selection strategy you followed while coding the select statement. i think this link might help u to solve ur problem upto some extent

http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm

Thanks,

anil.