Hi, please be gentle, as I dare to enter my first blog-post. 🙂

The following might be a bit simple and child knowledge for you all, but I wish someone would have told me this little trick, when I first started developing Smartforms.

I used to get this question a lot: “Martin – we have a problem with the invoice print, and we can’t re-create the error in the development system. Can you please debug and find the error in the production system?”

I really needed to create a session break-point directly into the Smartform in the production system, but how? – where was the button in the smartforms transaction?.No way was I going to create a transport request with the smartform holding a coded breakpoint.

Sure I could go to VF03 and use ‘/h’, but that is kind of a tedious way to go.

Instead I did this:

     1. Go to Smartforms transaction and type in the smartform name and hit “test”. Then you get the function module name that triggers the smartform print in      the given system.

/wp-content/uploads/2014/02/01_394022.png

     2. Copy the FM name to clip holder and go to SE80. 

/wp-content/uploads/2014/02/02_394023.png

     3. Select program and paste the name in.

/wp-content/uploads/2014/02/03_394024.png

4. Put an ‘L’ just before the last name and end it with a ‘F01’ and hit enter.

    /wp-content/uploads/2014/02/04_394031.png 

You now get the include, that holds all form routines representing every node in the smartform. Search for the one you need, and create your session breakpoint in the productive system.

(Global initialization in the smartform is in subroutine ‘GLOBAL_INIT)

Please note that this does not work for all smartforms but in my experience most SD forms can be debugged this way in productive and QA-systems.

/Martin

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Jozef Vaclavek

    It is not true (in general) that by adding an ‘L’ you have directly the include name (or the name of the main program, where the function module and it’s include is situated). That information is incorrect. In my scenario:

    /1BCDWB/SF00000090 – FM,

    /1BCDWB/LSF00000090U01 – include

    But, of course, you can debugg directly the FM.

    (0) 
    1. Martin Bendixen Post author

      Okay,

      How about include /1BCDWB/LSF00000090F01?


      As I said it does not work for all smartforms.

      The annoying thing about debugging the general function module that calls the form, is that you can’t set a breakpoint specifically in a node in the smartform. 


      /Martin

      (0) 
  2. nabheet madan

    Thanks for writing the blog. In the function module we can just do a global search on place where you want to put break point like some statement etc

    Nabheet

    (0) 
  3. David Encinas Fernandez

    Hi all,

    There is also the option of using checkpoints groups 🙂

    What I usually do is:

    1 Create a checkpoint group with the same name as the smartform.

    2 In the initialization part of the smartform I add:

    break-point id [NAME OF THE SMARTFORM]

    3 In some of the critical calculations I add logpoints to store my calculations.


    Then, if I have to debug it and no matter in which system, I just go to transaction SAAB and enable either the break and/or the logs. The break option will lunch the debugger when you reach this line and the log will just save the value of your variables so you can see them from transaction SAAB.


    Logs have been useful when I don’t have access to the systems. I can just ask the key user to enable it, run the smartform for me and send me the logs.


    Regards,

    David.


    (0) 

Leave a Reply