- SFTRACE transaction.
- Hard break point.
- Debugging the actual function module generated on activation of smartforms.
1. SFTRACE transaction:
This transaction is useful when you need to debug in production systems or when you need to find out which smartform is triggered in the system.
Using SFTRACE transaction:
1. Go to SFTRACE transaction.
2. Switch on the Trace and select the level of trace.
3. Now execute the smartform.
4. Switch of the trace in SFTRACE transaction and check the Traces in Database section select the log you want to check and click Display Trace.
The log displays the list of errors:
2. Hard break point
This technique is useful when you want to debug your smartform from a particular point.
Using hard break point technique:
1.Open the smartform that you want to debug in the smarforms transaction.
2.Put a hard break point in the section that you want to debug(normal break points don't work in the smarform editor) e.g. BREAK <your SAP T-code>
3. Execute your smarform and it will stop at the point where you have put the break point.
3. Debugging the actual function module generated on activation of smartforms.
This technique is useful when you want to debug the entire smartfrom.
Steps to debug the actual code of smartfroms:
1. Go to SE37 transaction and enter the name of the function module that is generated on the activation of smartfrom.
2. Display the Function Module and go to the Attributes tab.
3. Double click on the Program name, it should take you to SAP editor containing Includes.
4. In the User-defined Include-files section double click on the last Include.
5. First few lines is the system generated code followed by the code that we have written for the smarfroms.
6. Now you can put a break point in this code and execute the smartform , the control will stop at the point where you have put the break point.