Handling SAP components on two windows side by side

Hello,
I am trying to achieve a task which requires two SAP windows to be opened side by side and the robot interacts with both of them simultaneously.
When I try to do that I find that the window selector is the same in both the cases and the robot is unable to enter the right text in the right window.
The user login can be from one single user or two different users but the selectors need to be different to interact with them simultaneously.
Has anybody dealt with this problem before and help me out with a possible solution?

I have good experiences of automating 2 SAP windows side by side. What you need to do is use a variable for each of the windows you target. If you use Modern activities, that would mean variables of UiElement type, and with classic activities Window type.

When you login to SAP, output the variable.

Afterwards, every time you want to attach to a window, use the variable for input/output.

Hello @efelantti , thanks for your response. I tried with your approach and it works for 2 different SAP users but failed in the case if I logged in with one single user. The robot was unable to differentiate between the two windows. But I did identify one thing that there is one property called sapSession which keeps on incrementing if you open more than one window.
For ex: The first SAP login window will have sapSession=1 and the second SAP window will have sapSession=2. I managed to grab this property in the selector and it worked with same user and classic activities(attach window). The robot is now able to differentiate and pick the right window.