How to debug smartform in production system?

Have you encountered now a logical bug in your smartform which only appears when transported in the production system? Then we cannot replicate the same issue in our development box. So in this case, we have no option but to debug the form directly in production system, right? But we all know that setting a debugging point in the smartform is prohibited in this system. So do you have any idea to debug it?

In this tutorial, I will discuss a simple technique on how to debug the form even on the production system without any interference on the actual code. Just follow the following steps detailed below.

Steps:
1.Run tcode Smartform and open your form. If you are not authorized in your production system to open your form, go back into your development system. 
 

2. Once your form is open, go to main menu, click on Environment-->Function Module Name.
 

3. In this screenshot, you will see the function name of this form. Take note that every smartform you created, a function name is generated unlike in sapscript that no FM is created.
 

4. So in the previous steps, we get the name of the function module generated for this form. Our next goal is to determine which part of the form will it going to stop. So in my sample as you see, I need to debug the program lines under %CODE1. Please take note the name of the program lines since we will use this later.
 

5. After getting the function module name of the form and determining the part where we will going to debug, we are ready to set the breakpoint now. Go to SE37 and input the FM name generated above. Then click display the button. Perform this procedure in your production system. If you dont have any access in SE37, then ask your Basis people to provide you.
 

6. Then on the toolbar, select the find button with plus sign. 
 

7. Then on this screen, input the name of the program lines you want to debug. Then select the option "In main program". Then click ok.
 

8. In this screen, it will show what lines contains your search word. Just double click it so you will be directed in the actual code.
 

9. Finally, you will see now your code and you can put a breakpoint just like below. Run your program again and debugging mode will then be prompted.


Enjoy reading... Keep on visiting my blogs. :)

2 comments:

How to download the data structure of tables in SE11?

Good morning people around the world. Its me again doing some blogs. Sharing to you some tips and tricks in the SAP world. Well, before I s...