cancel
Showing results for 
Search instead for 
Did you mean: 

Execute JavaScript method( window.open ) from ABAP

SOHEE
Newcomer
0 Kudos


Hi All ! 

Is it possible to execute JavaScript Method 'window.open' with ABAP? 
I've checked the demo program( DEMO_JAVA_SCRIPT_MINI_EDITOR ) and class( CL_JAVA_SCRIPT ) provided by SAP, but seems that it doesn't work.
( It seems that the JS was compiled, but not executed )

I'd like to refresh Groupware Web Page after the transaction executed on Web Gui pop-up
and the groupware web page manager asked me to execute JS method since the domain of groupware 
and web gui are different. And that's the only possible way at the moment.

SOHEE_0-1706863112270.png

In short, I'd like to confirm whether JS code can be executed on AP server which is NOT ABAP.
Or is there any other way besides what was mentioned above? 
I am trying with other class cl_gui_html_viewer  any way 😂

Please help! 
Thanks! 😀

 

 

 

Ryan-Crosby
Active Contributor
You can't force client side JavaScript to run from the ABAP back-end. You can try to compile a script that will do something when a button is pressed or some action occurs, but you cannot trigger the action directly. It appears that you would also need to deal with CORS (cross-domain).
Sandra_Rossi
Active Contributor
CL_JAVA_SCRIPT is obsolete and not supported anymore.
Sandra_Rossi
Active Contributor
0 Kudos
The refresh can be done by the Groupware page itself, you cannot request it from an external application. That's a Web principle (security).

Accepted Solutions (0)

Answers (0)