By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
I have been around for a while, and seeing a recent tip on the BREAK macro made me realize that there are a lot of folks who are still learning this ABAP language. When I am doing serious development that requires some break points, I put a parameter in the selection screen: parameters: p_brk as checkbox default 'X'. Then where I may want to break, I put the code: if not p_brk is initial. break my_user_name. endif. Now, if I hit a break point & have many iterations of a loop process, I can set a breakpoint outside that process & then use the debugger to modify p_brk so I don't have to break any more during that loop processing. The break point I set outside the loop process will allow me to modify p_brk again to activate it. Remember, though: It is a good practice to remove all break points & break macros before transporting to a test or production system. That would include removing the parameter definition of this field. Just in case, though, you may need to have this capability in a test or production environment. You can make this parameter invisible, so no one else would ever see it on the seleciton screen! You can then code in some logic to determine when it is active, looking at SY-SYSID & SY-MANDT along with the parameter itself... Hope this helps someone a bit! Peace!
Parameters: P_BRK. . . . if not P_BRK is initial. break USERNAME. endif. . . . if SY-SYSID = 'DEV' and not P_BRK is initial. break USERNAME. endif.