Wednesday, November 16, 2011

How to skip any authority check

If you are allowed to debug a SAP system, you can easily skip any authority check that avoids you to execute a program or transaction. You only have to follow these steps:
  1. Execute command /H in command field before executing the transaction/report with authority checks to skip
  2. You will receive a message saying that debugging has been switched on
    If you don't receive this message, you are not allowed to debug and unfortunately you won't be able to apply this trick
  3. Execute the transaction/report. ABAB debugger will be launched.
  4. In the menu bar select Breakpoints --> Breakpoint at --> Statement...
  5. In the popup window write authority-check and accept (enter)
  6. F8 to continue with the execution. The execution will stop when first authority-check statement is reached. For example:
  7. F5 to execute the statement and check if system variable sy-subrc has a value not equal to 0.
  8. If it has a value not equal to 0, this means that you don't have authorization for this authority check and that you will be allowed to go on with the execution. If it is 0, F8 to go on until the next authority-check statement.
  9. When you reach an authority-check and execute it and sy-subrc has a  value not equal to 0, then you will have to update sy-subrc to 0 in order to be allowed to go on with the execution. To do this, just write sy-subrc in one of the field-names fields
  10. and overwrite variable's value to 0 in the field at the right and press the button with the pencil
  11. F8 to go on. You will have to repeat previous steps in all authority-check statements reached where sy-subrc is valuated to non 0 value when it is executed

5 comments:

  1. how will give edit option auth.

    ReplyDelete
  2. how will give edit option auth.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. how about this "you are not authorized to edit field contents" " when trying to change the value from the sy-subrc.

    ReplyDelete