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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,967)