两种使用JavaScript触发ABAP事件的技术手段

In CRM Office integration scenarios, Javascript together with ActiveX are widely used. For example, in webclient UI component view, version of the local installed Word application is got via ActiveX using Javascript and then this version is sent back to ABAP side, then application could work with different version accordingly.


This document explains two approaches to trigger ABAP backend event via Javascript with two simplest example:


Approach1 – trigger via calling click() method of a hidden button

(1) define a hidden button, bind its onClick event to an ABAP event ( line 6 ~ 9 )

Please note that the event name is Case sensitive – When you create the ABAP event in UI workbench, the correct event name you input must be exactly “Refresh” as line 8 ( although afterwards you see the upper case EH_ONREFRESH in workbench )

两种使用JavaScript触发ABAP事件的技术手段两种使用JavaScript触发ABAP事件的技术手段Approach2 – trigger via function htmlbSubmitLib

this approach could not only trigger ABAP event via Javascript but also could pass the value of Javascript variable to ABAP backend.

This approach also needs a hidden button. I use ActiveX to retrieve three attributes of the word application installed in my laptop: version, user name and installation path. The event trigger is done via function htmlbSubmitLib.

两种使用JavaScript触发ABAP事件的技术手段两种使用JavaScript触发ABAP事件的技术手段两种使用JavaScript触发ABAP事件的技术手段


上一篇:【产品】SC5654 异构双核AI语音芯片


下一篇:MySQL数据库的共享锁和排他锁