cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Personas - Website Button with the link Mailto:abc@company.com

former_member215739
Participant
0 Kudos

Dear Screen Personas Team,

normally, when you paste following text "mailto:abc@company.com" in your browser address bar, your email program will be triggered.

I tried to put it in the website button in a flavor, and it doesn't work. It throws me an error script. Could you please check it? Many thanks.


Accepted Solutions (0)

Answers (1)

Answers (1)

tamas_hoznek
Product and Topic Expert
Product and Topic Expert

Use a script button instead, with

window.open('mailto:APTEAM@company.com','_self');
former_member215739
Participant
0 Kudos

Many thanks Tamas, it works now.

In the script editor, I got the error message for window.open - the object window is not found, which confuses me a little bit. But in runtime enviroment the script works.

Thanks again.

former_member215739
Participant
0 Kudos

Sorry I have to disturb again that because of using window.open, this script can't run under Windows GUI, only in WebGUI environment.

Do you have another alternative for it, can I use another object instead of window, which then works with Windows GUI too? Thank you.

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

That's correct - the window object doesn't exist in the SAP GUI, so it can only be used while running the transaction in the browser.

For doing the same in SAP GUI, you will have to use a different method which allows execution of your mail client program. Perhaps an appropriate RFC could be used here, something like GUI_RUN or similar. You may have to set the RFC whitelist so that the FM runs in the same session like your transaction - you'll have to experiment with this.

Your Personas script must decide whether the current client is ITS or SAP GUI and do the mail client launch depending on the result of that check.