Login Automation as RPA.SAP in Python

I’m using the rpaframework SAP library
I can open the SAP gui normally, but when selecting the server I want to login to, I am not able to open the connection, please help me. How do I open the login screen and how to identify the fields to enter the username and password. Tks

Hi @iLusSS

maybe this will help you:

1 Like

I read this topic, but I’m doing it with pure python code.
I am using RPA.Desktop.Windows to open SAP Gui, the next step would be to select the desired Server and in the next step to enter the username and password.
The problem step would be to choose which SAP Gui connection to choose, I didn’t want to use cliks with coordinates, I wanted to Choose in a more automated way!
If you can give me an idea of how I can do this using RPAFramework.
Thank you very much!

VIa open_connection from RPA.SAP you can connect by giving the connection name as a parameter.

In the login screen the SapGuiScripting is already available.
So, you can use input_text and input_password here.

def open_sap_gui():
win.open_from_search(“saplogon.exe”, “SAPGui”)

I was reading the RPA.SAP library and found this function open_connection (""). It tells you to pass on the connection name, just like you instructed me, but I’ve already passed on the information I know and the screen is static does not open the login screen. I used as parameter Description, Application server, Instance number and system ID. none opens the next screen to enter the username and password.

First, you need to connect to the session by connect_to_session. After that you can open the connection.

Compare it a bit with the video. Even if it is not in Python you can see the single steps to take.


It worked, my friend. Thank you very much for your help.

def open_sap_gui():
win.open_from_search(“saplogon.exe”, “”)