SAP Control Framework 丢失事件?
一、情況一描述:
1、ABAP中使用了自定義ActiveX控件;
比如一個時間控件,控件隔5秒鐘后觸發(fā)一次事件通知容器,然后不再觸發(fā)。
2、在PBO中初始化控件并注冊事件、指定事件處理方法;
3、運行程序
(1)當屏幕還沒有出現(xiàn),但控件已觸發(fā)了事件的情況下,ABAP事件處理方法不能被調用;
注:間隔是5秒不會出現(xiàn)問題,如果把間隔縮小到10ms就會出現(xiàn)問題了,因為控件已經觸發(fā)了事件,此時Screen還沒出現(xiàn)呢。
(2)當屏幕已經出現(xiàn)后,ABAP事件處理方法調用正確。
如果打開自動化跟蹤日志功能,在第(1)種情況下,可以看到類似下面的警告信息:
“<30=Warning:??? Active-X shellId 125 tried to fire event 1 while token is at server => skipped event”
4、控件在其他語言中使用,包括JavaScript、VBA、C#、VC、Delphi我都做了測試,是沒有問題的。
二、情況二描述:
(1)假設ActiveX控件有一個方法,這個方法會觸發(fā)一個事件;
(2)ABAP的Screen中加個按鈕,PAI中調用控件的這個方法,結果發(fā)現(xiàn)ABAP仍然不能響應這個事件。
三、綜合上面兩種情況,期望結果:
只要控件觸發(fā)事件,ABAP事件處理程序應該必須調用。
困擾了我好久的問題,寫在這里。向有知道原因的朋友請教,也作為一個問題留著將來解決!
2009.3.19日,今天終于找到了一些東西,寫在這:
Lost Events
2006-06-07 17:12:45 Sam Mesh Business Card [Reply]
Could you please elaborate the conditions under which some events from ActiveX inside SAPGUI could be lost and the ways to fight this?
It seems that when SAPGUI flushes (ignores) any events when it is communicating with the SAP System.
I've found the following related links so far (but they did not help in full:):
- https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/995 (this article:)
- http://www.sapgenie.com/abap/controls/how.htm
- http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCICTUT/BCCICTUT.pdf
-
Lost Events
2006-06-07 17:24:56 Thomas Jung Business Card [Reply]
There is only one situation that I can think of where events can be lost - when two events can occur in parallel. Generally when a flush occurs, the user interface is frozen (in a wait state) so that other UI elements can't generate events.The execption here is a timer control. It fires an event that must be sent to the server via a flush reguardless of what is happening within the UI because it is time based. Therefore if you press a button on the frontend and a flush occurs and a timer throws an event during the flush - the timer event will be lost. Afterall the ABAP session can't handle two events simultaniously - there is no synch logic.
This example is based upon testing that was done back in 2004. As a customer at a time we entered our findings in a support message to SAP. We were informed that this was the designed functionality of the Control Framework. I have not repeated this test in the time since then.
-
Lost Events
2006-06-09 16:46:09 Sam Mesh Business Card [Reply]
Thanks for the prompt answer. BTW, how could I be notified when you reply to this my comment?> We were informed that this was the designed functionality of the Control Framework.
Our system should handle external events. It is OK to queue them in our system but it is not OK to blindly send them to SAP without knowing when it is capable to handle them. Where could I find an additional information about this "designed functionality of the Control Framework"?-
Lost Events
2006-06-12 07:08:09 Thomas Jung Business Card [Reply]
>how could I be notified when you reply to this my comment?
As the author of the blog, I automatically receive an email with any comments. However there isn't really away for other to "subscribe" to the comments in such a way. You can get an RSS feed to all the comments of all blogs on SDN.>Where could I find an additional information about this "designed functionality of the Control Framework"?
There really isn't much publically available information on the Control Framework any longer. The best documentation I can point you to is from the help portal:
http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/147a36c70d2354e10000009b38f839/frameset.htmThis isn't really a strategic development tool positioned towards customers any longer. With the introduction of Web Dynpro - customers are really directed toward these newer tools for custom development.
-
-
總結
以上是生活随笔為你收集整理的SAP Control Framework 丢失事件?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 将客户端图片保存到数据库中的方法
- 下一篇: ABAP基础