Archive for March, 2013

Sorry, our news are only available in German

Kategorien: News @en
Comments Off on Sorry, our news are only available in German

Documentation: SAP Gui Scripting with connmove EasyCloud

Kategorien: EasyCloud @en, knowledge base @en
Comments Off on Documentation: SAP Gui Scripting with connmove EasyCloud

 

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

 

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.

 

Record a script

Start at SAP Easy Access menu


Choose script path


Start recording


Call transaction AL08



Stop recording


 

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:tmpsapguial08.vbs $sapGUIConnection
–StatusbarOnly $true

 

Optional parameter:

  • StatusbarOnly: Return only the message displayed in the status bar (default false)

 

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

 

 

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:

 

 

GUI elements

You can run several operations on the list, such as

 

PS
> $result.Count

53

PS
> $result.Get(10)

GuiLabel

Interactive Users

 

 

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:Windowssystem32> $result.Get(1)

BNAME

ADMIN

PS
C:Windowssystem32> $result.Get(2)

NAME_TEXT

Administrator Admin

PS
C:Windowssystem32> $result.Get(3)

CLASS

SUPER

PS
C:Windowssystem32> $result.Get(4)

ACCNT

PS
C:Windowssystem32> $result.Get(5)

LOCKICON

PS
C:Windowssystem32> $result.Get(6)

LOCKREASON

PS
C:Windowssystem32> $result.Get(7)

GLTGV

PS
C:Windowssystem32> $result.Get(8)

GLTGB

PS
C:Windowssystem32> $result.Get(9)

USTYP

A Dialog

PS
C:Windowssystem32> $result.Get(10)

REFUSER

 


EasyCloud Cmdlet: List-CmSAPInstance updated

Kategorien: cmShell @en, knowledge base @en
Comments Off on EasyCloud Cmdlet: List-CmSAPInstance updated

We have updated the List-CmSAPInstance Cmdlet. Now it provides a field instance:

CMDLETS_List_CmSAPInstance

Additionally, we provide to you another new Cmdlet ‘Get-CmSapInstanceInformations’ with which it is possible to get more information about the SAP instance.

This Cmdlet returns SAP profile informations and/or informations of the environment:

CMDLETS_Get_CmSapInstanceInformations


EasyCloud Cmdlets: six new cmdlets which returns data from sap tables

Kategorien: cmShell @en, knowledge base @en
Comments Off on EasyCloud Cmdlets: six new cmdlets which returns data from sap tables

We have added some Cmdlets with which you can read data from tables:

Get-CmSapFILE
Returns the entries of the table PATH
The informations are similar to the transaction FILE.

Get-CmSapALE
Returns the entries of the table EDIPOA

Get-CmSapIDOC
Returns the entries of the table EDIPORT

Get-CmSapMAIL
Returns the entries of the table SXNODES
The informations are similar to the transaction SCOT.

Get-CmSapSystemType
Returns the entries of the table T000
The informations are similar to the transaction SCC4.

Get-CmSM59
Returns the entries of the table RFCDES
The informations are similar to the transaction SM59.

Most of these Cmdlets have parameters to filter the result list.
The filter parameters expect a regular expression as input.

CMDLETS_GETCMSAPFILE