Quantcast
Channel: ABAP Development
Viewing all articles
Browse latest Browse all 948

How to debug a smartform ?

$
0
0

The Form debugging has some challenges , like - the form has no versions,there is no message display when exceptions occur and ABAPcode is usually embedded in the specific,program line node.The following steps for debugging a smartform may be helpful:-

 

Since , whenever a form is activated a Function Module is generated, we can go directly to the FM and insert break-points; as,

 

pic1.png

 

 

 

 

pic1.png

    pic1.png

  • In the Top Include, we have all the Global Data and Types that has been declared in the Global Definitions Tab.

 

All the performs (ABAP Form routines) are included in the *F01 Include

 

pic1.png

  • All the data and code that has been declared in the 'Initialization Tab'  can also found in the

   FORM %GLOBAL_INIT, within the Include *F01

 

 

pic1.png

 

  • Following Form  routines available in the *F01 Include are highly useful in debugging.These are always called, whenever a Node( like main window) is processed:-

 

   

 

  1. FORM  %WRITE_TEXT
  2. FORM  %WRITE_TEXT_MODULE

  3. FORM %WRITE_INCLUDE_TEXT

  4. FORM %WRITE_DYNAMIC_TEXT

  5. FORM %RAISE

 

 

 

 

 

 

pic1.png

pic1.png

  

   

 

pic1.png

pic1.png  

 

  pic1.png

 

For each Window/Node that has been created within the form an equivalent Form(ABAP Form Routine) is created in the *F01 Include:-

 

Like for e.g. for the Node 'Main' Window,following Include is created:

 

pic1.png

 

The Form Raise, as specified above, is particularly useful whenever, we see that there is no print-preview appearing , when executing the driver program.This means that exception has occured and that can only be traced, if we set a breakpoint in the FORM routine 'Raise'.


Viewing all articles
Browse latest Browse all 948

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>