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 Query help REQ??? for CDHDR table

Former Member
0 Likes
503

hi

I have a problem in my select query for fetching data form CDHDR table,

like one time i am using a select query to fect the PO data like udate,utime,tcode,than its giving o/p within seconds,but when i use the same select query for PR ,its taking too much time,almost 50-60 sec,i am surprised whay in case of PR dat aits take so much time,when even i am hardcoding in PO ME29N & in PR ME54N.

Can any one plz tell me,what else i can do to make the selcet query working more efficiently.

regds

2 REPLIES 2
Read only

Former Member
0 Likes
438

hi,

use this select query may it help you..

CONCATENATE it_data-mandt

it_data-ebeln

it_data-ebelp

INTO v_tabkey.

v_tabname = 'EKPO'.

v_objectclas = 'EINKBELEG'.

v_fieldname = 'LOEKZ'.

v_changeid = 'U'.

v_newvalue = 'S'.

v_oldvalue = ' '.

v_newvalue1 = ' '.

v_oldvalue1 = 'S'.

SELECT SINGLE changenr

INTO v_changenr FROM cdpos

WHERE tabname = v_tabname

AND objectclas = v_objectclas

AND objectid = v_objectid

AND tabkey = v_tabkey

AND fname = v_fieldname

AND chngind = v_changeid

AND value_new = v_newvalue

AND value_old = v_oldvalue.

IF v_changenr IS NOT INITIAL.

SELECT SINGLE udate

INTO v_releasedate FROM cdhdr

WHERE changenr = v_changenr.

ENDIF.

regards,

paras

Read only

0 Likes
438

Hi

I need to fetch all the dates for a PR no.,so I need to selct all the dates for Tcode ME54N.

Same i am doing for PO,where its executing in 4-5 secs,but in PR case more than 4- sec...

any other way??