




























































































Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Prepare-se para as provas
Estude fácil! Tem muito documento disponível na Docsity
Prepare-se para as provas com trabalhos de outros alunos como você, aqui na Docsity
Encontra documentos específicos para os exames da tua universidade
Prepare-se com as videoaulas e exercícios resolvidos criados a partir da grade da sua Universidade
Responda perguntas de provas passadas e avalie sua preparação.
Ganhe pontos para baixar
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
CONTEUDO - DOCUMENTAÇÃO DO SAP SCRIPT PARA AUTOMATIZAÇÃO EXCEL
Tipologia: Resumos
1 / 302
Esta página não é visível na pré-visualização
Não perca as partes importantes!





























































































©^ 2019 SAP SE or an SAP
affiliate
company. All rights reserved.
2 P U B L I C
SAP GUI Scripting API
4 P U B L I C SAP GUI Scripting API
1 SAP GUI Scripting API
Purpose
Integration
Features
SAP GUI Scripting API SAP GUI Scripting API P U B L I C 5
1.1 Requirements and Remarks
SAP System
SAP GUI Scripting API SAP GUI Scripting API P U B L I C 7
SAP GUI
Remarks
SAP Notes on SAP GUI Scripting
480149 Describes the ABAP and kernel patch level requirements
587202 Limitations of SAP GUI Scripting
619459 SAP GUI Scripting support of SAP applications
692245 Additional server based security options for Scripting
839115 Load test with SAP GUI scripting
983990 SAP GUI Scripting security: Enable Scripting per system user
1441550 SAP GUI scripting: Sample applications
1.2 Objects
Classes
Class Module Description
GuiAbapEditor Object [page 16 ] (^) The GuiAbapEditor object represents the new ABAP editor
control available as of SAP_BASIS release 6.20 (see also SAP Note 930742). GuiAbapEditor extends GuiShell.
GuiApoGrid Object [page 29 ] (^) The GuiApoGrid object is component, which is similar to Gui
GridView, but which contains additional SCM specific func tions (used for example in transaction /sapapo/sdp94). GuiApoGrid extends GuiShell.
8 P U B L I C
SAP GUI Scripting API SAP GUI Scripting API
Class Module Description
GuiComboBoxControl Object [page 75 ] GuiComboboxControl offers a combo box that can be used inside control containers (unlike the Dynpro element repre sented by GuiComboBox). GuiComboBoxControl extends GuiShell.
GuiComboBoxEntry Object [page 78 ] Members of the Entries collection of a GuiComboBox are of type GuiComBoxEntry.
GuiComponent Object [page 78 ] 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 ex act type.
GuiComponentCollection Collection [page 79 ] The GuiComponentCollection is used for collections ele
element of the collection is an extension of GuiComponent.
GuiConnection Object [page 81 ] 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. GuiCon nection extends GuiContainer. The type prefix for GuiCon nection is con, the name is con plus the connection number in square brackets.
GuiContainer Object [page 83 ] This interface resembles GuiVContainer. The only difference is that it is not intended for visual objects but rather adminis trative objects such as connections or sessions. Objects ex posing this interface will therefore support GuiComponent but not GuiVComponent. GuiContainer extends GuiCompo nent.
GuiContainerShell Object [page 84 ] A GuiContainerShell is a wrapper for a set of GuiShell ob jects. GuiContainerShell extends GuiVContainer. The type prefix is shellcont, the name is the last part of the id, shell cont[n].
GuiContextMenu Object [page 87 ] 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 sys tem when the menu item is selected.
GuiCTextField Object [page 88 ] 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.
10 P U B L I C
SAP GUI Scripting API SAP GUI Scripting API
Class Module Description
GuiCustomControl Object [page 91 ] The GuiCustomControl is a wrapper object that is used to place ActiveX controls onto dynpro screens. While GuiCus tomControl is a dynpro element itself, its children are of Gui ContainerShell type, which is a container for controls. Gui CustomControl extends GuiVContainer. The type prefix is cntl, the name is the fieldname taken from the SAP data dic tionary.
GuiDialogShell Object [page 93 ] The GuiDialogShell is an external window that is used as a container for other shells, for example a toolbar. GuiDialog Shell extends GuiVContainer. The type prefix is shellcont, the name is the last part of the id, shellcont[n].
GuiEAIViewer2D Object [page 96 ] (^) The GuiEAIViewer2D control is used to view 2-dimensional
graphic images in the SAP system. 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 re corded script is replayed.
GuiEAIViewer2D extends GuiShell.
GuiEAIViewer3D Object [page 98 ] (^) The GuiEAIViewer3D control is used to view 3-dimensional
graphic images in the SAP system. GuiEAIViewer3D extends GuiShell.
GuiEnum Object [page 101 ] (^) GuiEnum is the base class for some enumerators used in
SAP GUI Scripting.
GuiFrameWindow Object [page 101 ] A GuiFrameWindow is a high level visual object in the run time hierarchy. It can be either the main window or a modal popup window. See the GuiMainWindow and GuiModal Window 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 Object [page 108 ] 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 Object [page 110 ] For the graphic adapter control only basic members from GuiShell are available. Recording and playback is not possi ble.
GuiGridView Object [page 113 ] The grid view is similar to the dynpro table control, but sig nificantly more powerful. GuiGridView extends GuiShell.
GuiHTMLViewer Object [page 128 ]
The GuiHTMLViewer is used to display an HTML document inside SAP GUI. GuiHTMLViewer extends GuiShell.
SAP GUI Scripting API SAP GUI Scripting API P U B L I C 11
Class Module Description
GuiPasswordField Object [page 166 ] The only difference between GuiTextField and GuiPassword Field is that the Text property cannot be read for a password field. The returned text is always empty. GuiPasswordField extends GuiTextField. The type prefix is pwd, the name is the fieldname taken from the SAP data dictionary.
GuiPicture Object [page 169 ] (^) The picture control displays a picture on an SAP GUI screen.
GuiPicture extends GuiShell.
GuiRadioButton Object [page 173 ] GuiRadioButton extends GuiVComponent. The type prefix is rad, the name is the fieldname taken from the SAP data dic tionary.
GuiSapChart Object [page 177 ] For the SAP chart control only basic members from GuiShell are available. Recording and playback is not possible.
GuiScrollbar Object [page 179 ] The GuiScrollbar class is a utility class used for example in GuiScrollContainer or GuiTableControl.
GuiScrollContainer Object [page 179 ] This container represents scrollable subscreens. A sub screen may be scrollable without actually having a scrollbar, because the existence of a scrollbar depends on the amount of data displayed and the size of the GuiUserArea. GuiScroll Container extends GuiVContainer. The type prefix is ssub, the name is generated from the data dictionary settings.
GuiSession Object [page 181 ] (^) The GuiSession provides the context in which a user per
forms a certain task such as working with a transaction. It is therefore the access point for applications, which record a user’s actions regarding a specific task or play back those actions. GuiSession extends GuiContainer. The type prefix is ses, the name is ses plus the session number in square brackets.
GuiSessionInfo Object [page 192 ] GuiSessionInfo is a member of all GuiSession objects. It makes available technical information about the session. Some of its properties are displayed in the right corner of the SAP GUI status line.
GuiShell Object [page 195 ] GuiShell is an abstract object whose interface is supported by all the controls. GuiShell extends GuiVContainer. The type prefix is shell, the name is the last part of the id, shell[n].
GuiSimpleContainer Object [page 198 ] This container represents non-scrollable subscreens. It does not have any functionality apart from to the inherited interfa ces. GuiSimpleContainer extends GuiVContainer. The type prefix is sub, the name is generated from the data dictionary settings.
GuiSplit Object [page 201 ] GuiSplit extends GuiShell.
GuiSplitterContainer Object [page 204 ] The GuiSplitterContainer represents the dynpro splitter ele ment, which was introduced in the Web Application Server ABAP in NetWeaver 7.1. The dynpro splitter element is simi lar to the activeX based splitter control, but it is a plain dyn pro element.
SAP GUI Scripting API SAP GUI Scripting API P U B L I C 13
Class Module Description
GuiStage Object [page 206 ] For the stage control only basic members from GuiShell are available. Recording and playback is not possible.
GuiStatusbar Object [page 209 ] GuiStatusbar represents the message displaying part of the status bar on the bottom of the SAP GUI window. It does not include the system and login information displayed in the rightmost area of the status bar as these are available from the GuiSessionInfo object. GuiStatusbar extends GuiVCom ponent. The type prefix is sbar.
GuiStatusPane Object [page 212 ] (^) The parent of the GuiStatusPane objects is the status bar
(see also GuiStatusbar Object). The GuiStatusPane objects reflect the individual areas of the status bar, for example "pane[0]" refers to the section of the status bar where the messages are displayed.
GuiTab Object [page 213 ] The GuiTab objects are the children of a GuiTabStrip object. GuiTab extends GuiVContainer. The type prefix is tabp, the name is the id of the tab’s button taken from SAP data dic tionary.
GuiTableColumn Collection [page 215 ] GuiTableColumn represents a column in a table control. Gui TableColumn extends GuiComponentCollection.
GuiTableControl Object [page 217 ] The table control is a standard dynpro element, in contrast to the GuiCtrlGridView, which looks similar. GuiTableControl extends GuiVContainer. The type prefix is tbl, the name is the fieldname taken from the SAP data dictionary.
GuiTableRow Collection [page 221 ] GuiTableRow represents a row in a table control. GuiTa bleRow extends GuiComponentCollection.
GuiTabStrip Object [page 223 ] A tab strip is a container whose children are of type GuiTab. GuiTabStrip extends GuiVContainer. The type prefix is tabs, the name is the fieldname taken from the SAP data diction ary.
GuiTextedit Object [page 226 ] GuiTextField extends GuiVComponent. The type prefix is txt, the name is the fieldname taken from the SAP data diction ary.
GuiTextField [page 231 ] GuiTextField extends GuiVComponent. The type prefix is txt, the name is the fieldname taken from the SAP data diction ary.
GuiTitlebar Object [page 235 ] The titlebar is only displayed and exposed as a separate ob ject in New Visual Design mode. GuiTitlebar extends GuiV Container. The type prefix and name of GuiTitlebar are titl.
14 P U B L I C
SAP GUI Scripting API SAP GUI Scripting API
1.2.1 GuiAbapEditor Object
Methods
Method
Syntax Description
All methods of the GuiVComponent Object [page 262 ]:
● DumpState ● SetFocus ● Visualize
All methods of the GuiContainer Object [page 83 ]:
● FindById
All methods of the GuiVContainer Object [page 267 ]:
● FindAllByName ● FindAllByNameEx ● FindByName ● FindByNameEx
All methods of the GuiShell Object [page 195 ]:
● SelectContextMenuItem ● SelectContextMenuItemByPosition ● SelectContextMenuItemByText
Returns True if the auto brace facility is currently switched on.
Invokes the auto complete list box.
Returns True if the auto correct facility is currently switched on.
16 P U B L I C
SAP GUI Scripting API SAP GUI Scripting API
Method
Syntax Description
Invokes the auto expand code template mechanism.
Returns True if the auto indent facility is currently switched on.
Makes the first alphabetic character of each word in the se lected text uppercase. All other characters are made lower case.
Performs a clipboard copy operation on the currently se lected text.
Performs a clipboard cut operation on the currently selected text.
Pastes the current contents of the clipboard beginning from the current cursor position.
Pastes an entry from the editor's clipboard ring to the editor. Index : One-based index of the clipboard entry as it appears in the ABAP editor context menu.
Returns True if code hints are currently enabled.
Encloses the selected lines in comments.
Returns True if the correct caps function is currently switched on.
Deletes the character, which proceeds the current cursor position. Equivalent to pressing the key.
SAP GUI Scripting API SAP GUI Scripting API P U B L I C 17
Method
Syntax Description
Returns the index of the image associated with the auto complete entry specified in Index. Returns -1 if no image is associated.
Returns the index of the sub image associated with the auto complete entry specified in Index. Returns -1 if no sub image is associated.
Returns the tooltip text, which is displayed by the autocom plete toolbar button specified in Index.
Returns the number of milliseconds, which elapse between highlighting an entry in the autocomplete listbox and the ap pearance of the corresponding tooltip window.
Retrieves the text in the currently displayed code hint or au tocomplete listbox tooltip window. Multiple lines are sepa rated with \n characters.
Returns the column number in which the cursor currently re sides.
Returns the number of the line upon which the cursor cur rently resides.
Returns the line number of the top-most visible line in the current editor session.
Returns a string containing the current contents of the clip board in HTML format. Returns an empty string if the clip board does not contain anything in HTML format.
SAP GUI Scripting API SAP GUI Scripting API P U B L I C 19
Method
Syntax Description
Returns the line number of the bottom-most visible line in the current editor session.
Returns the total number of lines contained in the document in the current session.
Returns a string containing the contents of the line number specified as a parameter.
Returns a collection of bookmark numbers assigned to the line number passed as a parameter. The number of the bookmark can range from 0 to 9. If no numbered bookmark is assigned then the collection is empty.
Returns a string containing the current contents of the clip board in Rich Text format. Returns an empty string if the clip board does not contain anything in Rich Text format.
Returns the zero based index of the currently selected entry in the auto completion list box. The method will return -1 if no entry is selected.
Returns a string containing the text currently highlighted or selected in the editor session. If the selected text spans more than one line then any line terminator characters will be included in the string returned by this method.
Returns the end line of the structure block relevant to the line number passed to the method. If the line does not reside within a structure block at all then the method returns -1.
Returns the start line of the structure block relevant to the line number passed to the method. If the line resides within a nested block then the start line of the innermost block will be returned. If the line does not reside within a structure block at all then the method returns -1.
20 P U B L I C
SAP GUI Scripting API SAP GUI Scripting API