Application Development and Automation 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: 
Read only

AT NEW/AT END performance versus using temp variables.

Former Member
0 Likes
756

What would be more efficient? Imagine you are looping through a table that contains sales information for many sales documents/sales groups/sales offices. I need an AT statement for each. The amount of data that this report is HUGE so any performance would be noticed.

So, which would perform better? Using some if statements along with temp variables or the AT statements?

Regards,

Davis

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
680

Hi Devis,

Better use control break statements, But make sure that the primary conditions are met in the loop in which you are performing the AT

statement

Regards

Pavan

3 REPLIES 3
Read only

Former Member
0 Likes
680

Hi Davis,

I think you dont find much difference between the the IF condition and AT statements.

There will be no performance issue regarding them.

In IF condition we need to write some logic like moving it to the other variable and check the variable with the current loop pass value. In Control Break statement ( AT statements ) we need not to use any variables.

Best regards,

raam

Read only

Former Member
0 Likes
681

Hi Devis,

Better use control break statements, But make sure that the primary conditions are met in the loop in which you are performing the AT

statement

Regards

Pavan

Read only

Former Member
0 Likes
680

You can use Control break statements.

make sure you sorted the Table with the fields you are going to perform control breaks.

and also those fields should be in the beginning or the fields changes should not controlled by any other fields.

you need to use one extra work area to avoid '*' may be some cases you want some data from the work area.

loop at itab.
 wa = itab.
at new field.

"here some fields which are next to control break fields will appear stars
"so use work area here
endat.

endloop.