您的位置:首页 > 其它

SAP Control Framework 丢失事件?

2011-08-26 09:09 239 查看
一、情况一描述:

1、ABAP中使用了自定义ActiveX控件;

比如一个时间控件,控件隔5秒钟后触发一次事件通知容器,然后不再触发。

2、在PBO中初始化控件并注册事件、指定事件处理方法;

3、运行程序

(1)当屏幕还没有出现,但控件已触发了事件的情况下,ABAP事件处理方法不能被调用;

注:间隔是5秒不会出现问题,如果把间隔缩小到10ms就会出现问题了,因为控件已经触发了事件,此时Screen还没出现呢。

(2)当屏幕已经出现后,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控件有一个方法,这个方法会触发一个事件;

(2)ABAP的Screen中加个按钮,PAI中调用控件的这个方法,结果发现ABAP仍然不能响应这个事件。

三、综合上面两种情况,期望结果:

只要控件触发事件,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.htm
This 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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: