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

Community site session details

Session Id : RPQkdRHnl1Jjl/OiRK0PHB
Power Automate - Power Automate Desktop
Unanswered

Launch SAP Action Fail

Like (0) ShareShare
ReportReport
Posted on 8 Apr 2024 11:26:54 by 7,128 Super User 2025 Season 2

Hi Team,

 

I am trying to automate the activity for SAP ECC and SAP HANA. using PAD. I am using Launch SAP action. I tried both the Connection mode: Server description and Server connection string with Manual Login and I get below error:

Server description Error:

 

Object reference not set to an instance of an object.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Action failed. ---> System.NullReferenceException: Object reference not set to an instance of an object.
 at Microsoft.Flow.RPA.Desktop.Modules.SAP.Actions.SapLogin.Execute(ActionContext context)
 --- End of inner exception stack trace ---
 at Microsoft.Flow.RPA.Desktop.Modules.SAP.Actions.SapLogin.Execute(ActionContext context)
 at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

Server connection string Error:

 

The 'Sapgui Component' could not be instantiated.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Action failed. ---> System.Runtime.InteropServices.COMException: The 'Sapgui Component' could not be instantiated.
 at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
 at Interop.SAPFEWSELib._Dsapfewse.OpenConnectionByConnectionString(String ConnectString, Object Sync, Object Raise)
 at Microsoft.Flow.RPA.Desktop.Modules.SAP.Actions.SapLogin.CreateConnectionToSapServer(ConnectionMode connectionMode)
 at Microsoft.Flow.RPA.Desktop.Modules.SAP.Actions.SapLogin.Execute(ActionContext context)
 --- End of inner exception stack trace ---
 at Microsoft.Flow.RPA.Desktop.Modules.SAP.Actions.SapLogin.Execute(ActionContext context)
 at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

 

If anybody had similar issue then please do help me here.

 

Thanks,

ANB

  • GluedTogether Profile Picture
    35 on 10 May 2024 at 07:57:13
    Re: Launch SAP Action Fail

    Hello @ANB ,

     

    I had the exact same problem this is what it solved for me:

    1. SAP GUI needs to be atleast version 750,

    2. Then enable the following things:

    Enabling Scripting on the Server Side | SAP Help Portal

    Enabling Scripting on the Client Side | SAP Help Portal

    Afterwards "Launch SAP" worked perfectly for me.

  • eetuRobo Profile Picture
    3,681 Super User 2025 Season 2 on 09 Apr 2024 at 05:39:47
    Re: Launch SAP Action Fail

    Out of interest is it able to attach to SAP if its open? 

    I googled about that and some people seemed to have somewhat similar error (using other tools than PAD though) and it seemed to get fixed by reinstalling SAP. 

     

    Also had a discussion about not being able to use the Launch SAP action. Not really conclusive any answer but if it helps:
    https://powerusers.microsoft.com/t5/Power-Automate-Desktop/SAP-Login-with-power-automate-desktop-Login-Log-off/m-p/2615413#M37051

  • ANB Profile Picture
    7,128 Super User 2025 Season 2 on 08 Apr 2024 at 13:43:48
    Re: Launch SAP Action Fail

    @eetuRobo Thanks for the workaround, however I wanted to specifically use the Launch SAP action.

     

    Thanks,

    ANB 

  • eetuRobo Profile Picture
    3,681 Super User 2025 Season 2 on 08 Apr 2024 at 12:16:01
    Re: Launch SAP Action Fail

    Can you open SAP with Run Application -action?

     

    eetuRobo_2-1712578533282.png
    Guide how to do that: https://learn.microsoft.com/en-us/power-automate/guidance/rpa-sap-playbook/creating-sap-desktop-flow-vbscript

    If so then you could try using Attach -action

    eetuRobo_0-1712578391878.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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete