Issue SAP Logon: Returned login window is null

Hello there, i faced the SAP Logon issue by building a new bot. I know the issue occures because our login by SAP is done automatically via PKI card thats why the activity “SAP Logon” doesnt recieve a return for the login window. I tried to catch this issue with a try catch block but i doesnt figured out which kind of exception it is.

Can everyone tell me which kind of Exception it is or another approach how to implement this case.

Thank you,

Hello @Schlosser_Tobias!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

  5. Meet us and our users on our Community Slack and ask your question there.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly

hi @Schlosser_Tobias

I do not understand your use case exactly.

SAP Logon Activity is responsible for opening an SAP connection. That’s it. At this moment, we do not care if it is User Login or SSO (PKI) Login

What it exact the problem you have?

Best regards, Lev

We are getting the same error “Returned login window is null”.

Unattended Robot, SAP Logon 740.

Sometimes it works sometimes it doesn’t.

Tried to use Selector with:
"wnd app=‘saplogon.exe’ cls=‘SAP_FRONTEND_SESSION’ title=‘SAP’ "
"wnd app=‘saplogon.exe’ cls=‘SAP_FRONTEND_SESSION’ "

with Element:
SAP Logon activitie’s output “SAPScreen” as SAP Login’s element

Hi @rfranko
I notice in your screenshot that NumberOfRetries is set to 1. Any reason for this?
Can you please leave the default value and let us know if it is still happening?

Hi @LevKushnir

yes the SAP Logon activity is resposible for opening an SAP connection. My proble is that te activity get no return value which tells it that the connection is open. What the bot does in this use case is it tries to open the connection five times cause the default value for “NumberOfRetries” is five. It stop the process and throws me after ther five tries the “Log event Returned login window is null” . But there is still a open connection.

Thank you and best regards

HI @Schlosser_Tobias

I am very sorry, I still do not understand your issue :frowning:

Forget for now, about current behaviour and tell us, what you want to achieve?

Thanks, Lev

Hi @LevKushnir

i only want to open the SAP GUI to execute some transactions in SAP. The first step for this is to connect to the corresponding SAP Server. I realized this steps in our development SAP system without any errors. Now i tried it on the test System and the error occurs. The point is that the activity works, the SAP GUI want open and still i get this error message and the bot interrupts the running flow. I think the problem is corelated to the SAP GUI skripting. I figure out this issue with our IT department and want report to you if it doesnt work.

Thank you for your inputs

Hi Tobias,

Have you enabled SAP scripting everywhere? When it returned null for me that was the issue (there are 3 places where you need to enable it: 1. User level setting 2. User access right level 3. Server level).

Open a UiExplorer and check if the selectors cointain <sap id-s or wnd-s. If they are wnd-s, then I think the issue is going to be with scripting access.

Kind Regards,


Hello @Balint.Kulcsar,

i have checked it as you said. The selector contains <sap wnd cls…
Then it should be a scripting access problem.

Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.