Skip to Content

Why ABAP 7.4 syntax is reducing the Performance?

Hello,

I am using ABAP 7.4 syntax to test whether it improves the performance or not. But in SE30, I found that using ABAP 7.4, it reduces the performance. So, should I use ABAP 7.4 syntax? or am I doing something wrong?

For example, I have used a loop for summation of a field. Check the below syntax:

ABAP7.4 is taking more time. See the SE30 report analysis:

Similarly, for every other scenario like copying the value of a field of an internal table into another, reading an internal table into a work area, ABAP 7.4 is taking more time.

Please help!!

capture0.png (9.1 kB)
capture1.png (4.7 kB)
capture2.jpg (89.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 06, 2017 at 03:07 PM

    Could you try to change from this

    data(lsum) = REDUCE i( init x = 0 for wa in gt_tab1 next x = x + wa-wkurs ).
    

    to

    data(lsum) = REDUCE i( init x = 0 for <wa> in gt_tab1 next x = x + <wa>-wkurs ).

    In your loop, you are using field symbols while in the reduce case, you seems to use a work area. That would results in data copy which may be the reason you lose performance.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 06, 2017 at 02:51 PM

    How often did you measure? Did you measure a large number of executions in a loop?

    From looking at the screenshot I'd say, they use the same time.

    Add comment
    10|10000 characters needed characters exceeded

    • So a loss of 1 to 3 %. That would be nice if the performance issues were only limited to that. Usually, the biggest issues in ABAP programs come from the database, and the unit is in minutes and even hours in worst cases. Don't lose too much time for saving a few milliseconds.