Howto: Smartforms set a sessionbreakpoint / Find the Formname
There are various tips already available, so I just want to share two more.
How to set a session breakpoint in a Smartform
If you want to debug a smartforms and you are in production- or quality- System and you aren’t allowed to write a hard break-point and activate it again, there is another way here.
First of all, you have to go into your smartforms and detect the the point, where something gets wrong.
Now, you have to expand the node (it’s in the context, just click “mouse right”) and search for the next coding-node.
Let us have a look inside and as you know, you see the coding. Take a line, which might be very unique. By the way, comments are suitable for this too.
Now you just have to “test” your smartforms by clicking Execute (Shortcut F8)
Afterwards you got the Transaction SE37 with the generated Smartformsname in it. We do not really want to test it, we want to see the generated coding, so click “Show” and open the search by clicking the binocular.
Paste your copied line from above here and do not forget to search all content click.
Now it’s done, double click the line, set your breakpoint and call the form again. By the way, you see the name from the tree as comment above ( Here: Create_ean_list, see screen above), that gives you another clue, you find the correct spot in the gemerated coding.
There are two pro-tips: If it says, there is no main-program to set the breakpoint. Reorganize the navigation-index.
Click the function-stone itself and update the navigation index. Located under utilities.
If your form doesn’t stop at the node, make sure you recalled the program. Just enter the transaction again.
Both doesn’t help you out?
Your breakpoint isn’t reached in your case and you have to get again in the first steps
How to find correct formname
IF you are in printpreview type in the command-field just “OTF!” . If you got a smartforms in front of you, it will directly show you the OTF-Data. ( Here you can pass the next few lines and get back to the content where “For both techniques” is located. ( Sapscript-Way, but it also would work for a Smartform, but this way is pretty the easiest I can recommend you)
IF it is not a smartforms (have to be a sapscript), nothing happens, but that is not the end.
Type /H (Start debugger) in the command field and press enter.
For both techniques the Form-Name always is located in the second line with an offset of five digits.
Sapscript copy-Paste-Variable OTF+5
By the way, the startpage is located next to it (Above, the Startpage is called FIRST)
Hope you enjoyed working trough the content and perhaps you learned something new, which makes the developing easier.