cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GluedTogether
Regular Visitor

Launch SAP Action failed

Hi All,

 

I can't get the "Launch SAP" or "Attach SAP" Actions to run. On The "Attach" Action i get an "Attach to running SAP" error and on the "Launch SAP" i get an "Action failed" error. 

This is the error that i get on "Launch SAP"

Correlation Id: b613da2f-83d4-4b8e-85bd-d7b7a16fadfb

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).

 

Does anyone know how to fix this? Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

The above GUI of SAP which is there in screenshot looks like 740.
SAP server is different and the GUI client which we use is different. You may use any GUI client by getting that installed from your IT.

PAD supports only 750 GUI and above.
https://help.sap.com/docs/sap_gui_for_windows/e8f03b91f99d45f4ae9d90ddf6e44b70/64155e6b9cb84de79ac28...

Once a >= 750 GUI is installed, enable the scripting option in both client & server side.
https://help.sap.com/docs/intelligent-robotic-process-automation/desktop-studio-developer-guide/enab...
https://help.sap.com/docs/intelligent-robotic-process-automation/desktop-studio-developer-guide/enab...

And that's it! You would be able to automate SAP interface through PAD.

View solution in original post

18 REPLIES 18

Hi @GluedTogether ,

 

Is your SAP version is higher than or equal to 7.50?

Can you please share the screenshot.

 

Regards,

Vishnu Reddy

We have S/4 Hana and i dont know the exact version but we update pretty regurarly. 

GluedTogether_0-1715070944886.png

 

Hi @GluedTogether ,

 

Please check  the version. PAD generally supports versions 7.50 or later.

Please share the as below.

VishnuReddy1997_0-1715071126488.png

 

(Note:- if you got your solution you can mark as solution and gives kudos)


Thanks & Regards

Vishnu Reddy

 

This is what my SAP Team gave me as a Version: 2.00.077.1713529394 I hope this helps. 

GluedTogether_0-1715073130895.png

 

eetuRobo
Memorable Member
Memorable Member

When you tried Attach to running SAP -action did you have SAP open?
Have you tried launching the SAP with Run application -action? 
https://learn.microsoft.com/en-us/power-automate/guidance/rpa-sap-playbook/creating-sap-desktop-flow... 

eetuRobo_0-1715073174494.png


Then if you use Attach SAP when the SAP is open does it work?

Hi @GluedTogether ,

 

This version appears to be significantly older than the minimum supported range (7.50).

Try launching SAP with Run Application action as shown in below image.

 

VishnuReddy1997_0-1715073648964.png

 

Also try enabling GUI scripting in SAP as shown in below image.

 

VishnuReddy1997_1-1715073745040.png

 

(Note:- if you got your solution you can mark as solution and gives kudos)


Thanks & Regards

Vishnu Reddy

@VishnuReddy1997 

@eetuRobo 

We have the 2022 OnPremise Solution i was able to confirm it: 

GluedTogether_0-1715074089106.png

We also have SAP Logon 800 if that helps any.

When i tried the Attach Action i had SAP fully open and i was logged in. GUI Scripting was already enabled. 

The "Run Application" Method starts the SAP Logon App but does nothing afterwards. No Error message either.


@GluedTogether wrote:

The "Run Application" Method starts the SAP Logon App but does nothing afterwards. No Error message either.


Then that sounds like the login credentials are incorrect since it didn't get to login. Make sure that SAPSystemId, Client, user and password are correct.

In the SAP version I use SAPSystemId is three letters and you can find it in the bottom right corner when logged in

eetuRobo_2-1715079344569.png


Also in the logon screen:

eetuRobo_0-1715079232898.png

eetuRobo_1-1715079338841.png


(images are just from google so thats why different environments)

@eetuRobo 

GluedTogether_0-1715079302730.png

Client, password and User are all like i would type them within the SAP Logon (client saved as a number variable, pw and user as a text). The SystemID is just the 3 Letter Code thats shown on the logon startup app under the SID Column right? 

GluedTogether_1-1715079463127.png

 

Yes that should be the SystemID. Hmm I'm not sure then what's the issue.

Some people seem to have had problems with newer PAD versions when trying to use SAP.
See: https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Unhandled-Error-Object-Reference-Not-set-...
https://powerusers.microsoft.com/t5/Power-Automate-Desktop/Erro-System-NullReferenceException/m-p/25... 

So maybe you could try downgrading (or if you don't have the newest version then try updating PAD).
downloads for different PAD versions: https://github.com/jfevia/Power-Automate-Desktop/releases 

So I updated to the newest PAD version aswell as Downloading the 4.81 .NET Framework that one comment in your Link talked about. Still the "Launch SAP", "Attach SAP". and "Run Application" all still dont work. Downgrading is not a solution we entertain as we will rather switch to another RPA Solution if this one is incapable of interracting with SAP. 

Sorry to hear those threads didn't offer solution for your issue.

Can you login to SAP from command line without PAD though? I think you might face similar issues with other automation programs if you cant login to SAP from the command line (like Run Application -action is doing).
Try running this from your command line (with your login credentials ofc) and see if that works.

eetuRobo_0-1715161361616.png


I have done many SAP automations to few different SAP versions. Not Hana though. I suggest making a ticket to Microsoft about this and they might be able to either help you or recognize PAD having a bug with your version of SAP and patching it.

Okay i did manage now to start SAP via Run application. (always used the logon.exe and not the sapshcut) But the attach function still doesnt work. But when i use the "Launch SAP" function it also opens the logon.exe and not the sapshcut.exe as it first opens the logon, then opens the system and just stops (And does NOT type anything like user or pw). Wouldnt the "Launch SAP" Function work better if it also just used the sapshcut.exe?

Good to hear that there is progress


Since you said you have scripting enabled could you just use VBScripting to automate the steps you need to do in SAP?
I would then recommend using VBScripts to automate the SAP workflow. So use the SAPs own Script recorder to record all the steps. 

eetuRobo_1-1715173006569.png

Then in PAD use Run VBScript

eetuRobo_0-1715172953496.png


Then just add variables in the VBScript that you have in your PAD.
That's how I've used automating SAP on PAD usually since the SAP actions in PAD are fairly new.

The option for Script recording is greyed out for me but i have it activated within the options menu..

The above GUI of SAP which is there in screenshot looks like 740.
SAP server is different and the GUI client which we use is different. You may use any GUI client by getting that installed from your IT.

PAD supports only 750 GUI and above.
https://help.sap.com/docs/sap_gui_for_windows/e8f03b91f99d45f4ae9d90ddf6e44b70/64155e6b9cb84de79ac28...

Once a >= 750 GUI is installed, enable the scripting option in both client & server side.
https://help.sap.com/docs/intelligent-robotic-process-automation/desktop-studio-developer-guide/enab...
https://help.sap.com/docs/intelligent-robotic-process-automation/desktop-studio-developer-guide/enab...

And that's it! You would be able to automate SAP interface through PAD.

@pradeepvarma 

Thanks alot it works!!!

Btw. When i open SAP Logon the title sais SAP Logon 800 doesnt that mean that i have the GUI 800 version anyway? So i dont need an update?

Yes it means you have the latest version of SAP GUI - which is 800.

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (844)