iampython2134
iampython2134

Reputation: 53

S/4HANA UI automation. How?

My company provides us access to S/4HANA through their corporate portal, not SAP GUI. I guess because of security reasons. Not sure how it logs us in, probably SSO or has some sort of session key in the back ground, but I tried the script below to automate some SAP processes and it does not played.

If Not IsObject(application) Then
   Set SapGuiAuto  = GetObject("SAPGUI")
   Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
   Set connection = application.Children(0)
End If
If Not IsObject(session) Then
   Set session    = connection.Children(0)
End If
If IsObject(WScript) Then
   WScript.ConnectObject session,     "on"
   WScript.ConnectObject application, "on"

If I go to the script file and double click it, I get a syntax error in line 2. I think because of lack of access to SAP through the GUI it asks me for a credentials (in portal I sign in through SSO).

Is this a reason of an error?

Upvotes: 1

Views: 4201

Answers (1)

Suncatcher
Suncatcher

Reputation: 10621

SAP Fiori interface which is default for S4HANA and which you presumably use in your corporate portal

does NOT support GUI scripting which naturally emerges from its title SAP GUI Scripting, i.e. it is only supported by SAP GUI.

What are the alternatives:

  1. SAP CBTA, Component-Based Test Automation. A tool intended more on testers but can be theoretically used by end-users too. Not user-friendly indeed, also requires Solution Manager, but it works with SAP Fiori among others.
  2. HP LoadRunner can be used with Fiori Dashboard too.
  3. UFT, Certify and other tools which are out of the scope of this questions, because officially not documented and supported by SAP

In concluding, I see no real automation replacement/successor for Fiori which is as simple and handy as SAPGUi Scripting for SAPGUI.

Upvotes: 1

Related Questions