01-09-2015 3:34 PM
Implementing Parallel Processing - Background Processing - SAP Library
I have been gone through the above document about parallel processing.
My problem may be a typical one. For example, in my report, the structure of which is:
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?
01-09-2015 4:16 PM
Hi Ming,
Can you please share your full coding(statements inside subroutine), that help us to know more about the problem.
Regards
Rajkumar Narasimman.
01-10-2015 8:24 AM
Hi,
perform of processing data is like:
LOOP AT lt_ab1 INTO ls_ab1.
ls_ab2-xxx = ls_ab1-xxx.
APPEND ls_ab2 TO lt_ab2.
ENDLOOP.
This is a sample, the real logic is much more complicated.
My problem is if lt_ab1 is large, can I use aRFC tech to reduce the time consumption?
01-10-2015 9:13 AM
Hi Ming,
Ming Yu wrote:
My problem is if lt_ab1 is large, can I use a RFC tech to reduce the time consumption?
You are expecting for performance in the program, in order to do that, use runtime analysis tool(SM30) that helps to find at where it is taking more time.
Parallel Cursor method increases the performance during nested loop. It is based on index search. Please find the below link for Parallel cursor .
ABAP Code for Parallel Cursor - Loop Processing - Code Gallery - SCN Wiki
Use subroutines instead of RFC FM inside loop, that helps to increase the performance.
Before using Internal table, sort the internal table based on key. Use Binary search in READ Statement, that helps to increase the performance.
Regards
Rajkumar Narasimman
01-13-2015 9:27 AM
Hi Ming,
Yes, you can implement parallel processing of RFC, dividing your internal table in different groups and then calling parallel RFC, like that:
http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/096e92543b11d1898e0000e8322d00/content.htm
The problem is:
If you "simply" need to populate another internal table, you will have to wait to receive the different results and then you'll have to collect all of them in 1 unique table, so I'm not sure it will improve so much your performances.
Maybe it would be better first to rework your code for example with field symbols, mass moves (lt_ab2[] = lt_ab1[])...
Regards,
Thomas
01-09-2015 4:26 PM
Hi Ming Yu,
Can you please give détails about the "process of data"?
Just calculations/transformations of data or any call of transaction/function?..
Cheers
Thomas
01-10-2015 8:25 AM
01-09-2015 4:41 PM