Skip to Content
User Experience Insights
Author's profile photo Piotr Tesny

How to prevent saml2 or soauth2 tcodes open as web based app in a browser?

A case for ZSAML2 and ZSOAUTH2 with S/4HANA ABAP.

When using S/4HANA ABAP1909 or ABAP2020 both saml2 and soauth2 tcodes when run from SAP GUI are being redirected to a browser based app.

Most annoyingly, the app opens in both Chrome and Safari browsers  at a time (macOS);

Thus I asked around to see if there is way to change this behaviour, like for instance having saml2/soauth2 run inside SAP GUI ?

And I got an excellent answer from Laurens Deprost via our ABAP community channel.

Let me share with you what I have learnt.

Putting it all together

Pre-requisites: SAPGUI for java, S/4HANA ABAP1909 or ABAP2020 with a developer access rights

Quoting after Laurens Deprost :

Apparently, there is no way to change the behaviour of standard transactions.

An alternative to consider is creating two custom transactions, for example, ZSAML2 & ZSOAUTH2

These custom t-codes should call transaction ‘WDYID‘, skip the first screen, and respectively pass values ‘SAML2’ and ‘SOAUTH2’ to the APPLICATION parameter.

These transactions will provide alternatives to the original transactions and run inside SAP GUI instead of the default system browsers.

 

You need access to SE93 to copy and configure your custom transaction codes. Please refer to appendix for detailed instructions.

SAML2 (opens in a browser) ZSAML2 (opens inside SAPGUI)
SOAUTH2 (opens in a browser) ZSOAUTH2 (opens inside SAPGUI)

 

The end result with SAPGUI for Java (macOS):

/nZSAML2 /nZSOAUTH2

Conclusion.

I demonstrated how to create a copy of a transaction code and how to modify its behaviour in ABAP system so it can run inside SAPGUI.

Any known caveats? The newly created ZSAML2 and ZSOUTH2 transactions will not work with HTML WebGUI.

https://<abaphost>:50001/sap/bc/gui/sap/its/webgui?sap-client=001&sap-language=EN#

Domain is too short (see long text)
Message no. SWDP_WB_TOOL532

If you are using WebGUI just stick with the standard SAML2 and SOAUTH2 transactions.

 


 

Appendix

SE93 ¬†– with all the steps….

Select Local Object below

If applicable, goto Edit/Change transaction type

 

Change transaction type to transaction with parameters as follows:

and complete the steps as follows:

 

 

 

 

 

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.