cmshell for SAP CommandLets for SAP GUIScripting SAP GUI Scripting connmove GmbH Version: 0.7 Seite 1 von 15



Similar documents
Using Management Shell Reports and Tracking User Access in the NetVanta UC Server

IGEL Universal Management. Installation Guide

Gravity Forms: Creating a Form

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

User Manual. Version connmove GmbH Version: Seite 1 von 33

Installation Guidelines (MySQL database & Archivists Toolkit client)

LAB 1: Installing Active Directory Federation Services

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

.OR.AT.ATTORNEY.AUCTION.BARGAINS.BAYERN.BERLIN.BLACKFRIDAY.BOUTIQUE.BRUSSELS.BUILDERS

AddLocalUser AddLocalGroup AddLocalUserToLocalGroup AddDomainUserToLocalGroup AddDomainGroupToLocalGroup

DEPLOYMENT GUIDE DEPLOYING F5 AUTOMATED NETWORK PROVISIONING FOR VMWARE INFRASTRUCTURE

POWERSHELL (& SHAREPOINT) This ain t your momma s command line!

Outlook Express. Make Changes in Red: Open up Outlook Express. From the Menu Bar. Tools to Accounts - Click on Mail Tab.

Active Directory Cleaner User Guide 1. Active Directory Cleaner User Guide

Upgrading MySQL from 32-bit to 64-bit

Administration Guide. . All right reserved. For more information about Specops Gpupdate and other Specops products, visit

Published. Technical Bulletin: Use and Configuration of Quanterix Database Backup Scripts 1. PURPOSE 2. REFERENCES 3.

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

Active Directory Authentication Integration

System Administration and Log Management

Collaboration Technology Support Center Microsoft Collaboration Brief

HELP DOCUMENTATION E-SSOM INSTALLATION GUIDE

Setup and configuration for Intelicode. SQL Server Express

Mesa DMS. Once you access the Mesa Document Management link, you will see the following Mesa DMS - Microsoft Internet Explorer" window:

Managing the System Event Log

Norman Secure Backup. SQL Backup Training Guide. Author: Arne Stieghorst Layout: Eva Langballe

Management Utilities Configuration for UAC Environments

ECAT SWE Exchange Customer Administration Tool Web Interface User Guide Version 6.7

Web Sites, Virtual Machines, Service Management Portal and Service Management API Beta Installation Guide

Project management integrated into Outlook

HELP DOCUMENTATION SSRPM WEB INTERFACE GUIDE

Windows PowerShell Essentials

Release Notes For Versant/ODBC On Windows. Release

Computer Science and Engineering MacOS Cisco VPN Client Installation and Setup Guide

Please note that a username and password will be made available upon request. These are necessary to transfer files.

Application Note SORCUS Support System. Using the SORCUS Support System (Customers)

Outlook Express. Make Changes in Red: Open up Outlook Express. From the Menu Bar. Tools to Accounts - Click on. User Information

FileMaker 13. ODBC and JDBC Guide

Using the SQL Server Linked Server Capability

Introduction to Operating Systems

MS SQL Server Database Management

IN STA LLIN G A VA LA N C HE REMOTE C O N TROL 4. 1

Cisco CNR and DHCP FAQs for Cable Environment

Outlook Express. Make Changes in Red: Open up Outlook Express. From the Menu Bar. Tools to Accounts - Click on Mail Tab.

WebSphere Business Monitor V7.0: Clustering Single cluster deployment environment pattern

DocAve 6 SDK and Management Shell

Copyright Texthelp Limited All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval

Google Trusted Stores Setup in Magento

Managing Qualys Scanners

A Tutorial on SQL Server CMPT 354 Fall 2007

External Data Connector (EMC Networker)

FileMaker 12. ODBC and JDBC Guide

LICENSE4J FLOATING LICENSE SERVER USER GUIDE

PUBLIC. How to Use in SAP Business One. Solutions from SAP. SAP Business One 2005 A SP01

SPHOL205: Introduction to Backup & Restore in SharePoint Hands-On Lab. Lab Manual

GoDaddy (CentriqHosting): Data driven Web Application Deployment

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Mobile Solutions for Data Collection. Sarah Croft and Laura Pierik

SELF SERVICE RESET PASSWORD MANAGEMENT WEB INTERFACE GUIDE

Nagios XI Monitoring Windows Using WMI

WebCT 3.7 Campus Edition System Administrator s Guide. Technical Communications

CLC Server Command Line Tools USER MANUAL

File Manager User Guide

During your session you will have access to the following lab configuration.

How to Create Database in Microsoft Excel 2003

Step-By-Step Guide to Deploying Lync Server 2010 Enterprise Edition

Integrating CoroSoft Datacenter Automation Suite with F5 Networks BIG-IP

INTRODUCTION TO ATRIUM... 2 SYSTEM REQUIREMENTS... 2 TECHNICAL DETAILS... 2 LOGGING INTO ATRIUM... 3 SETTINGS... 4 NAVIGATION PANEL...

Exercise Safe Commands and Audit Trail

TIBCO Runtime Agent Domain Utility User s Guide Software Release November 2012

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

Syslog Monitoring Feature Pack

Moving/Restoring the StarShip SQL database

GuiXT. Simplify and optimize the SAP ERP user interface

LDAP Server Configuration Example

ClicktoFax Service Usage Manual

Introduction to Mobile Access Gateway Installation

SQL Server 2008 R2 Express Edition Installation Guide

PART 1 CONFIGURATION 1.1 Installing Dashboard Software Dashboardxxx.exe Administration Rights Prerequisite Wizard

Printer Connection Manager

Windows Azure Pack Installation and Initial Configuration

How to Configure the Workflow Service and Design the Workflow Process Templates

CTERA Agent for Linux

Buffalo Technology: Migrating your data to Windows Storage Server 2012 R2

Oracle Enterprise Manager

Dell One Identity Cloud Access Manager How to Configure Microsoft Office 365

How To Backup In Cisco Uk Central And Cisco Cusd (Cisco) Cusm (Custodian) (Cusd) (Uk) (Usd).Com) (Ucs) (Cyse

NetIQ Advanced Authentication Framework - Password Filter. Installation Guide. Version 5.1.0

Installing and Configuring WhatsUp Gold

Installing and Configuring Login PI

How to install and use the File Sharing Outlook Plugin

HP Device Monitor (v 1.1) for Microsoft System Center User Guide

Veritas Cluster Server

Matisse Installation Guide for MS Windows. 10th Edition

Trial environment setup. Exchange Server Archiver - 3.0

Using SSH Secure FTP Client INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 2.0 Fall 2008.

Using Device Discovery

TeamViewer 9 Manual Management Console

Transcription:

cmshell for SAP SAP GUI Scripting CommandLets for SAP GUIScripting connmove GmbH Version: 0.7 Seite 1 von 15

Inhalt Requirements... 3 Record a script... 4 Start at SAP Easy Access menu... 4 Choose script path... 4 Start recording... 5 Call transaction AL08... 5 Stop recording... 6 Connect to the SAP GUI... 7 Open a SAP GUI session... 7 Run the script... 7 Stop the SAP GUI connecction... 8 Access the result value... 8 Statusbar message... 9 GUI elements... 10 64bit PowerShell... 11 GUI GridView... 11 Usage Step by Step... 13 Quellen... 15 SAP GUI Scripting API for the Windows and Java Platforms:... 15 SAP note 1441550 SAP GUI Scripting: Beispielanwendungen:... 15 SAP GUI Scripting Security Guide:... 15 SAP GUI Scripting documentation:... 15 The SAP Control Framework:... 15 Seite 2 von 15

Requirements - SAP GUI must be installed on the client system. - SAP GUI Scripting must be enabled on the application server by setting the sapgui/user_scripting parameter. - SAP GUI Scripting must be enabled on the client system in the Option dialog of the SAP GUI. Seite 3 von 15

Record a script Start at SAP Easy Access menu Choose script path Seite 4 von 15

Start recording Call transaction AL08 Seite 5 von 15

Stop recording Seite 6 von 15

Connect to the SAP GUI use 32bit PowerShell Open a SAP GUI session $sapguiconnection = Get-CmSapGuiConnect -UserName admin -Password ****** -Host CMD002 -Hide $false -MultiLogon $true Optional parameter Hide: Do not show the SAP GUI (default true) MultiLogon: Allow multiple logons to the production system using the same user (default false) Run the script $result = Invoke-CmSapGuiScripting -FileName c:\tmp\sapgui\al08.vbs $sapguiconnection StatusbarOnly $true Optional parameter: StatusbarOnly: Return only the message displayed in the status bar (default false) Seite 7 von 15

Stop the SAP GUI connecction You may execute more scripts. When finished you have to call the Close-CmSapGuiConnect method: Close-CmSapGuiConnect $sapguiconnection Access the result value The commandlet returns a List<String[]> object. The elements of the List<String[]> consists of a pair of strings ( GUI element type, value). PS > $result.gettype() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Object[] System.Array Seite 8 von 15

Statusbar message The first element contains the status bar message: PS> $result[0] GuiStatusbar Selection restricted to 200 hits The statusbar message is empty at the AL08 example: Seite 9 von 15

GUI elements You can run several operations on the list, such as PS > $result.count 53 PS > $result.get(10) GuiLabel Interactive Users Seite 10 von 15

64bit PowerShell You may use the cmdlet from a 64bit PowerShell by calling the start-job commandlet: # Set the input parameter. $argumentlist = $UserName, $Password, $HostName, $Client, $scriptpath # Run the SAP GUI scripting command lets in a 32bit environment. $rfccheckresult = start-job { param($username, $Password, $HostName, $Client, $scriptpath) add-pssnapin CmCmdlets; $sapguiconnection = Get-CmSapGuiConnect -UserName $UserName -Password $Password -Host $HostName -Client $Client -Hide $false -MultiLogon $true; Invoke-CmSapGuiScripting -FileName $scriptpath $sapguiconnection; $null = Close-CmSapGuiConnect $sapguiconnection } -RunAs32 -ArgumentList $argumentlist wait-job Receive-Job GUI GridView On some dypros the data is displayed in a GridView. In this case the elements of the List<String[]> consists of a pair of strings ( SAP table column name, value). PS C:\Windows\system32> $result.get(1) BNAME ADMIN PS C:\Windows\system32> $result.get(2) NAME_TEXT Administrator Admin PS C:\Windows\system32> $result.get(3) CLASS SUPER PS C:\Windows\system32> $result.get(4) ACCNT PS C:\Windows\system32> $result.get(5) LOCKICON PS C:\Windows\system32> $result.get(6) LOCKREASON PS C:\Windows\system32> $result.get(7) GLTGV PS C:\Windows\system32> $result.get(8) GLTGB PS C:\Windows\system32> $result.get(9) USTYP A Dialog PS C:\Windows\system32> $result.get(10) REFUSER Seite 11 von 15

Seite 12 von 15

Usage Step by Step 1. Open a SAP GUI session $con = Get-CmSapGuiConnect -UserName admin -Password 1Password! - Host ERP -Hide $false -MultiLogon $true Optional parameter Hide: Do not show the SAP GUI (default true) MultiLogon: Allow multiple logons to the production system using the same user (default false) 2. Execute a SAP script $result = Invoke-CmSapGuiScripting -FileName c:\tmp\sapgui\script1.vbs $con - StatusbarOnly $true Optional parameter StatusbarOnly: Return only the message from the status bar (default false) 3. The command returns a List<String[]> object with the first element containing the status bar message: PS> $result[0] GuiStatusbar Selection restricted to 200 hits 4. All elements of the List<String[]> consists of a pair of strings ( GUI element type, value). PS > $result[22] GuiLabel ABAP_ASSERT PS > $result[22][0] GuiLabel PS > $result[22][1] ABAP_ASSERT 5. You can run several operations on the list, such as PS > $result.count 1003 PS > $result.get(0) GuiStatusbar Selection restricted to 200 hits PS > $result.gettype() IsPublic IsSerial Name BaseType Seite 13 von 15

-------- -------- ---- -------- True True Object[] System.Array 6. You may execute more scripts. When finished you have to call the Close- CmSapGuiConnect method: PS > Close-CmSapGuiConnect $con Seite 14 von 15

Quellen SAP GUI Scripting API for the Windows and Java Platforms: http://www.synactive.com/download/sap%20gui%20scripting/sap%20gui%20scripting%20api.pdf SAP note 1441550 SAP GUI Scripting: Beispielanwendungen: https://websmp130.sapag.de/sap%28bd1kzszjptawmq==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1441550 SAP GUI Scripting Security Guide: http://www.synactive.com/download/sap%20gui%20scripting/sap%20gui%20scripting%20security% 20settings.pdf SAP GUI Scripting documentation: http://service.sap.com/sapgui The SAP Control Framework: http://help.sap.com/saphelp_46c/helpdata/en/2a/755b94ca5911d299af5c9604c10e27/frameset.htm Seite 15 von 15