`
ihuashao
  • 浏览: 4665734 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

ABAP--关于SAP的Control Framework的系统事件ABAP处理机制的学习

阅读更多
在上个论题我已经讲叙关于SAP的Control Framework的事件注册,这里再讲解一下系统事件SAP的ABAP应用服务器是采用何种机制处理的。(http://blog.csdn.net/CompassButton/archive/2009/08/04/4407993.aspx)

SAP ABAP的任何一个屏幕交互都会在屏幕PAI开始执行前隐式调用调用SAPMSSYD的Module:%_ctl_input。
处理步骤如下:
1)在%_ctl_input中根据OK_CODE判断是否是Control Framework的事件,如果是,则调用的sapfguicntl单元的control_dispatch子过程

*==> Dispatch Control Event (%_GC) or Shell Event (%_GS)
elseif my_ucomm(4) = '%_GC' or my_ucomm(4) = '%_GS'.
call 'DYNP_GET_SUBSCREEN'. "Only Once: On Mainscreen
if sy-subrc = 2.
perform control_dispatch(sapfguicntl)
using my_ucomm
if found. .
endif.
2)在control_dispatch中将调用sapfguicntl_cfw单元的control_dispatch子过程
*=======================================================================
* C O N T R O L D I S P A T C H
*-----------------------------------------------------------------------
* Called by Dynpro Main Step "Control Input" (SAPMSSYD form %_ctl_input)
* OK_Code is '%_GC ...' (Control Event) or
* OK_Code is '%_GS ...' (Shell Event) or
*=======================================================================
form control_dispatch using cd_ok_code.
perform control_dispatch(sapfguicntl_cfw)
using cd_ok_code
if found. .
endform. "control_event_dispatch

3)在control_dispatch将会调用cl_gui_cfw的方法DISPATCH_SYSTEM_EVENTS根据事件注册的内表CFW_SYSTEMEVENTS 判断是否是存在对应系统事件。如果有,则进行系统事件相应的代码处理。否则就退出,进入屏幕的PAI处理。

注意:从上面的论述系统事件的处理在PAI执行前,也就说明屏幕字段未读取用户输入值,也就正好印证了SAP关于系统消息的说明。
System events are is triggered before any automatic field checks (for example, required fields) have taken place on the screen, and before any field transport. The PAI and PBO events are not triggered. Consequently, you cannot access any values that the user has just changed on the screen. Furthermore, there is no field transport back to the screen after the event, so values that you have changed in the event handling are not updated on the screen.

分享到:
评论

相关推荐

    sap BC412_ABAP_Dialog_Programming_Using_Enjoy_SAP_Control

    ### SAP BC412_ABAP_Dialog_Programming_Using_Enjoy_SAP_Control知识点解析 ...通过以上内容的学习,学员将能够熟练运用SAP Control Framework及其相关控件,有效地提升ABAP对话程序的GUI功能和用户体验。

    BC ABAP4 用户指南(简体中文版)

    -屏幕编程:学习如何设计和处理用户界面,包括使用 Screen Painter 和 ALV Grid Control。 - 报表编程:编写REPORT程序,实现数据的输出和交互。 4. **数据库操作** - SELECT语句:掌握ABAP SQL,包括查询、更新...

    ABAP OO的八个理由

    7. 错误预防与可维护性:ABAP的新特性往往需要通过OO来实现,如SAP Control Framework和BSP。使用OO编程,可以利用其严格的语法和语义规则,降低错误发生的概率,提升代码质量。 8. 渐进式转型:即使不完全转向OO,...

    SAP多行文本编辑实例(屏幕).rar

    2. **事件处理**:ABAP中的事件处理机制允许在用户与界面交互时执行特定代码,例如当用户改变文本后触发的`AT USER-COMMAND`事件,或在保存时触发的`WRITE: SCREEN`事件。 3. **GUI STATUS**:通过设置合适的GUI...

    SAPSMTP邮箱系统配置手册(发送邮件).pdf

    3. **配置步骤**:配置SAP系统以使用SMTP发送邮件涉及多个步骤,包括设置SMTP服务器的连接参数,如主机名、端口号,以及配置邮件头信息、身份验证机制等。此外,还需配置SAP系统中的通信用户(如SU01事务代码中的...

    webservice

    如果服务没有被激活,需要进入T-CODE:SICF(Service Control Framework)运行后,在default_host下找到对应的路径进行服务激活。 2.配置SOAMANAGER,SOAMANAGER是SAP系统中用于管理和配置WebService的服务管理器。在...

    SAP屠夫作品汇总

    关于联产品工单成本怎么结算?你整一个Allocation structure, SAPhelp. Create Allocation Structure 551 5工单 552 Material Ledger 物料分类账详解 552 一.ML功能简介 552 二.标准价Pk加权平均价 559 三.差异来源和...

    Web Dynpro Overview

    此外,它还支持SAP Integration Framework和Eclipse Plugin Framework,以及软件物流(SL)等。 Web Dynpro运行时可以部署在多种平台上,如J2EE、.NET和ABAP,实现了跨平台的独立性。Web Dynpro for Java和Web ...

    TADM10_1_SAP NetWeaver AS Implementation & Operation I

    Java Startup and Control Framework...................................................235 Logs of the Start and Stop Processes of SAP NetWeaver AS Java ................244 Unit 5: Introduction to ...

Global site tag (gtag.js) - Google Analytics