Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[ABAP] Debugging as other user

Imagine the following situation:

USER_A: Allowed to run a specific report, but not allowed to debug
USER_B: Is allowed to debug

In such a case, you can do the following:

  • USER_B: Sets external breakpoint for USER_A
  • USER_A: Enters the following in the command field: /hext user=USER_B
  • USER_A: Starts his report
  • USER_B: Debugger will be opened

If you check SY-UNAME in the debugger, it will have the value USER_A

[ABAP] Report Template

*&---------------------------------------------------------------------*
*& Report Z_REPORT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT Z_REPORT.

*-----------------------------------------------------------------------
* SELEKTIONSBILD
*-----------------------------------------------------------------------

*-----------------------------------------------------------------------
* Zeitpunkt INITIALIZATION.
*-----------------------------------------------------------------------
INITIALIZATION.

*----------------------------------------------------------------------
* Zeitpunkt AT SELECTION-SCREEN
*----------------------------------------------------------------------
AT SELECTION-SCREEN OUTPUT. "PBO
  
*-----------------------------------------------------------------------
* Zeitpunkt START-OF-SELECTION.
*-----------------------------------------------------------------------
START-OF-SELECTION.
    
*----------------------------------------------------------------------
* Zeitpunkt END-OF-SELECTION
*----------------------------------------------------------------------
END-OF-SELECTION.