Hi Ming,
Ming Yu wrote:
PERFORM get_data."get data from DB
LOOP AT internal_table.
PERFORM process_data."process every line of internal table
ENDLOOP.
PERFORM output_data."download the internal table as a txt file
How could I use parallel tech in my report?
Parallel Cursor Method:
"Sorting the Internal table is very important
sort: lt_vbpa by kunnr, "Outer Table
lt_kna1 by kunnr. "Inner Table
"Outer Loop - Header Table
loop at lt_vbpa into wa_vbpa.
" This sets the sy-tabix
read lt_kna1 into wa_kna1
with key kunnr = wa_vbpa-kunnr
binary search.
if sy-subrc = 0.
"Get the Index value
v_kna1_index = sy-tabix.
"Inner Loop based on index value
loop at lt_kna1 into wa_kna1 from v_kna1_index.
"
This checks whether to exit out of loop
if wa_kna1-kunnr <> wa_vbpa-kunnr.
"Exit from the Inner Loop
exit.
endif.
**
**
**
Your Actual logic within inner loop
**
**
**
endloop.
"KNA1 Loop
endif.
endloop. "
VBPA Loop
Regards
Rajkumar Narasimman