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

Parallel Cursor method

Former Member
0 Likes
2,633

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,623

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

Read only

Former Member
0 Likes
1,623

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!

Read only

Former Member
0 Likes
1,623

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

Read only

Tesmin
Explorer
Read only

Former Member
0 Likes
1,623

Hi Vikas,

You should to sort internal table before reading.

Thanks & regards,