‎2008 Feb 28 11:33 AM
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
‎2008 Feb 28 11:39 AM
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
‎2008 Feb 28 11:44 AM
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??