SAP
®
Business One 中文版培训教材
-SDK
2004 年 8 月
SAP 中国公司
SAP
®
Business One 中文版培训教材——SDK
目 录
第一章 SAP BUSINESS ONE SDK中文版概述...........................................................................4
一、课程设置..................................................................................................................................4
二、SAP Business One SDK简介...................................................................................................5
三、SAP Business One SDK的版本.............................................................................................10
四、SAP Business One SDK的兼容性.........................................................................................10
五、SAP Business One SDK应用示例: Data Transfer Workbench..............................................11
六、命名规则................................................................................................................................13
第二章 用户自定义表和字段 .......................................................................................................14
第一节 用户自定义表、字段描述 ..................................................................................................14
一、创建自定义表........................................................................................................................14
二、添加自定义字段....................................................................................................................16
三、添加数据................................................................................................................................19
第二节 练习.....................................................................................................................................23
第三章 DI API...............................................................................................................................24
第一节 DI API 概述........................................................................................................................24
一、总体介绍................................................................................................................................24
二、安装........................................................................................................................................24
三、体系结构................................................................................................................................24
四、存取模式................................................................................................................................25
五、版本控制................................................................................................................................26
六、技术支持................................................................................................................................27
第二节 业务数据对象.....................................................................................................................28
一、Business Object......................................................................................................................28
二、Non-Business Objects............................................................................................................45
第三节 WORKING WITH XML..................................................................................................................49
一、什么是XML...........................................................................................................................49
二、XML文件的优点...................................................................................................................49
三、DI API.中使用XML ..............................................................................................................49
四、绑定XML文件.......................................................................................................................51
五、其它工具中使用....................................................................................................................51
六、练习........................................................................................................................................51
第四节 事务.....................................................................................................................................51
一、概述........................................................................................................................................51
二、例子........................................................................................................................................52
三、练习........................................................................................................................................53
第五节 DI_API高级特性.................................................................................................................53
一、Data Interface MetaData Objects ...........................................................................................53
二、Data Interface SBObob Object...............................................................................................57
三、Data Interface Recordset Object vs. DataBrowser Object......................................................59
第四章 UI API...............................................................................................................................62
第 1 页 共 146 页
SAP
®
Business One 中文版培训教材——SDK
第一节 UI API概述 .........................................................................................................................62
一、目的........................................................................................................................................62
二、适用性....................................................................................................................................62
三、开发说明................................................................................................................................62
四、运行需求................................................................................................................................62
第二节 UI API 体系介绍................................................................................................................62
一、体系........................................................................................................................................62
二、兼容性....................................................................................................................................63
第三节 UI API对象 .........................................................................................................................64
一、Application Object .................................................................................................................65
二、Form Object ...........................................................................................................................67
三、Item Object.............................................................................................................................70
四、ItemEvent Object ...................................................................................................................71
五、BubbleEvent...........................................................................................................................73
六、Menuitem Object....................................................................................................................75
七、Menu Event Object ................................................................................................................76
八、XML使用...............................................................................................................................78
九、DataBind Object.....................................................................................................................80
第四节 应用同步处理.....................................................................................................................82
一、文档控制................................................................................................................................82
二、强制事件处理........................................................................................................................83
第五节 UI API高级特性 .................................................................................................................85
一、 Working with Matrix............................................................................................................85
二 、屏幕制作器..........................................................................................................................86
三、 Single Sign-On.....................................................................................................................89
四、 Filtering Events....................................................................................................................91
五、 ToolBar Control ...................................................................................................................92
六、 LinkButton ...........................................................................................................................95
第五章 ADD ON的注册和安装....................................................................................................97
第一节 总体介绍.............................................................................................................................97
一、概览........................................................................................................................................97
第二节 ADD ON注册........................................................................................................................97
一、Add on的启动原理................................................................................................................97
二、Add on的注册........................................................................................................................98
第三节 安装程序...........................................................................................................................100
一、原理......................................................................................................................................100
二、安装程序..............................................................................................................................100
第六章 CASE STUDY.....................................................................................................................101
第一节 需求分析...........................................................................................................................101
一、现有功能分析......................................................................................................................101
二、差异分析..............................................................................................................................101
三、具体需求分析:.....................................................................................................................101
第二节 设计...................................................................................................................................101
第 2 页 共 146 页
SAP
®
Business One 中文版培训教材——SDK
一、数据结构..............................................................................................................................101
二、用户界面..............................................................................................................................102
第三节 业务逻辑...........................................................................................................................103
一、主业务流程..........................................................................................................................103
二、个人所得税计算流程..........................................................................................................104
三、操作流程..............................................................................................................................104
第四节 建立表和字段...................................................................................................................105
一、自定义表..............................................................................................................................105
二、自定义字段..........................................................................................................................105
第五节 界面设计...........................................................................................................................106
一、界面......................................................................................................................................106
第六节 代码................................................................................................................................... 111
一、建立与SAP Business One 的连接,取得Application, Company 对象............................ 111
二、添加计算薪水及个人所得税功能到菜单 ..........................................................................114
三、通过菜单调起计算薪水及个人所得税表单 ......................................................................115
四、表单初始化..........................................................................................................................115
五、界面操作..............................................................................................................................121
六、保存数据..............................................................................................................................123
七、选择公司及退出..................................................................................................................127
第七节 注册及安装程序...............................................................................................................128
第八节 练习...................................................................................................................................128
附录 CASE STUDY 源代码 ..............................................................................................................129
一、SalaryForm.cls .....................................................................................................................129
二、SubMain.bas.........................................................................................................................144
教材说明..............................................................................................................................................146
第 3 页 共 146 页
SAP
®
Business One 中文版培训教材——SDK
第一章 SAP Business One SDK 中文版概述
一、课程设置
1. 课程内容及时间分配
SAP Business One SDK 中文版培训课程主要为合作伙伴开设,根据产品的功能划
分,共分为五门课。课程以 SDK 的开发功能和流程为主线,讲解 SAP Business One SDK
的主要功能。课程后附相应的习题以供练习,帮助用户了解开发原理和实现过程。
课程名称 内容 课时
概述 课程总体介绍 4小时
用户自定义
表和字段
总体介绍
用户自定义表、字段描述
4 小时
DI API
DI_API 概览
业务数据对象
Working with XML
事务
DI_API 高级特性
8 小时
UI API
UI API 概述
UI API 体系介绍
UI API 对象
应用同步处理
UI API 高级特性
8 小时
注册和安装
总体介绍
Add on 注册
安装程序
4 小时
Case Study
需求分析
设计
业务逻辑
建立表和字段
界面设计
代码
注册及安装程序
2. 课程要求
本课程参加人员的基本要求:基础的计算机知识和 SAP Business One 的业务知识,熟
悉 Microsoft 操作系统和 MS Office 工具,具有基本的 MS Visual Studio 或 Java 开发知识和
使用经验。
3. 课程目标
通过课程的学习,能够熟练使用 SAP Business One SDK 开发 SAP Business One 产品中
欠缺的功能模块,增强产品模块功能,创建 SAP Business One 与第三方应用程序之间的接
口,完成对 SAP Business One 的增值开发。
第 4 页 共 146 页