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 SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.

Install SAP Free

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,


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.


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 :

* where SAPUserName is your ABAP Developer user
* OR
* will stop program execution for all SmartForm callers

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 Resources

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Meetup Sunumu 1 meetup

Related Articles and Tutorials(http://www.kodyaz.com/articles/sap-how-to-debug-smartforms-debugging-smartform-sap-abap.aspx)
How to Debug SmartForms - Debugging SAP SmartForm in ABAP ?
SAP Smartforms - How to Call Smartform within ABAP Program
SAP Smartforms Table for Sales Order and Invoice Outputs
SAP Smartforms Tutorial - How to Create Smartform
SAP Smartforms Tutorial - Create Smartforms Example
SAP Smartforms Tutorial - Table Calculations using Count
SAP Smartforms Tutorial - Table Calculations using Sum Total
ABAP Runtime Error ST22 Transaction using Short Dump Analysis
Complex Conditions in SAP Smartform with AND/OR
How to Spell Numbers using ABAP Spell_Amount Function Module
Convert Smartform to PDF in Print Preview Mode
Enable Remote Debugging in ABAP using RSRDEBUG
Export SAP Spool Requests as PDF using SP01 Transaction
Find Web Dynpro Class Name to Search in ABAP Code
How to Disable Word Editor in SAP Smartform Text
Test Web Dynpro ABAP Component by Creating Web Dynpro Application
Graphics White Background Displayed Grey on SAP Smartform Output
Window MAIN does not fit onto page PAGE (height)
SAP Smartforms Table Parameter in Form Routine

Copyright © 2004 - 2020 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems