2012 Jul 20 10:26 AM
Hi Gurus,
I am facing a very strange problem in my report.
I have written a 1 query
SELECT wi_id
wi_stat
wi_ct
wi_aed
wi_aagent
parent_wi
FROM swwwihead
INTO TABLE gt_swwwihead1 FOR ALL ENTRIES IN gt_swwwihead
WHERE parent_wi = gt_swwwihead-wi_id
AND wi_type = gc_w.
Above query is taking lot of time when we are testing in quality client (OQY) where records are less as compared to developmnt client
and for the same in ODY which has more records and is executing very fast.
I am little confused with this behaviour
Pls suggest me with ur expert advice .
below I mentioned bit elaborated code to give u more clarity
SELECT wi_id
wi_stat
wi_ct
wi_aed
wi_aagent
parent_wi
FROM swwwihead
INTO TABLE gt_swwwihead
FOR ALL ENTRIES IN gt_sww_wi2obj
WHERE wi_id = gt_sww_wi2obj-wi_id
AND wi_type = gc_f.
IF sy-subrc = 0 .
SELECT wi_id
wi_stat
wi_ct
wi_aed
wi_aagent
parent_wi
FROM swwwihead
INTO TABLE gt_swwwihead1"APPENDING TABLE gt_swwwihead
FOR ALL ENTRIES IN gt_swwwihead
WHERE parent_wi = gt_swwwihead-wi_id
AND wi_type = gc_w.
IF sy-subrc = 0 .
APPEND LINES OF gt_swwwihead1 TO gt_swwwihead.
SELECT wi_id
meth_etime
FROM swwloghist
INTO TABLE gt_swwloghist
FOR ALL ENTRIES IN gt_swwwihead
WHERE wi_id = gt_swwwihead-wi_id.
ENDIF.
ENDIF.
ENDIF.
Regards
Sumeet
2012 Jul 20 10:39 AM
HI sumeet,
Create a secondary index for Table swwwihead for PARENT_WI field.you are using it in where condition without any primary key.
Regards
Ajit
Hi Gurus,
I am facing a very strange problem in my report.
I have written a 1 query
SELECT wi_id
wi_stat
wi_ct
wi_aed
wi_aagent
parent_wi
FROM swwwihead
INTO TABLE gt_swwwihead1 FOR ALL ENTRIES IN gt_swwwihead
WHERE parent_wi = gt_swwwihead-wi_id
AND wi_type = gc_w.
Above query is taking lot of time when we are testing in quality client (OQY) where records are less as compared to developmnt client
and for the same in ODY which has more records and is executing very fast.
I am little confused with this behaviour
Pls suggest me with ur expert advice .
below I mentioned bit elaborated code to give u more clarity
SELECT wi_id
wi_stat
wi_ct
wi_aed
wi_aagent
parent_wi
FROM swwwihead
INTO TABLE gt_swwwihead
FOR ALL ENTRIES IN gt_sww_wi2obj
WHERE wi_id = gt_sww_wi2obj-wi_id
AND wi_type = gc_f.
IF sy-subrc = 0 .
SELECT wi_id
wi_stat
wi_ct
wi_aed
wi_aagent
parent_wi
FROM swwwihead
INTO TABLE gt_swwwihead1"APPENDING TABLE gt_swwwihead
FOR ALL ENTRIES IN gt_swwwihead
WHERE parent_wi = gt_swwwihead-wi_id
AND wi_type = gc_w.
IF sy-subrc = 0 .
APPEND LINES OF gt_swwwihead1 TO gt_swwwihead.
SELECT wi_id
meth_etime
FROM swwloghist
INTO TABLE gt_swwloghist
FOR ALL ENTRIES IN gt_swwwihead
WHERE wi_id = gt_swwwihead-wi_id.
ENDIF.
ENDIF.
ENDIF.
Regards
Sumeet
2012 Jul 20 10:39 AM
HI sumeet,
Create a secondary index for Table swwwihead for PARENT_WI field.you are using it in where condition without any primary key.
Regards
Ajit
2012 Jul 23 10:18 AM
Thanx ajit...my query is answered. I created secondary index for the same.
2012 Jul 20 10:52 AM
Hi Sumeet,
sort the table gt_swwwihead before using for all entries. and delete adjacent duplicates from it.
Regards,
Ashish
2012 Jul 20 10:53 AM
Hi,
Have you checked if the table'gt_sww_wi2obj' is not initial before SELECT....FOR ALL ENTRIES.'gt_sww_wi2obj'..?
If table is initial it will select all records....