Background
Recently I start looking function of Power Automate Desktop. And build a small process to auto login SAP GUI through a local spreadsheet for practice.
As you know there are different ways to do auto login SAP GUI, like write program or use a password management tool, if your company just have license of Microsoft products include Power Automate Desktop, it is a good try to use PAD + Excel to make the auto login happened. you don't need write code, but just do some configuration in PAD.
Note: it's not safe to save all password in one single file, only suggest to try this way for personal login practice.
Prerequisite
Create a spreadsheet which maintained your major SAP systems login information. please note the column name should be align with the names in the steps of Power Auto Desktop
Process
- Run the flow of SAP auto login ( will explain how to create it later)
- In the popup window, choose the system name you want to login
- You can login to the system now
Power Automate Desktop Flow
Create 3 Subflows: Read_EXCEL, Display_List, Login_SAP
Subflow: Read_EXCEL
- Launch the spreadsheet include all SAP login information, assign the file name here
- Get spreadsheet data. in this case, need get the boundary of spreadsheet data first and then read the data within the boundary into datatable
- Display the system list dialog by calling Subflow : Display_List
- Retrieve data table column into a list
- Display the list to select
- set variable SAP_CONFI for selected row
- Close Spreadsheet. Don't forget to close the Spreadsheet after we got the needed information
Subflow: Login_SAP
After previous Subflow, you will save your selected login system information in the datarow vairable :
SAP_CONFIG
Now we will login to SAP by using this variable.
Make a condition to check if SAP_CONFIG value is existing, if existing then Run application
SAP GUI can be run by calling sapshcut.exe in command line with parameter
Application Path: C:\Program Files (x86)\SAP\FrontEnd\SAPgui\sapshcut.exe (Path where the SAP
GUI is installed)
Command line argument: (the column name need to be matched with Excel file column name)
start -sysname=%SAP_CONFIG['Name']% -client=%SAP_CONFIG['Client']% -user=%SAP_CONFIG['User']% -password=%SAP_CONFIG['Password']% -maxgui
In my company we use message server , so parameter sysname is used in the argument, if you application server , consider use parameter -system instead. See all parameters in reference.
Main Flow:
Summary
This document show you a possibility of auto login SAP GUI without remember password in different system. This solution is not perfect, the login process is a little bit slow and a password spreadsheet is not safe, but I think it is a good start and might help on some test automation scenarios.
Reference:
https://docs.microsoft.com/en-us/power-automate/guidance/rpa-sap-playbook/creating-sap-desktop-flow-...
All Parameters of program sapshcut.exe