没有合适的资源?快使用搜索试试~ 我知道了~
首页SAP_Scripting_API.pdf
资源详情
资源评论
资源推荐
SAP GUI Scripting API
Send comments on this topic.
Introduction
SAP GUI Scripting API
Purpose
Ever since the release of SAP system version 4.6C, there has been only very limited support for emulating user
interaction with a SAP system. Existing technologies, such as ITOLE or Guilib, connect to the SAP system at the
protocol level and have never been able to emulate the behavior of the compound controls introduced with 4.6C.
For this reason, applications relying on emulating user input worked only on the decreasing number of transactions
using only standard dynpro elements.
Examples of affected applications are:
Automatic testing of SAP functionality
Customized front end applications replacing the SAP GUI
Tools to customize applications on the SAP GUI level -> GuiXT
E-Learning applications that guide a user through SAP transactions
Integration
Many of the available SAP GUI controls were designed exclusively with user interaction in mind. As their business
functionality is closely coupled with the user interface they cannot be instantiated outside the SAP GUI in a batch-
like fashion.
We therefore decided not to add the business functionality of the SAP GUI controls to a low-level integration
component such as Guilib. Instead the controls run within the SAP GUI, which itself exposes a new interface
allowing the automation of tasks.
Features
We developed an object model representing the SAP GUI at runtime as a hierarchy of objects. Most of these expose
an interface to an element of the user interface. These interfaces can be used to perform all the actions a user
could do with the given element. In addition we offer outgoing interfaces through which an external application can
receive notifications about events occurring within the SAP GUI.
Available uses for the scripting component include
Listening to the actions a user performs in the SAP GUI and record them as a script
Running a script that emulates user interaction
Logging the SAP system information, such as response time
Runtime hierarchy overview
Top level administrative objects
All objects defined in the scripting component's object model are available at runtime as members of a hierarchical
tree with the root object being GuiApplication.
GuiApplication represents the process in which the SAP system activity takes place. Because of this there should
always be only one GuiApplication object within a process. The children of GuiApplication are all the connections of
class GuiConnection to the SAP systems available for scripting.
Connections are opened manually from the SAPLogon dialog or using the openConnection and
openConnectionByConnectionString methods of GuiApplication from a script. As soon as a connection has been
established a first session is created as a child of the connection. Up to 5 additional sessions can be created. Again,
this can be done manually using the 'Create Session' menu item or toolbar button, or from a script using the
CreateSession method of GuiSession.
While GuiApplication represents the overall SAP GUI application, a GuiSession represents a specific task being
performed. For any given session there is exactly one transaction currently executed, and most tasks performed in
SAP GUI can be performed within the context of one GuiSession.
These considerations determine the event model of the scripting component. A user's interactions are best recorded
or logged in the context of one session, therefore the GuiSession exposes an outgoing interface that allows an
application to listen to the user interaction.
SAP GUI Scripting API
Send comments on this topic.
Introduction
SAP GUI Scripting API
Purpose
Ever since the release of SAP system version 4.6C, there has been only very limited support for emulating user
interaction with a SAP system. Existing technologies, such as ITOLE or Guilib, connect to the SAP system at the
protocol level and have never been able to emulate the behavior of the compound controls introduced with 4.6C.
For this reason, applications relying on emulating user input worked only on the decreasing number of transactions
using only standard dynpro elements.
Examples of affected applications are:
Automatic testing of SAP functionality
Customized front end applications replacing the SAP GUI
Tools to customize applications on the SAP GUI level -> GuiXT
E-Learning applications that guide a user through SAP transactions
Integration
Many of the available SAP GUI controls were designed exclusively with user interaction in mind. As their business
functionality is closely coupled with the user interface they cannot be instantiated outside the SAP GUI in a batch-
like fashion.
We therefore decided not to add the business functionality of the SAP GUI controls to a low-level integration
component such as Guilib. Instead the controls run within the SAP GUI, which itself exposes a new interface
allowing the automation of tasks.
Features
We developed an object model representing the SAP GUI at runtime as a hierarchy of objects. Most of these expose
an interface to an element of the user interface. These interfaces can be used to perform all the actions a user
could do with the given element. In addition we offer outgoing interfaces through which an external application can
receive notifications about events occurring within the SAP GUI.
Available uses for the scripting component include
Listening to the actions a user performs in the SAP GUI and record them as a script
Running a script that emulates user interaction
Logging the SAP system information, such as response time
Runtime hierarchy overview
Top level administrative objects
All objects defined in the scripting component's object model are available at runtime as members of a hierarchical
tree with the root object being GuiApplication.
GuiApplication represents the process in which the SAP system activity takes place. Because of this there should
always be only one GuiApplication object within a process. The children of GuiApplication are all the connections of
class GuiConnection to the SAP systems available for scripting.
Connections are opened manually from the SAPLogon dialog or using the openConnection and
openConnectionByConnectionString methods of GuiApplication from a script. As soon as a connection has been
established a first session is created as a child of the connection. Up to 5 additional sessions can be created. Again,
this can be done manually using the 'Create Session' menu item or toolbar button, or from a script using the
CreateSession method of GuiSession.
While GuiApplication represents the overall SAP GUI application, a GuiSession represents a specific task being
performed. For any given session there is exactly one transaction currently executed, and most tasks performed in
SAP GUI can be performed within the context of one GuiSession.
These considerations determine the event model of the scripting component. A user's interactions are best recorded
or logged in the context of one session, therefore the GuiSession exposes an outgoing interface that allows an
application to listen to the user interaction.
On the other hand, the GuiApplication exposes an outgoing interface that raises administrative events, for example
when a session is created or destroyed.
Top level user interface objects
A session usually has a GuiMainWindow as its child. This window is the starting point for user interaction with a
session.
The children of the GuiMainWindow are easily identified straightforward.
Please note that the availability of some of these objects depends on the design mode used. The titlebar, for
example, is available only in New Visual Design, not in classic mode, as can be seen in the following screenshot.
© SAP AG. All Rights Reserved.
SAP GUI Scripting API
Send comments on this topic.
Project Overview
Description
SAP GUI Scripting API 6.40
The latest version of this document is available at ftp://ftp.sap.com/pub/sapgui/win/640/scripting/docs/
User Controls
Control
Description
GuiApplication
The GuiApplication represents the process in which all SAP GUI activity
takes place. If the scripting component is accessed by attaching to a
SAPlogon process, then GuiApplication will represent SAPlogon.
GuiApplication is a creatable class. However, there must be only one
component of this type in any process. GuiApplication extends
GuiContainer.
Classes
Class Module
Description
GuiBarChart
The GuiBarChart is a powerful tool to display and modify time scale diagrams.
The object is of a very technical nature. It should only be used for recording
and playback, as most of the parameters can not be determined in any other
way. GuiBarChart extends GuiShell.
GuiBox
A GuiBox is a simple frame with a name. The items inside the frame are not
children of the box. GuiBox extends GuiVComponent. The type prefix is box.
The name property is the ABAP fieldname.
GuiButton
GuiButton represents all push buttons that are on dynpros, the toolbar or in
table controls. GuiButton extends GuiVComponent. The type prefix is btn, the
name property is the fieldname taken from the SAP data dictionary There is
one exception: for tabstrip buttons, it is the button id set in screen painter that
is taken from the SAP data dictionary.
GuiCalendar
The calendar control can be used to select single dates or periods of time.
GuiCalendar extends GuiShell.
GuiChart
The GuiChart object is of a very technical nature. It should only be used for
recording and playback, as most of the parameters can not be determined in
any other way.
GuiCheckBox
GuiCheckBox extends GuiVComponent. The type prefix is chk, the name is the
fieldname taken from the SAP data dictionary.
GuiCollection
GuiCollection is similar to GuiComponentCollection, but its members are not
necessarily extensions of GuiComponent. It can be used to pass a collection as
a parameter to functions of scriptable objects. An object of this class is created
by calling the CreateGuiCollection function of the GuiApplication.
GuiColorSelector
GuiColorSelector displays a set of colors for selection. It extends GuiShell.
GuiComboBox
The GuiComboBox looks somewhat similar to GuiCTextField, but has a
completely different implementation. While pressing the combo box button of a
GuiCTextField will open a new dynpro or control in which a selection can be
made, GuiComboBox retrieves all possible choices on initialization from the
server, so the selection is done solely on the client. GuiComboBox extends
GuiVComponent. The type prefix is cmb, the name is the fieldname taken from
the SAP data dictionary.
GuiComboBoxEntry
Members of the Entries collection of a GuiComboBox are of type
GuiComBoxEntry
GuiComponent
GuiComponent is the base class for most classes in the Scripting API. It was
designed to allow generic programming, meaning you can work with objects
without knowing their exact type.
GuiComponentCollection
The GuiComponentCollection is used for collections elements such as the
children property of containers. Each element of the collection is an extension
of GuiComponent.
GuiConnection
A GuiConnection represents the connection between SAP GUI and an
application server. Connections can be opened from SAPlogon or from
GuiApplication’s openConnection and openConnectionByConnectionString
methods. GuiConnection extends GuiContainer. The type prefix for
GuiConnection is con, the name is con plus the connection number in square
brackets.
GuiContainer
This interface resembles GuiVContainer. The only difference is that it is not
intended for visual objects but rather administrative objects such as
connections or sessions. Objects exposing this interface will therefore support
GuiComponent but not GuiVComponent. GuiContainer extends GuiComponent.
GuiContainerShell
A GuiContainerShell is a wrapper for a set of GuiShell objects.
GuiContainerShell extends GuiVContainer. The type prefix is shellcont, the
name is the last part of the id, shellcont[n].
GuiContextMenu
A GuiContextMenu may have other GuiContextMenu objects as children.
GuiContextMenu extends GuiMenu. The type is mnu, the name is the function
code that is sent to the system when the menu item is selected.
GuiCTextField
If the cursor is set into a text field of type GuiCTextField a combo box button is
displayed to the right of the text field. Pressing this button is equivalent to
pressing the F4 key. The button is not represented in the scripting object
model as a separate object; it is considered to be part of the text field.
There are no other differences between GuiTextField and GuiCTextField.
GuiCTextField extends GuiTextField. The type prefix is ctxt, the name is the
Fieldname taken from the SAP data dictionary.
GuiCustomControl
The GuiCustomControl is a wrapper object that is used to place ActiveX
controls onto dynpro screens. While GuiCustomControl is a dynpro element
itself, its children are of GuiContainerShell type, which is a container for
controls. GuiCustomControl extends GuiVContainer. The type prefix is cntl, the
name is the fieldname taken from the SAP data dictionary.
GuiDialogShell
The GuiDialogShell is an external window that is used as a container for other
shells, for example a toolbar. GuiDialogShell extends GuiVContainer. The type
prefix is shellcont, the name is the last part of the id, shellcont[n].
GuiEAIViewer2D
The GuiEAIViewer2D control is used to view 2-dimensional graphic images in
the SAP system. Presently Webviewer2D supports 22 available image types.
The user can carry out redlining over the loaded image. The scripting wrapper
for this control records all user actions during the redlining process and
reproduces the same actions when the recorded script is replayed.
GuiEAIViewer2D extends GuiShell.
GuiEAIViewer3D
GuiFrameWindow
A GuiFrameWindow is a high level visual object in the runtime hierarchy. It can
be either the main window or a modal popup window. See the GuiMainWindow
and GuiModalWindow sections for examples. GuiFrameWindow itself is an
abstract interface. GuiFrameWindow extends GuiVContainer. The type prefix is
wnd, the name is wnd plus the window number in square brackets.
GuiGOSShell
The GuiGosShell is only available in New Visual Design mode. GuiGOSShell
extends GuiVContainer. The type prefix is shellcont, the name is the last part
of the id, shellcont[n].
GuiGraphAdapt
For the graphic adapter control only basic members from GuiShell are
available. Recording and playback is not possible.
GuiGridView
The grid view is similar to the dynpro table control, but significantly more
powerful. GuiGridView extends GuiShell.
GuiHTMLViewer
The GuiHTMLViewer is used to display an HTML document inside SAP GUI.
GuiHTMLViewer extends GuiShell.
GuiLabel
GuiLabel extends GuiVComponent. The type prefix is lbl, the name is the
fieldname taken from the SAP data dictionary.
GuiMainWindow
This window represents the main window of a SAP GUI session.
剩余2968页未读,继续阅读
啦啦啦涂涂
- 粉丝: 90
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2022年中国足球球迷营销价值报告.pdf
- 房地产培训 -营销总每天在干嘛.pptx
- 黄色简约实用介绍_汇报PPT模板.pptx
- 嵌入式系统原理及应用:第三章 ARM编程简介_3.pdf
- 多媒体应用系统.pptx
- 黄灰配色简约设计精美大气商务汇报PPT模板.pptx
- 用matlab绘制差分方程Z变换-反变换-zplane-residuez-tf2zp-zp2tf-tf2sos-sos2tf-幅相频谱等等.docx
- 网络营销策略-网络营销团队的建立.docx
- 电子商务示范企业申请报告.doc
- 淡雅灰低面风背景完整框架创业商业计划书PPT模板.pptx
- 计算模型与算法技术:10-Iterative Improvement.ppt
- 计算模型与算法技术:9-Greedy Technique.ppt
- 计算模型与算法技术:6-Transform-and-Conquer.ppt
- 云服务安全风险分析研究.pdf
- 软件工程笔记(完整版).doc
- 电子商务网项目实例规划书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1