08-21-2007 12:13 AM
In my report I've written this select query
if not itab1[] is initial.
select objnr
kstar
ebeln
wtgbtr
wogbtr
from covp
into table itab2
for all entries in itab1
where perio in s_period
and objnr = itab1-objnr
and gjahr = p_fyear .
endif.
In the selection screen if s_period(select-options) is left blank or only low value is entered then the report is
running properly. however if both high and low values are entered, it is taking lot of time to execute and running
into dump....Error is cited to this select logic.
Please can someone help how to fix this one and provide me any tips for proceeding in this.
Thank you
08-21-2007 12:26 AM
Hi,
1, selecting a database view without proper key?
2. All the fields selecting are available in table COEP then why selecting from DB view COVP?
May try with the followin
if not itab1[] is initial.
select objnr
kstar
ebeln
wtgbtr
wogbtr
from covp
into table itab2
for all entries in itab1
where objnr = itab1-objnr
and gjahr = p_fyear .
endif.
delete itab2 where NOT perio in s_period.
But i will not suggest for this code
aRs
08-21-2007 12:26 AM
Hi,
1, selecting a database view without proper key?
2. All the fields selecting are available in table COEP then why selecting from DB view COVP?
May try with the followin
if not itab1[] is initial.
select objnr
kstar
ebeln
wtgbtr
wogbtr
from covp
into table itab2
for all entries in itab1
where objnr = itab1-objnr
and gjahr = p_fyear .
endif.
delete itab2 where NOT perio in s_period.
But i will not suggest for this code
aRs
08-21-2007 12:36 AM
what is the key for covp...
can you suggest a better option of writing this one........
08-21-2007 12:47 AM
Hi,
If u are selecting from COEP then also you don;t have proper key for select.
Try with my previous thread code
aRs
08-21-2007 12:49 AM
what's the key for covp and coep...
i'll try to test the code given by you...
08-21-2007 12:55 AM
Hi,
Primary keys for COEP
KOKRS
BELNR
BUZEI
First secondary index COEP are of 1
MANDT
LEDNR
OBJNR
GJAHR
WRTTP
VERSN
KSTAR
HRKFT
PERIO
VRGNG
PAROB
USPOB
VBUND
PARGB
BEKNZ
TWAER
secondary index of 2
OBJNR
KSTAR
GJAHR
PERIO
PAROB1
secondary index of 4
TIMESTMP
OBJNR
aRs
08-21-2007 12:58 AM
Yaa i might think of using the secondary index of coep table...
i'll give a try ......
08-21-2007 1:06 AM
Hi,
If you are going to use sec. index then please try to use full fields and in the same order mentioned in my previous thread
aRs
08-21-2007 1:17 AM
sure....
please reply back to this thread if i come up with other questions thank you