‎2009 May 26 10:45 AM
Dear all,
In production server i m authorized for set the debugger in driver/excutable program only.
not in smartform.
my code is in smartform.
now i want to set the debugger in driver program and reach that code which is in smatform.
How can i???????
‎2009 May 26 10:48 AM
you cannot set breakpoints in smartforms. it will not work.
you can edit your smartform in dev system (add a break-point or a break username) and transport it to prod system.
or you can set a breakpoint in your driver program, right at the point where the smartforms FB is beeing called.
now debug with single step (F5) into it.
these are all possibilities to debug a smartforms I know of.
‎2009 May 26 10:49 AM
Hi,
the smartform will be "translate" in abap code.
So you can do two things:
1. Put the break point in the calling program before the dynamic function module call and then go with single step, and put a break point on the state you want debug
2. Get the function module name from the smarform name (transaction smartforms), go to se37 transaction with the FM name, check the main program (in the first tab) and then search for the abap code you want to debug. Then set the break point inside. Naturally you have to do this in the production system, because the same SM have different FM name in different systems.
Tell if you need more informations.
Best Regards
Andrea
‎2009 May 26 10:54 AM
GREAT, never tried to set the break point within the FB itself.
Thanks Andrea!
‎2009 May 27 11:43 AM
Hi,
1) This is not a advisable method. Though you can try it.
Put a hard break-point before the starting of the code in the smartform. Once you execute, it will automatically come to the break point in the smartform. Don't forget to remove the break point after debugging.
2) Also try to put a break point on the function module (in the driver Program) which is calling the function module.
Hope you are clear now.
Regards
Ramesh Sundaram
‎2009 May 27 11:48 AM
Go to the Smartforms transaction, go to environment -> function module (open this function module in SE37)
do a search for the code that you have written in that Function module. and place a break proin there in that code.
Then execute your main driver program and it will trigger the break point.
Regards,
S.Dakshna Nagaratnam.
‎2009 May 27 12:05 PM
Hi,
1. We can hard code the breakpoint in the program lines of the smartform.But in production server this is not possible.
2.We can put a break point in the function module.Still the problem is u need to debug a lot of standard code.
Some easy ways of doing this are :
1.put a breakpoint at %write_text% to break at text element.
%WRITE_TEXT_MODULE to break at text module.
%WRITE_INCLUDE_TEXT to break at include text.
2. take a line of code in the program lines and search for it in the FM and put a breakpoint.
for eg: wa_itab-ebeln = '40'.
search for this line in the FM and put a break point there.Furthur debugging would be a bit simpler.
3.We can use a tcode SFTRACE.
Usage:
Switch on the trace.
Run the smartform.
Refresh the trace and display the log..
This clearly shows where the error occured.
Hope this is helpful.