Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Forms and Nested Loops

former_member687052
Participant
0 Kudos
360

Hi,

I am writing a report. In that I am trying to write Nested Forms as shown below.

***************************************

FORM XXX.

...............

...............

PERFORM YYYY.

..............

..............

ENDFORM.

**************************************

Is that a good practice in performance pint of view. I mean, would it burden the database if we do so.

The same way, I am trying to write Nested LOOPs. Is that a good practice in performance pint of view. would it create any problem..?

Please give me your valuable inputs.

Thanks in advance.

Regards,

Pradeep.

7 REPLIES 7

Former Member
0 Kudos
138

Hi,

Avoid using Nested loops. It affects the performance a lot. It may used at times needed. But try to avoid that.

Nested performs can be used. It will not affect the performance.

Regards,

Priyanka.

Former Member
0 Kudos
138

Hi Paddu,

Nested Forms is defnitely a performance issue, it would be burden to database.

in case of Nested Loops it is not a problem, because there u can use 'Read Statement' while nesting internal tables.

Former Member
0 Kudos
138

Hi,

Nested PERFORMS are good to write the code, if the code is useful in another place then we can write the performs, or we can write teh performs to devide the code to understand it easily ...

Nested Selects are not recomended, you need to use the FOR ALL NETRIES or JOINS statment instead of the nested selects, performance wise the nested Selects are not good,

Regards

Sudheer

Former Member
0 Kudos
138

Avoid using Nested Loops. Instead use READ TABLE inside a loop, to improve the performance.

You can any number of Performs inside a perform. This doesn't have any effect on performance issue.

Regards,

Pavan.

Former Member
0 Kudos
138

Hi,

It is not appreciable to write Nested Loop.It will affect the Performance.

Regards,

Padmam.

Former Member
0 Kudos
138

Hi,

Regarding Nested forms there is no issue in doing so. Main thing is that u r making your code modularized.

Making use of more forms decreases redundancy of code.

For nested loops, it affects the performance issue.

Thanks & Regards

Santhosh

Former Member
0 Kudos
138

Every form creates its LOCAL memory so if we keep on adding nesting forms then it consumes a lot of memory and this will surely bring down the performance.

same way loops even affect the programs performance so avoid using this thinks.