Hello UiPath Team,
via Get Attribute activity is it possible to get a selection of properties of the GuiSessionInfo object from the SAP GUI Scripting.
In Uipath Studio it called e.g. sapLanguage, sapProgram or sapScreen. A long time ago I posted in the SAP Community about this possibility to identify an SAP session via this properties.
So far so well. For the SAP GUI Scripting is the connection and session number very important. So is my suggestion to add this information as additional attributes to SAP windows. You can do it very easily, select from the session ID the numbers. The session ID looks like this: /app/con[0]/ses[1]. This means my selected session is in connection 0 and it is session 1. On this way it would be very easy to use existing SAP GUI Scripts with UiPath, like I described here. For the identification of a window, e.g. with the Attach Window Activity, this information is of minor importance. But for an integration scenario with an external SAP GUI script are they very important.
In my opinion it should be very easy to realize this. You work with the GuiSessionInfo object, so you know the GuiSession object and with the property ID you get all you need. All you have to do is to detect the numbers. Here my approach in VBScript:
pos = InStr(session.Id(), "con[") + 4
len = InStr(pos, session.Id(), "]") - pos
connectionNumber = CLng(Mid(session.Id(), pos, Len))
pos = InStr(session.Id(), "ses[") + 4
len = InStr(pos, session.Id(), "]") - pos
sessionNumber = CLng(Mid(session.Id(), pos, Len))
This possibility would be fantastic. Integration scenarios with SAP GUI Scripting are on this way a child’s play.
Thanks for all your efforts.
I wish the whole UiPath team a successful 2020.
Best regards
Stefan