web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SAP Login with power a...
Power Automate
Unanswered

SAP Login with power automate desktop (Login, Log off)

(0) ShareShare
ReportReport
Posted on by 18

Hi All,

 

As you all know now the power automate desktop has released set of actions for SAP, below is how you can use it to login and work with SAP (SAP 770 or any other SAP windows Application)

 

We have an action/Activity available as Launch SAP

Put a server description show in SAP connection properties, add user name, password, Language and client as shown below.

In advance you can select whether we need to continue this Logon or Terminate other session etc.

 

Dwarka_1-1700569088057.png

 

 

You will be logged into SAP home page.

 

You can call the transaction with START TRANSACTION action as below

Dwarka_2-1700569209066.png

 

 

 

Once you are done with you work you can close as below steps.

 

You can select the menu items by their names when you Hover the mouse over them for eg: Exit, Back, Save, Print etc

Dwarka_4-1700569633748.png

 

 

Close SAP connections/Log off

 

Dwarka_3-1700569281772.png

 

You can do these with VB scripting as well, please give it a try and reach out to me here in case of any concerns.  (dwarkabajaj10@gmail.com)

I have the same question (0)
  • ttxslxm Profile Picture
    on at

    Hello,I got one problem after execute Start SAP transaction . it give me error warning ' Argument 'SapInstance' must be SAPInstanceHandle' , do you know how to fix it ? 

  • eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at

    Does your SAP open without problem when you use Launch SAP -action and the 'SAP-Instance' gets stored into %SapInstance% -variable? Can
    You need to have SAP Instance so make sure you have used Launch SAP -action and put that %SapInstance% into SAP Instance field in the Start SAP transaction -action.

    eetuRobo_0-1708324165755.png

     

  • ttxslxm Profile Picture
    on at

    after execute Launch SAP , I got the error ' Action Failed'.  but truth is it can open the SAP homepage.  so technically it is not failed, right? 

  • eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at

    Then that action failed and there for did not put anything in SapInstance -variable. So then the other actions can't be used since there is no SapInstance(even if SAP seems to have opened).

    eetuRobo_0-1708332371799.png

    It shouldn't be empty like in the picture above if your SAP launches correctly from the Launch SAP -action.

    Same way like with Excel or Browser actions. There needs to be ExcelInstance variable with it having the instance saved in the instance variable. Like so:

    eetuRobo_1-1708332484017.png

     

    So there is something wrong with your Launch SAP -action. You are certain that all the parameters are correct like Server description and such?

  • ttxslxm Profile Picture
    on at

    yes, I checked every fields , everything looks fine. I don' know what's the problem behind this. 

  • eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at

    Can you show the error? Does it give more info than just ' Action Failed'?

  • ttxslxm Profile Picture
    on at

    Screenshot 2024-02-20 142155.png

    Only action failed,  no other information.   

  • eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at

    Try using Run application -action to start SAP.

     

    eetuRobo_2-1708418387878.png


    https://learn.microsoft.com/en-us/power-automate/guidance/rpa-sap-playbook/creating-sap-desktop-flow-vbscript

    Then try using Attach -action to get the SAP instance variable so you can use SAP -actions.

    eetuRobo_0-1708418276743.png


    Also you don't need to use the SAP automation -actions to automate SAP you can just have VBscript that does the actions. Scripting needs to be enabled though.

  • ttxslxm Profile Picture
    on at

    I have no problem using run application to start SAP , but failed at Attach- action.  btw, VB scripting is not a option because company blocked it . 

  • eetuRobo Profile Picture
    4,220 Super User 2025 Season 2 on at

    Can you ask your IT or people who maintain your SAP for help? I think there might be something about the parameters on the backend that makes it difficult for you to login to SAP with the Launch SAP action. Or ask Microsoft support for help.

     

    I had similar issues with one client but fortunately I can use VB scripting with them so run application worked for me.

    I noticed that the SAP test environment connection I was trying to get to wasn't listed in the logins System Entry Properties under System ID (Connection Type being Goupr/Server Selection). Even though it is listed in the SAP Logon screen. That might be the issue for me atleast.

    eetuRobo_0-1708497784364.png

     

    I wasn't able to open SAP with Launch SAP on the 05 ECQ connection. 

    eetuRobo_1-1708497784365.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard