Currently I log in SAPGUI via Portal. I have ABAP program which opens a link to UI5 application (creating a new tab in the same browser window with the Portal).
There is a requirement that by closing the UI5 application tab, ideally the SAPGUI window will pop up and user should go back to SAP GUI to continue original transaction. Consider adding a footer to the UI5 app with a button to “Close” which will close the tab.
Is it possible to handle "going back to SAPGUI" from javascript?
no. Thanks good, that is impossible. Imagine if every webpage could access your desktop in any way.
You can use SAPGUI shortcuts to open a new transaction via file download. Just set up every browser as open download per default and trigger a SAPGUI shortcut via button.