Archived discussions are read-only. Learn more about SAP Q&A

Performance improvement

Hi Guys,

Is there any chance of improving the performance of these two select queries. This will be running in both fore ground and back ground. No chance of giving Material numbers. We will always exclude materials that starts with M(Exclude M*). User is getting timed out error if he run this report for 2 weeks in production.

SELECT objectclas objectid changenr username udate utime

planchngnr act_chngno change_ind

INTO TABLE i_cdhdr

FROM cdhdr

WHERE objectclas EQ c_mat

AND objectid IN so_matnr

AND udate IN so_udate.

IF NOT i_cdhdr[] IS INITIAL.

SORT i_cdhdr BY objectclas objectid changenr.

SELECT objectclas objectid changenr tabname tabkey fname

chngind text_case

INTO TABLE i_cdpos

FROM cdpos

FOR ALL ENTRIES IN i_cdhdr

WHERE objectclas EQ i_cdhdr-objectclas

AND objectid EQ i_cdhdr-objectid

AND changenr EQ i_cdhdr-changenr

AND tabname EQ c_mvke

AND fname EQ c_key

AND chngind IN (c_i, c_d).

ENDIF.

c_mat- 'MATERIAL'

so_matnr- Exclude M*

so_udate- Date range(Probably 2 weeks)

c_mvke- 'MVKE'

c_key-'KEY'

c_i-'I'

c_d-'D'.

Please let me know some solution for this. Also is there any function module available to get the above data. I am using 4.6C version.

Thanks in Advance,

Vinod.

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question