Tip: A More Stable Way of Identifying SAP Windows

Tip: A More Stable Way of Identifying SAP Windows

If you identify an SAP window on the screen for your automation the standard attributes are the application name, the class name and the title of the window.

As you can see is the title user related. Would I put an asterisk instead of the username, the automation workflow would run also on the system of my colleague. But what happens if my colleague has opened another system. Maybe then we won’t get the right data at all. @LevKushnir pointed out that we have other possibilities with SAP windows, e.g. we can use the system name (SID) with the attribute sapSysName.

image

This options allows us to create much more stable ways to identify an SAP window. You can find all attributes at the documentation. The corresponding description is also available at the SAP help portal. With this powerful possibilities we can identify the SAP session very precisely. This is very important for attended bots which works on a users desktop.

6 Likes

Great idea, @StefanSchnell!

1 Like

Very nice @StefanSchnell But i have question related to this.

I have developed a script running in production which is working on 12 SAP windows same time and posting different data into each. I am using SAP ID { Z2L (1), Z2L(2) so on…} but its not stable it work few days and then selector start crashing means it mange to open 5 windows and crashed while trying and identifying 6th SAP window. Some time same happen with 3rd or 4th randomly.

I would be great if you could advice on this. Thank you

@daljit_parmar

Hello Daljit,
thanks for your reply.
I do not know the details of your realization, therefore it is difficult to consider this.
In my opinion you can use the sapSysName and the sapSession to identify an SAP Session definitely. Or you use the sapSysSessionId, which is unique.
Best regards
Stefan

2 Likes

I have some query regarding SAP sessions :
I open 2 sessions to speed up my process,but I am not allowed to generate them all at one go.For first session it will execute but for second session it will not validate selector(sapSession = ‘2’)
Note : I am using one generic user account to run the UiPath automation in same machine

1 Like

HI @KinjalRD

I am not clear what you are exact asking for. Let me share my example.

I am login 2 times

I am running 2 sessions

Best regards, Lev

2 Likes