Skip to Content
avatar image
-1
Former Member

abap program for optimization

ztest-program.txt

Hi ABAP,

I am an abap newbie. I have written a code that needs to be optimized.

Not sure if my attached ABAP source code is already optimized.

Please check my source code and provide comments or suggestions if it is optimized or not.

Thank you

Juan

ztest-program.txt (62.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Former Member

    zabap.txt

    Hi ABAP Gurus,

    Please see my attached file.

    Do you think my program is now optimized?

    Thank you all sooooo much.

    Juan

    zabap.txt (64.3 kB)
  • I refer you to my earlier answer:

    No. It's not optimised.

    It uses performs, which are obsolete ABAP constructs. You should re-write in an object oriented fashion ,

    It's not well modularised. Rule of thumb, no modular unit should be more than about 20 statements. (Rule of thumb so there are exceptions).

    You've not used HASHED or SORTED tables.

    Looks like you've got nested database selects - you don't have any INNER JOINs.

    Rather than ask if your code is optimised, why don't you research the tools that analyse the runtime and apply them. Find out where the bottlenecks are and look for ways to improve.

    You don't appear to have followed the advice in the links in the answer you've marked as accepted (even though it got negative votes).

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 06 at 09:07 AM
    -1
    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06 at 09:44 AM

    Maybe it is a good idea, to read the ABAP Programming Guidelines and to follow the rules:

    https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abenabap_pgl.htm

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06 at 06:00 AM

    No. It's not optimised.

    It uses performs, which are obsolete ABAP constructs. You should re-write in an object oriented fashion ,

    It's not well modularised. Rule of thumb, no modular unit should be more than about 20 statements. (Rule of thumb so there are exceptions).

    You've not used HASHED or SORTED tables.

    Looks like you've got nested database selects - you don't have any INNER JOINs.

    Rather than ask if your code is optimised, why don't you research the tools that analyse the runtime and apply them. Find out where the bottlenecks are and look for ways to improve.

    Add comment
    10|10000 characters needed characters exceeded