Skip to Content
-1

abap program for optimization

Apr 06 at 05:51 AM

133

avatar image
Former Member

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)
10 |10000 characters needed characters left 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)
0

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).

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Ganesh pandian Apr 06 at 09:07 AM
-1
Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Apr 06 at 09:44 AM
3

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

Share
10 |10000 characters needed characters left characters exceeded
Matthew Billingham
Apr 06 at 06:00 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded