Oct 8, 2011

How to debug Smartforms

Debugging SmartForms using Function Module

If you want to debug Smartform document in non-modifiable client, then you can try debugging Smartforms Function Module using soft break point.

First you need to find the function module name of the target SmartForm for debugging.
If you do not know how to get the function module name of the SAP Smart Form, please read the Smart Form tutorial titled How to Find SAP SmartForms Function Module Name.
Without knowing the function module name, we can not debug SmartForms in non-modifiable clients.

After you find the function module name, we can now display the ABAP source codes of the SSF FM (Function Module) using the SAP Transaction SE37.

Within the ABAP codes of Smartform FM you can put a soft break-point any where suitable for your debugging Smartforms purposes.

It is better to copy the node name or some parts of the ABAP code in the SAP Smartform and search the text within the SE37 displayed source code of the Smartforms function module (FM).

You can place a soft break point in the source code using Ctrl+Shift+12 key combination or using the Stop icon sap-stop-icon-to-debug.

Let's assume that you want to debug Smartforms codes within program lines named '%CODE10' as seen in the followin Smartform screenshot,

search-code-node-in-sap-smart-form-function-module

First click on the Search button sap-search-icon-to-find-text-in-code, and not use the Ctrl+F since searc button has far more powerful functionalities than ordinary Ctrl+F search.

Enter the text you are searching in the Find text area.
You can search for the node name '%CODE10' as well as for a part of your SmartForm code.

What is important here in this Search is be sure that you selected the option "In main program".
Otherwise your search will take place only for a limited part of the Smartform function module codes.

search-code-node-in-sap-smart-form-function-module-main-program

When the place of the target code block is found, you can run the SAP Smart Form and start to debug Smartform document.

No comments :