Professional Documents
Culture Documents
Shares
Today, we would look into a very useful tip in ABAP which I did not know in my more than a decade-long SAP career. As we
keep on saying, no one can know everything in ABAP. If someone claims s/he knows almost everything in ABAP then either
s/he is lying or s/he is GOD! Reverve her/him. 🙂
The other day, one of our end user reported an issue in one of our application program in our pre-production system.
Everything worked properly and as per business need in development and quality system. But something went wrong in
pre-production. I did not have the authorization to execute the t-code/program in my pre-production system (as it was the
copy of actual production system). Being a developer, I had debug access and wanted to debug and see what was going
wrong but I could not as I did not have the authorization to execute the t-code/program. The other problem was, the user
being an end user, did not have authorization to Debug.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 1/10
24/4/2020 Special External Debugging in SAP ABAP. |
This was a catch 22 situation. The user can execute but cannot debug. I can debug but cannot execute. And the
user was on the west coast of the country and at that time I was at the eastern part of our country.
The easiest alternative would have been to raise a service request to get authorization for me to execute the t-code in pre-
prod. But it would have taken some time to get the approvals from all departments.
Luckily one of my friends told me he read something about /hext user = username somewhere. This gives the person
who executes this command to allow the other user mentioned in the command line to take over his/her session and
debug.
Shares
Say Business end user’s name is Karyn (sap user id 00217) and Developer’s name is Sergio (sap user id 00951).
Since Karyn has the authorization to execute the t-code, she will put the command as /hext user = 00951 in her system
in SAP sitting far away on the west coast. Important to notice here is, she put the user id of Sergio, not herself. This means
she would like Sergio to do the Debugging. She would just enable the debugger and execute the session.
PS: There should be a space between /hext and user and = and username.
Since Sergio wants to debug he needs to put an external break point in his system.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 2/10
24/4/2020 Special External Debugging in SAP ABAP. |
Shares
Since Sergio wants to debug a session of Karyn, he needs to maintain Karyn’s id in the External Debugger username as
shown below.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 3/10
24/4/2020 Special External Debugging in SAP ABAP. |
Shares
If you get the message “You are not authorized for the external debugging of user 00217” while trying to save the other
user’s id, then go to the bottom of this post for another trick. Bonus Trick. 🙂
Now ask Karyn (end user) to execute the t-code and enter the command /hext user = 00951.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 4/10
24/4/2020 Special External Debugging in SAP ABAP. |
Shares
In the above screen shot check at the bottom right, it has Karyn’s user id (00217) and in the command, we wrote Sergio’s
user id (00951).
She will get a below pop up message. Basically, it is a warning to the user that his/her session would be debugged by
someone else.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 5/10
24/4/2020 Special External Debugging in SAP ABAP. |
Shares
Ask her to press ok and execute the program. The moment she hits the execute button.. abracadabra…
You would see a debugging session on your screen far away on the east coast as shown below. 🙂
Check at the bottom right of the below screenshot, it has Sergio’s user id (00951).
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 6/10
24/4/2020 Special External Debugging in SAP ABAP. |
Shares
Now, you are a happy ABAPer. Debug, get the root cause and provide the solution. No need of screen share, not need to
get special approval to execute the program and no need to be on the same machine/system and no need to be in the
same location. How convenient. Isn’t it? 🙂
The end user, Karyn should not cancel the session in her machine when Sergio is debugging. If she cancels or exits from it,
then the debugging session will end at Sergio’s end. In case, Karyn really wants to forcefully exit, she can put the
command /hx and both of them would exit.
Now the bonus tip for today which we promised above. If you ever get the error message “You are not authorized for the
external debugging of user XXXXX”, go to se37 and open FM “SUSR_CHECK_DEBUG_ABILITY”. Put a debugger as
shown below.
Do your activity again, i.e assign another user and hit OK.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 7/10
24/4/2020 Special External Debugging in SAP ABAP. |
It will stop at the breakpoint in the FM. Just change the SY-SUBRC to 0. You are done. 🙂
Shares
Of all the power give to ABAPers, I think, Debug with Replace is the strongest one. This is key to any closed doors for the
ABAPers.
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 8/10
24/4/2020 Special External Debugging in SAP ABAP. |
But as Spiderman said, “With great power comes great responsibility”. So it is our duty to not misuse it but use it
responsibly.
We put a lot of effort in conceptualizing, testing and writing each and every article. If you could pass this link to at least
5 colleagues/friends who you think would benefit from our post, it would be a great favor to our team. We want our
articles to reach to as many audiences as possible so that everyone would benefit and our team would remain motivated
and our work does not get lost in this huge ocean of the internet.
Please, please share our post in your professional and social media and introduce your friends/colleagues/co-workers to
our blog page.
Shares
Also, check our popular step by step tutorials on some of the important topics of SAP ABAP.
Sérgio Serra
https://sapyard.com/
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 9/10
24/4/2020 Special External Debugging in SAP ABAP. |
Sérgio is an SAP Certified Consultant who was pursuing a Computer Sciences Engineering Degree at the reputed Instituto Superior Técnico,
Portugal. He currently works at RTL Group, Luxembourg. He has more than 11 years of IT experience and loves to take walks with his dog and,
only occasionally, his wife. Find more about him on LinkedIn.
Shares
https://sapyard.com/external-debugging-of-an-application-of-another-sap-user-in-other-location-in-another-machinesystem/ 10/10