cancel
Showing results for 
Search instead for 
Did you mean: 

Call URL from ABAP (Windows and Mac)

Jelena
Active Contributor

Seemingly simple task: have a pop-up screen (old timey dynpro variety) with a hyperlink that shall open a web page in (ideally) user's default browser. This is EHP6 7.31 system. SAP GUI 7.5.

After some Google search I found 3 ways to do that but none of them work as I'd like on Windows. Even worse, we have many users with Macs and none of those ways worked at all on a Mac. Below is what I've tried so far and the results.

1. Container using cl_gui_custom_container (like here😞 no reaction on Mac, on Windows 10 opens something that looks like an odd version of IE (not the default browser).

2. Use cl_gui_frontend_services like this:

CALL METHOD cl_gui_frontend_services=>execute  
EXPORTING  document  = 'www.google.com'

In Windows, this results in the message:

After allowing, opens URL correctly in the default browser. On a Mac, this returns path_not_found exception.

3. FM CALL_BROWSER - pretty much same result as 2, just a different verbiage in the message in Windows and PROG_NOT_FOUND error in Mac.

Problem: unfortunately, this doesn't work on Mac at all and even in Windows having those security messages is unacceptable because it'll scare and confuse the users.

Question: is there some other way to do this that would work as desired for both Windows and Mac (SAP GUI for Java on Macs)? Or am I doing something incorrectly with these options?

BaerbelWinkler
Active Contributor

Hi Jelena,

just wondering: have you tried with a fully qualified link like https://www.google.com instead of just www.google.com? More and more browsers are getting "twitchy" about non https links which might contribute to any security warnings/hassles.

And a general question: does SAP "honor" default browser settings or does it still have a built-in preference for Internet Explorer? If the latter is the case, could this play a role with your process not working on a Mac?

Cheers

Baerbel

Jelena
Active Contributor
0 Kudos

Thanks, Bӓrbel! Out of curiosity, I tried that but it didn't make any difference. I got the Mac error resolved by applying a note though (see my reply to Horst).

Edit to add: I suspect the container (1st option in my question) could be hard-wired to IE. So yes, that would explain it not working on Macs. The other two options did honor default browser after the note correction.

Accepted Solutions (1)

Accepted Solutions (1)

Jelena
Active Contributor

Solved it with some help from horst.keller, federico.saab and ishteyaque.ahmad (indirectly). Below is the whole solution.

Went with cl_gui_frontend_services=>execute, as suggested (FM has the same result). The issue on Macs was resolved by installing the note 1177636. Got rid of the pop-up on PC by making a change in SAP GUI configuration as noted in this blog.

This is the rule I've added (Google URL is used here just for testing):

As a side note, I was curious why a security pop-up does not appear when we use the standard Application Help menu, for example. It also opens a URL in browser, essentially. Through some debugging found that it uses different parameters in the call:

Answers (2)

Answers (2)

iftah_peretz
Active Contributor

Hi,

I am not familiar with Mac OS in this regard, but we normally use the cl_gui_frontend_services=>execute.

As a workaround to your problem, I would try to have some external service that could be executed (via web service, operating system etc.) from SAP, having the URL as an input parameter to it.

horst_keller
Product and Topic Expert
Product and Topic Expert

You can switch off these security messages in the GUI options (adjust local layout). Unfortunately, every user has to do this on her PC.

I myself use the same method cl_gui_frontend_services=>execute. Yes, there are problems with MAC, but normally they arise from the contents of the HTML files and not from the way they are called.

Jelena
Active Contributor
0 Kudos

Thanks, Horst! I found and installed the note 1177636 Browser window does not open on platforms other than Windows and it resolved the error messages on Mac. Interestingly, on a Mac, we don't get a security message. So now it works as expected but only on Macs. Argh! If we could get rid of the security message in Windows we'd be in business.

Do you know what setting exactly would need to be changed? This is what I get under Security in SAP GUI Config:

Default Action cannot be changed, from what I see (could be disabled by admin). Didn't find anything related in the other options.

former_member239428
Participant

You should be able to change the security status from customized to disabled, or open the security config. and change the default action form ask to allow (on the top of the screen)