Procedure documentationStatic Breakpoints Locate this document in the navigation structure

 

You should only use static breakpoints during the development phase of an application. You must remove them from your program before you transport it.

Procedure

Setting Breakpoints

To set a static breakpoint, use the ABAP statement BREAK-POINT. Place the breakpoint in the line at which you want to interrupt the program.

Syntax Syntax

  1. program RSDEBUG_01.
  2. ....
  3. if SY-SUBRC <> 0.
  4. break-point.
  5. endif.
  6. ....
End of the code.

When you run the program, the runtime processor interrupts it when the breakpoints occur. You can number your breakpoints to make them easier to identify, for example, BREAK-POINT 1 or BREAK-POINT 2.

Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.

You can, however, set static breakpoints that are user-specific. Use the key word BREAK and follow it immediately by your user name. Example: For example, if you use the statement BREAK SMITH, the program is only interrupted when user Smith runs it. Although user-specific breakpoints appear in the program code, they are not active when other users run the program. You should, however, be careful if an application is being used by several users with the same name.

Deleting Breakpoints

Since static breakpoints apply to all users, you must remove them from the program once you have finished testing it. In the ABAP Editor, you can find breakpoints quickly by choosing   Utilities   Global Search  . You can also use the Extended Program Check to find them.

Caution Caution

If you do not remove static breakpoints from your program, they will be transported to your production system. This could cause serious problems in the production system.

End of the caution.