‎2009 Apr 27 5:21 AM
Dear Experts,
I am using parallel cursor method for a nested loop by using this method the report got very fast
but the data from the loop where I used Parallel cursor method is not coimng after 7000 records.
Say when I am running the report from 1st jan to 30 jan total records are 48,000 but data from parallel cursor method 's loop is cumin till 7th of jan (7000 records) after that all values are coming zero.
When I am running it from 7th of jan to 30 th Jan data from that loop is cumin till 15th of jan(7000 records) after that values are cumin zero.
Below I am writing the code I used for parallel cursor method loop
paralele cursor method
data : v_index type sy-tabix.
read TABLE i_konv into wa_konv with key knumv = wa_vbrk-knumv
kposn = wa_vbrp-posnr binary search.
if sy-subrc = 0.
v_index = sy-tabix.
loop at i_konv into wa_konv FROM v_index. "FROM v_index.
**
if wa_konv-knumv = wa_vbrk-knumv.
if wa_konv-kposn <> wa_vbrp-posnr.
exit.
endif.
else.
exit.
endif.
*----
Thanks and Regards,
Vikas Patel
‎2009 Apr 27 5:52 AM
Hi Vikas,
see the below link for parallel curusor method..
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b23358411d1829f0000e829fbfe/frameset.htm
re[Parallel cursor|http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b23358411d1829f0000e829fbfe/frameset.htm]
Regards,
Prabhudas
‎2009 Apr 27 5:57 AM
Hi Vikas,
Are you sorting the internal table which you are looping...
this method doesn't have any limit of records, it will work all the entries.
try to look, is your internal table holding all the 48000 records...or not..
Thanks!
‎2009 Apr 27 7:09 AM
Hi Vikas,
First check there are records available completely in you Internal table...
and Here is a very simple example for parallel cusor..
REPORT zparallel_cursor.
TABLES:
likp,
lips.
DATA:
t_likp TYPE TABLE OF likp,
t_lips TYPE TABLE OF lips.
DATA:
w_runtime1 TYPE i,
w_runtime2 TYPE i,
w_index LIKE sy-index.
START-OF-SELECTION.
SELECT *
FROM likp
INTO TABLE t_likp.
SELECT *
FROM lips
INTO TABLE t_lips.
GET RUN TIME FIELD w_runtime1.
SORT t_likp BY vbeln.
SORT t_lips BY vbeln.
LOOP AT t_likp INTO likp.
LOOP AT t_lips INTO lips FROM w_index.
IF likp-vbeln NE lips-vbeln.
w_index = sy-tabix.
EXIT.
ENDIF.
ENDLOOP.
ENDLOOP.
compare the difference.
Thanks & regards,
Dileep .C
‎2015 Oct 12 8:48 AM
Please see below link: http://saptech3.blogspot.in/2015/07/parallel-cursor-abap-huge-performance.html
‎2015 Oct 12 9:02 AM
Hi Vikas,
You should to sort internal table before reading.
Thanks & regards,