‎2007 Feb 08 5:15 AM
Hi all,
Is it possible to restrict debugging of any program by any developer or somebody else.
Thanks in advance.
‎2007 Feb 08 6:33 AM
Hi
While executing the report by writing the code in the report as
if sy-user = (u and what ever u required).
allow.
else.
break user.
endif.
Hope it will work by breaking the other users.
Here they are not able to run ur report.
Regards,
kumar
‎2007 Feb 08 5:50 AM
Hi Raja,
By authorization you can restrict the debugging and also not changing the values while debugging
Regards
Arun
‎2007 Feb 08 5:53 AM
hi
good
if a programmer is debugging a program and he can stop debugging by selection file->stop debugging
Thanks
mrutyun^
‎2007 Feb 08 6:07 AM
What I meant was would there be any setting to restrict debugging of a program to any developer or any end user. By default, all the programmers are assigned with the debugging authorization in our organization
‎2007 Feb 08 6:24 AM
hi
good
I dont think there is any such setting which ll block the debugging the program,
thanks
mrutyun^
‎2007 Feb 08 6:29 AM
I am not sure if that is possible. You just have to remove the authority. Why do you want to do this?
‎2007 Feb 08 6:45 AM
Hi raja,
1. If it is our Z Program,
2. Then in ATTRIBUTES,
we can specify STATUS = SYSTEM
3. Such program having this status, cannot be Debugged.
regards,
amit m.
‎2007 Feb 08 6:27 AM
Hi,
I believe you cannot restrict debugging access to a single program..Instead the debugging authorization can be removed..WHich means the user can no longer debug any program..
THanks,
Naren
‎2007 Feb 08 6:33 AM
Hi
While executing the report by writing the code in the report as
if sy-user = (u and what ever u required).
allow.
else.
break user.
endif.
Hope it will work by breaking the other users.
Here they are not able to run ur report.
Regards,
kumar
‎2007 Feb 08 6:59 AM
Call TH_RESET_DEBUGGING in your AT SELECTION-SCREEN. If someone is debugging they can go as far as this call and after that they will be thrown out. This will work only if someone is debuggin using '/h'. But if someone puts a soft breakpoint on some line of the code and then executes the program, this will not stop it if that breakpoint is after the call.
To stop this kind of debugging, you can use another function module SYSTEM_DEBUG_BREAKPOINTS which will give you all the soft breakpoints set in the program. So if there are entries, you can then quit.
If the program has BREAK-POINT in it, then you cannot do anything.
Here is a small program
REPORT zakstest1.
DATA: BEGIN OF breakpoints OCCURS 0.
INCLUDE STRUCTURE breakpoint.
DATA: END OF breakpoints.
PARAMETER: p_check AS CHECKBOX.
AT SELECTION-SCREEN.
CALL FUNCTION 'TH_RESET_DEBUGGING'
EXCEPTIONS
no_authority = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
START-OF-SELECTION.
CALL FUNCTION 'SYSTEM_DEBUG_BREAKPOINTS'
EXPORTING
main_program = 'ZAKSTEST1'
* IMPORTING
* flag_system_debugging = flag_system_debugging
* flag_exception_object = flag_exception_object
TABLES
breakpoints = breakpoints
EXCEPTIONS
c_call_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF breakpoints[] IS NOT INITIAL.
*-- there is at least one soft breakpoint set
MESSAGE s056(14) WITH 'You cannot debug this program'.
STOP.
ENDIF.
IF p_check = 'X'.
WRITE:/ 'The box is checked'.
ELSE.
WRITE:/ 'The box is not checked'.
ENDIF.
‎2007 Feb 08 6:47 AM
Hi Amit,
By setting the status to system..We can still debug using the system debugging..option..Right??
Thanks
Naren