cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IkeIke
New Member

SAP GUI Open

I am try to open SAP GUI by using UI FLOWs but can not open. does anyone know how to open? 

2 REPLIES 2
kojisaiki
Community Support
Community Support

As known issue, some of unsupported application types are there. Please check it.

https://docs.microsoft.com/en-us/power-automate/ui-flows/create-desktop#known-issues-and-solutions

 

And more, WinAutomation (https://www.winautomation.com/) is available with Power Automate license newly. Please try it also!

Nooberd
New Member

Similar question at https://powerusers.microsoft.com/t5/Building-Flows/SAP-to-Excel-upload-tasks/td-p/422147 for controlling SAP using the SAP GUI Scripting API.

 

You can do this using two different methods.  Both require that you use the RPA/RDA software WinAutomation, which is now owned my Microsoft, to create a process.  The final flow will call your WA process through a gateway to the machine it's running on (you probably need special permissions to create that).

 

Method 1 - Create a process all within WA.  I don't recommend this (for any RPA software) because you lose some control.  To get around not being able to record opening SAP, you need to record keystrokes and run commands (wnd+R, {ENTER}, etc... don't use your mouse at all until you have a session open), then the macro recorder will grab window handles.  Always maximize everything.  Once your WA process is finished, you'll call it in your UI Flow and use your gateway credentials.

 

Method 2 (preferred) - Handle all of your SAP automation using the COM API.  Search for "SAP GUI Scripting API" for a reference.  You can write everything in a VBScript or create a console application in Visual Studio (or use any method that can interface with COM -- Autohotkey, Python, almost anything).  Once you've got your SAP automation script ready, call THAT using WinAutomation.

 

I hope this is helpful.  This is theory from me, I haven't created a working flow yet because I don't have permission to create the necessary gateway connection to the virtual machine.  Let us know if you get it to work!

 

Bonus tip -- you can automate the SAP GUI from many places, including Office.  Years ago, I created an Access tool for a customer inventory solution and wrote procedures in VBA to open and transact in SAP using this method.  It's amazing.  If you use Autohotkey (or something similar), you can have it "listen" for a key combination, then run a VBScript to attach to and automate an open SAP screen (or create a fresh session).  For example, we created several scripts to run routine transactions for our customer service dept.  If they needed to transfer an item from one "customer" to another, they'd just price WND + SHIFT + T in their SAP screen (after having entered the important data), and the script would process the remainder of the steps for them, log info into a txt file, etc.  All the user needed to do was take a sip of their coffee.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,497)