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: 

Doubt in sap concept.

0 Kudos

What are the disadvantages of using Control Break Statements in abap.

1 ACCEPTED SOLUTION

former_member1716
Active Contributor

Hello MAHARSHI PADAMATINTI,

One issue that we face in control break statements is in between the AT... ENDAT, We can't process the values in the loop. The values of the work area of loop will hold value like ***** etc... In the AT... ENDAT block. Thats the reason we have to declare a variable inside AT... ENDAT block and we have to process the values of the loop outside the AT... ENDAT block .

Another one is you have to be very careful with the choice of the field you select for control break statements. In case you select the third field in the loop then the processing of control break statements will happen for the combination of first three fields and it will not consider only the third field for processing.

Another requisite is these statements should only be used inside a loop.

All the above are just precautions we should follow while dealing with control break statements. I don't see them as a drawback. We have different statements to deal different scenarios. Based on Your requirements you should decide.

Below link can give you a better understanding!

CONTROL BREAK STATEMENTS

Regards!

4 REPLIES 4

Sourav1
Participant
0 Kudos

one i can think of is, if your table isnt sorted by that specific field, AT NEW command will work in the wrong way if not handled.

former_member1716
Active Contributor

Hello MAHARSHI PADAMATINTI,

One issue that we face in control break statements is in between the AT... ENDAT, We can't process the values in the loop. The values of the work area of loop will hold value like ***** etc... In the AT... ENDAT block. Thats the reason we have to declare a variable inside AT... ENDAT block and we have to process the values of the loop outside the AT... ENDAT block .

Another one is you have to be very careful with the choice of the field you select for control break statements. In case you select the third field in the loop then the processing of control break statements will happen for the combination of first three fields and it will not consider only the third field for processing.

Another requisite is these statements should only be used inside a loop.

All the above are just precautions we should follow while dealing with control break statements. I don't see them as a drawback. We have different statements to deal different scenarios. Based on Your requirements you should decide.

Below link can give you a better understanding!

CONTROL BREAK STATEMENTS

Regards!

0 Kudos

Thanks for helping me!

So glad that you could help me out.

Sandra_Rossi
Active Contributor

Please use a meaningful title (hopefully everybody don't post questions with title "question... urgent... plzzzzz help me")