SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow


How to Debug SmartForms - Debugging SAP SmartForm in ABAP ?


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.





Debug Smart Form using Break-Point

If you are in a modifiable client, or where you can alter the codes of your SAP SmartForms, then there is an other alternative method that you can debug Smart Forms.
One way of debugging Smartform documents is placing break points within the Smart Form program lines like shown in below ABAP code :

BREAK SAPUserName.
* where SAPUserName is your ABAP Developer user
* OR
BREAK-POINT.
* will stop program execution for all SmartForm callers
Code

Smart Form Trace with SFTRACE or SMARTFORM_TRACE

An other SAP tool that might help ABAP developers troubleshoot with Smart Forms and to debug SmartForm can be the Smart Form Trace.
You can activate Smart Form Trace for tracing Smartform execution process using the SAP transaction SFTRACE or SMARTFORM_TRACE codes.
For more help on Smart Form Trace and use to debug Smartforms, please refer to SAP Help documentation.



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.