01-05-2015 9:42 AM
Hi All;
I am in charge of optimizing an ABAP Code. After debugging the program I found that the most CPU consuming operation is :
FETCH NEXT CURSOR s_cursor
INTO CORRESPONDING FIELDS OF TABLE t_table
PACKAGE SIZE s_s_if-maxsize.
How Can I reduce the execution time of this code to get a better performance of the ABAP program.
Regards
Anis
01-05-2015 9:54 AM
I can see immediately this is a BI/BW extractor. (or similar).
You have to find the OPEN CURSOR that defines the selection, and optimise that. On the BI/BW end, you may be able to get better performance by tweaking the package side.
01-05-2015 10:17 AM
Hello Matthew
In fact you are coorect this is a BI/BW Extractor. The problem is that when we use a package size of 50000 ( standard SAP ) the extractor crashes with out of memory issue. I would like to optimze it in order to get it working with 50000 as a package size. When debugging I saw that this fetch is taking a long time to be executed, could it not be the root cause of this issue ???
Thanks in advance.
Regards
Anis
01-05-2015 10:45 AM
Hi Anis,
the package size probably is the root cause of the out of memory crash.
The root cause for bad performance lies in the open cursor statement, probably WHERE clause not using appropriate index.
As most SAP objects, BW extractors were never built and/or tested in real mass data environments.
For improvement, check definition of t_table. It may have far more field than necessary. Also check if use of any table index or even adding an index to the table in question may help.
Regards, Clemens
01-05-2015 10:58 AM
As I said.
You have to find the OPEN CURSOR that defines the selection, and optimise that.
But in your first post you said it was a high cpu problem. Now you're saying it's an out of memory problem. Which is it?
Also, is this a standard extractor or a custom (generic) one?
01-05-2015 3:04 PM