03-15-2010 8:01 AM
Hi,
Is it possible to call the debugger through abap coding
and pass him a program name (which has to be debugged)
let him stepping through the program code (each line, single step).
Thanks
Alex
03-15-2010 8:34 AM
Hi Alexander,
You can put the instuction BREAK-POINT just before the program that you want to debug and then you could use the debugger as usual.
Another way is to set a break-point at the beginning of the program being called and then when you entered in this program the debugger will be launched.
You can also have a look to such FM like RS_SET_BREAKPOINT which can add dynamically breakpoints.
Hope it will help!
Samuel
03-15-2010 8:34 AM
Hi Alexander,
You can put the instuction BREAK-POINT just before the program that you want to debug and then you could use the debugger as usual.
Another way is to set a break-point at the beginning of the program being called and then when you entered in this program the debugger will be launched.
You can also have a look to such FM like RS_SET_BREAKPOINT which can add dynamically breakpoints.
Hope it will help!
Samuel
03-15-2010 8:58 AM
Samuel I must start debugger via abap and pass him a report name. This is what I am needing
03-15-2010 11:03 AM
Yes I have understood what you need, but if you put such code :
REPORT z_debug.
START-OF-SELECTION.
...
BREAK-POINT.
SUBMIT your_other_program.
...
it should meet your requirement, except that you start the debugger just before entering in your other program, isn't it?
Samuel
03-15-2010 11:04 AM
>
> Samuel I must start debugger via abap and pass him a report name. This is what I am needing
Perhaps if you explained why you need to do this, you'd get more targetted answers.
matt
03-15-2010 9:44 AM
03-15-2010 12:19 PM
hi alexander,
there are many ways to call the debugger
1. goto your program which you want to execute.
before executing write/h on the transaction command box.in this method debugger will be called from start of the program from 1st line
2. in the program put command break-point,where you want your debugger to be started.
3. in the program put the debugger button,those are at the top in application tool bar.
so you can call the debugger in these many ways.now u have to decide whats ur requirement and how u need to call the debugger.hope this will help you.
Thanks
Tanmaya
03-15-2010 1:05 PM
hi all,
I guess its more clearly to you.
How can I pass to the programm RSTPDAMAIN any Reportname or Programname.
I've started some experiments, but unfortunately without success.
Regards
Alex
Edited by:
03-15-2010 1:40 PM
Hi,
You can try with below FMs.
CALL FUNCTION 'RS_GET_BREAKPOINTS'
EXPORTING
program = po_progname
http_debugging = space
TABLES
showbreakpoints = i_allbreakpoints.
CALL FUNCTION 'SYSTEM_DEBUG_SET_BREAKPOINTS'
EXPORTING
main_program = p_prog(40)
* flag_system_debugging = abap_undefined
* flag_exception_object = abap_undefined
TABLES
breakpoints = i_breakpoints
EXCEPTIONS
too_many_breakpoints = 1
generate = 2
bp_position_not_found = 3
c_call_error = 4
OTHERS = 5.
In I_breakpoints you need to pass the program name and line number.
Thanks,
Vinod.
03-15-2010 3:29 PM
Vinod thx your reply was very helpful.
Usually when you are debugging you can see on the rightside 4 tabstrips. Variable1 Variable2 Locals Globals.
Do you know a way how can I access the values directly.
DYNP_VARS-WA_GLOBAL-VARNAME and DYNP_VARS-WA_GLOBAL-VARVALUE
The Programname is SAPLSTPDA_TOOL_QUICK_VARS
FunctionPool STPDA_TOOL_QUICK_VARS
Regards
Alex
03-15-2010 4:00 PM
Hi,
Recently i have seen similar requirement posted in SCN. Some one has suggested some class to get the run time attributes some thing similar to CL_ABAP_CLASSDESCR. Can you do a search and find out in SCN. Also try to search in SE24 with CLDEBUG.
But during debugging you already have the data in the variables right?
Thanks,
Vinod.
03-15-2010 9:10 PM
Hi Vinod
you said:
but during debugging you already have the data in the variables right?
Yes, but I need them because I want to save a text file directly from ABAP program with these
values of variables.
How can I do that ?
Regards
Alex
03-16-2010 10:54 AM
Thank you for your active help, I will try to achieve the req with these answers