Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
peterengel
Advisor
Advisor
For general information regarding SAP Intelligent RPA please read the blog "SAP Intelligent RPA – enablement and getting started" by Lena Grothaus.One of the first steps in SAP software automation is the logon to a SAP system. In this blog post I describe how to build a logon scenario using SAP GUI in SAP Intelligent RPA.

Step-by step instruction:


Create a new project in Desktop Studio


To create a new project goto File -> New Project or use Ctrl+N. A pop-up appears where you can maintain the new project. Fill the fields Project Name, Title and Client Name and klick on "Save" to save the project:


Activate SAP GUI connector


After the project is save goto File -> Edit Project. Klick in the pop-up on the index tab "Libraries" and scroll down. Enable SAP GUI Scripting and save the project.



Please check also if SAP GUI scripting is activated on client and server side. For the activation of SAP GUI Scripting please check out this Link.

Screen Capture


Now you can start with the capturing of the screens. Therefor you open the SAP Logon application and launch the system where you want to login. The assumption is, that you have to use user and password to access the system.



 

Capturing and Declaration of the SAP Logon


To capture the "SAP Logon" you have to add an application. Therefor click on "+ Add Application", select UIAutomation as technology, click on "SAP Logon 7xx" and "Save And Capture Page". If no pages are visible please click on the refresh icon right to Applications.



On the next pop-up you can now capture the screen of the SAP Logon application.



The technology should be UIAutomation again. If no pages are visible please click on the refresh icon and choose "Window - SAP Logon" and klick "Save and Capture".

After capturing an application, you need to set the criteria required for the software to recognise it.

The "Captured Data" tool window of the Explorer perspective panel shows the properties of the application that can be used as criteria.


These properties are collected when the application is first captured. What properties are captured depends on the application technology and corresponding connector: only properties used by the connector are captured correctly.


The Criteria tool window lets you edit the criteria of the application that will be used by the connector to recognise an application at runtime


In the next step you declare the SAP Logon page. As you can see in the upper left corner "pWindowsSAPLogon76" is marked in red. This shows that you have not assigned criteria which can used by the bot to recognise the page.


To declare the page you can us the captured data. In this case you make a double-klick on "Value = SAP Logon 760" and you can see the value in the criteria area. The status of the page changes to green.



Now you have to declare which system you want to use. To do this you have to click on the system name and a frame appears around the field with the system name. Again you have to select the recognition criteria in this case for the field. Please use "ControlType = Text" and "Value = SID". with this criteria the bot can recognise the correct system even if more systems will added to the Logon Pad.


With this step you have finished the capturing and the declaration of the SAP Logon.

Capturing and Declaration of the SAP GUI


Now we you repeat the capturing and and declaration procedure for the SAP GUI page where you can enter user and password. The major change here is that you have to select "SAPGUI" in the Technology drop down list.



Click on "Save and Capture" and you can start with the declaration of the fields. In this example you will declare Client, User and Password.

First you have to declare the page "pSAP" as shown in the picture below.


Second you declare the fields on the page. Please use the criteria as as shown in the following pictures.

Client:



User:


 

Password:



Now you have finished capturing and declaration.

Building the Workflow



A workflow refers to an automation sequence. It can describe the control of a single application or the coordination of several apps.





When you design a workflow, you describe the implementation of the automation sequence in functional terms:





  • The sequence of the screens and the actions to perform on each screen




  • The data to collect and return




  • The other actions to implement (manage files, data...)




For this purpose, the Desktop Workflow Designer provides:





  • The applications, pages and items declared in the Explorer perspective




  • A context structure for storing data




  • A set of functional activities (Get, Set, Click, and so on)




  • A generic comment activity for describing functional requirements




Now you can start to build the workflow. To do this click on the workflow icon to switch to the Desktop Workflow Designer and right mouse click on GLOBAL to create a new workflow.




The workflow you created is empty except the Start activity which is mandatory for all workflows. On the right side you see two important areas of the workflow perspective, the Properties and the Activities. To launch the SAP Logon application you search in the activities list for the application start activity.



You can use drag and drop to move the activity into the workflow. Then you draw a connection from the "Start" icon to the application "Start". In the Properties" area you can choose the application and you can edit the display name and the description.



Next step in the workflow is to use the captured pages. Therefor you click in the "Activities" area on the right side on "Pages". You can see now the two pages you have captured at the beginning. You can move the pages to the workflow with drag and drop and connect the pages as described above.



Now you have to define what you want to do on the different pages. Therefor double click on the SAP Logon page. On this page you want to mark the system in a first step and in a second step you have to click on the "Log on" button. With a right mouse click on the system you will open a context menu, please select "Click on the item" and select the right item in Properties area under Activity. Do it again with the "Log on" button.


Now the bot is enabled to open the Log in page of the system SX3.

To finalise the workflow double click on the Login page and maintain the sequences of the necessary steps which the bot should execute. You need five activities on this page:

  1. Wait until...

  2. Set value in the Client field

  3. Set value in the User filed

  4. Set value in the Password field

  5. Keystroke to execute "Enter"


For the first four steps you can click on the related field and use the context menu. In the Properties area maintain "Item" and "Source Data" with the values for the fields. The picture below shows the "Client" field as an example. With the first step "Wait until..." you ensure that the field is available when the bot starts to set the value to the fields on the page.



For the last step search in the activities for "Keystroke" and use the activity under "Page". You can drag and drop the activity to the steps in the Activities pane left to the captured page.


Last step here is to maintain the properties. For the Keystroke you have to select the page and enter a Key Sequence "e.SAPScripting.key._Enter_".


The bot is now ready to test.

Test the Scenario


After saving your project click on the "Build" icon to finally generate the code and build the executable scenario. After the build process is finished you can start the Debugger (F5).


The debugger will execute some steps and stops with the last message below. Now you have to use the Desktop Agent to start the scenario.



To open the Desktop Agent click on the Desktop Agent icon in the system tray and select "Test SAP_Logon". The scenario will be executed and the bot log in to the system.

Conclusion


Now you are able to use SAP Intelligent RPA to start your automation journey. You learned to capture pages with different techniques (UIAutomation and SAPGUI connector), declare fields on the pages, use the Workflow perspective to design the process, use keystrokes, to start the debugger and execute the process with the Desktop Agent.

Blog Post overview













1.

SAP Intelligent RPA - How to Capture SAP Logon and SAP GUI



2.



SAP Intelligent RPA – Advanced Recognition Capability “MustExist Method”




123 Comments
peterengel
Advisor
Advisor
0 Kudos
Hi Ramesh,

I think you missed the point to activate the SAPGUI library. Goto File -> Edit project -> Libraries

Br,

Peter
peterengel
Advisor
Advisor
0 Kudos
Hi Venkat,

I don't get your problem. Select Text and Type in the captured data area. If it is not working please explain a little  bit more what happened.

Br,

Peter
0 Kudos
Thanks Peter for the quick response.

 

I tried both selecting text and type and the page still shows in red then I tried with text again to partially. But this did not even works out.

 

Thanks,

Venkat

 

 
peterengel
Advisor
Advisor
0 Kudos
Hi Venkat,

I think the Standard Order page has the same name like the page before. Therefor check out this blog post.

Br,

Peter
hitesh_arora_erp
Participant
0 Kudos
Thanks peter.engel for the hint, I tried OCR connector  but it is not working,the documentation is little confusing as I do not have tab structure. My goal is to run a transaction in a  session logged in citrix env.

1.My page is not getting recognized while execution.

2.In workflow we start with main page or subpage?

Regards,

Hitesh
ajit_jain151
Explorer
0 Kudos

Hello Peter,

I want my bot to pickup an item from SAP Easy Access – Menu but I am unable to identify the correct method to read/select item from SAP Menu. Could you please help me to identify correct method for this?

Regards,

Ajit J.

 

 

 

0 Kudos
Hi Peter,

 

We have applications which were developed on Fiori and the same when I try to build in using IRPA, getting "Java is not available, neither the bundled nor a global one."

 

Can you please help me out of this issue.

 

Thanks,

Venkat
peterengel
Advisor
Advisor
Hi Venkat,

please check the software prerequisites on your machine and follow the steps for UI5 capturing.

Br,

Peter
martin_eberle
Explorer
0 Kudos
we are facing the same problem. Is there any known solution?

Martin
peterengel
Advisor
Advisor

Hi Ajit,

you do not need to capture the tree. If you capture the table tree control you should use two activities: “Get Node Item by Text” and “DoubleClick node”. You have to use the ID from the first acitivity in the second one,

Br,

Peter

 

 

 

peterengel
Advisor
Advisor
0 Kudos
Hi Martin,

you do not need to capture the tree. If you capture the table tree control you should use two activities: “Get Node Item by Text” and “DoubleClick node”. You have to use the ID from the first acitivity in the second one,

Br,

Peter

peterengel
Advisor
Advisor
Hi Erhan,

you do not need to capture the tree. If you capture the table tree control you should use two activities: “Get Node Item by Text” and “DoubleClick node”. You have to use the ID from the first acitivity in the second one,

Br,

Peter

peterengel
Advisor
Advisor
0 Kudos
Hi Sabarjit,

try the following: (1) Set focus on the line (2) use click on the buttons at the bottom to navigate (3) create additional screen capture without replacing the page for the following new pages. (4) set focus on the activity you want to execute (5) use the execute button at the bottom.

Br,

Peter
ajit_jain151
Explorer
0 Kudos
Hello Peter,

Thanks a lot for your response. As you suggested we do not need to capture the tree, so what will be the best option to capture easy access - user menu?

Also, when I am searching option "Get Node Item by Text” and “DoubleClick node”, these are not available in properties tab. I believe these are new enhancements in version 20.02. If yes, please let me know how to update my current Desktop Studio.

 

Thanks,

Ajit
peterengel
Advisor
Advisor
Hi Ajit,

please download the latest version here: https://launchpad.support.sap.com/#/softwarecenter/template/products/%20_APP=00200682500000001943&_E...

It is patch level 8.

Br,

Peter
0 Kudos
Hi Peter,

 

i tried debbugers my workflow but show me a message,



 

any help ?

 

Regards

 
peterengel
Advisor
Advisor
0 Kudos
Hi Edgar,

my Spanish is not the best, but I would assume you didn't have the remote tools installed.

Br,

Peter
0 Kudos
Hi,

I'm sorry is this




0 Kudos
Hi Peter,

Thanks for the sharing.

I’m stuck with captured data, i can not add any item to criteria (there is no option for that – dblclck does not work either), any idea?



 

Thanks,

Akin
peterengel
Advisor
Advisor
0 Kudos
Hi Akin,

please share a screenshot of the complete screen.

Br,

Peter
0 Kudos
Hi Peter,

Here it is;

Thanks,

Akin
peterengel
Advisor
Advisor
0 Kudos
Hi,

which version of the studio do you use?

Br,

Peter
0 Kudos
Hi Peter,

Thanks for sharing, it was working successfully for me.

I have one question regarding my process integrated with external API: After i import the project to cloud platform and deploy it, I would like to add the API trigger to receive input data.

According to the Help Portal 'Select the scenario or the process to execute and that will create a job entry. Depending on the scenario or process definition a payload template is automatically generated'.

However, in my trigger API window, the example and input schema are empty, so there is no payload template.  Why is this happened? do I have to define specific activity type in my RPA workflow in the Studio?  thanks for your help!

 
peterengel
Advisor
Advisor
0 Kudos
Hi,

please check this blog post

Br,

Peter
0 Kudos
Hi Peter,

 

It's : 1.0.5.57

 

Thanks,

Akin
peterengel
Advisor
Advisor
0 Kudos
Hi Akin,

please download the latest version here.

Br,

Peter
0 Kudos
Hi Peter,

No luck with your link unfortunatelly,



I've downloaded from https://tools.hana.ondemand.com/#cloud , it still has version 1.0.5.57, is this a previous version? is there a higher version?

Thanks,

Akin
0 Kudos
Any one can reply about this issue even I am facing same issue
peterengel
Advisor
Advisor
0 Kudos
Hi Pradeep

please post the issue as a question in the community

Br,

Peter
0 Kudos

Hi Peters,

i facing problem with pop-Up in ERP when i tried click, it don’t respond.

i tried insert keyStore, wait until, pPage.exist()…, but not work .

I’m reviewing the SAP documentation, but this  setBusyWaitTime method is missing, is it another version or is it deprecated?

 

 

 

any other Suggest

 

Regards,

erhan_boztas72
Explorer
0 Kudos
Hello Peter,

now i have another problem. I have automated the creation of a purchase requisition in the system, in transaction ME51N. In the case of automatic execution, the bot reads from an Excel file. Until then, everything works as defined in the workflow. Now the bot opens SAP Logon 750 and selects the connection. Now he would have to log in to the window, but then I get the following error message:



Here is my Workflow-Window:





 

Script-Window:



 

I hope you can help me.

 

Br.

Erhan
itsrahulmehta
Explorer
0 Kudos
Hi Peter

Thanks a ton for the amazing blog!! I was able to create and build the project successfully, but when I click on debug run, it first asks me to login to start the desktop agent. I enter my credentials and the login is successful. Post that, it doesn't execute anything successfully. In the debugger window, i don't see any entires under the events tab. Also, when I click on desktop agent, I get a blank window. Could you please help out here ? If its ok, we can quickly get into a skype session
peterengel
Advisor
Advisor
0 Kudos
Hi Rahul,

please open this question in the community here.

Before you open the threat please check this answer

Br,

Peter

 

 
chandru_sdn80
Participant
0 Kudos

Hi  peter.engel ,

I am trying to automate one Std SAP Transaction. While doing i got stuck at Menu bar as shown below. Would you pls take a look at this & help me?

I have to basically click Goto->Partner at Menu bar.

Pls look at screen shot below from Desktop studio.

My script is running until before this step. Post that system is unable to find menu function.Can you help?

Thanks

Chandru.R

peterengel
Advisor
Advisor
0 Kudos
Hi,

the screen shot shows that you have not declared the page and the items properly. Please provide screenshots of all pages and their selected criteria. Please also move this threat to the Q&A area here 

So more community members could answer and also learn from the threat.

Br,

Peter
chandru_sdn80
Participant
0 Kudos
Hi  peter.engel ,

Issue i had on 21 April 2020 is now resolved.

But i have oberved one basic issue . RAP Bot is recognizing SAP Logon Connection or system only when it is highlighted during run as shown pic. Incase  if i work on other system  & come back tried to execute the project Bot is not running as expected.

Please look at all my attachments. Is my understanding different?



 

 


 

Thanks
peterengel
Advisor
Advisor
0 Kudos
Hi,

it looks that all your settings are correct. Please make sure that after the bot is started you do not use the mouse and there is no overlap between the LogOn pad and any other application, so that your application is in front of all applications.

Br,

Peter
0 Kudos
Hi Peter,

Could you help me with the use of the activity "Get Node Key By Path" as I do not have the nodekey of the parent elements and I have to access an element in the subtree.

Regards,

Vedansh
0 Kudos
Hi Peter

Thank you for the wonderful tutorial. I am trying to automate an SAP table tree control. I followed the steps you have mentioned in few comments. I passed the node id to the function clickDoubleNode. The node on which I want the double click to happen is getting selected, but the double click event is not working. Am i missing something here? Would really appreciate your help.

Thanks and regards

Swati

 
0 Kudos

Hi Peter,

Thank you for your informative tutorial. i could able to replicate the same and successful. however, i have once scenario where if there is already a user logged on then a pop up comes, where we need to select either of 3 radio buttons viz. close the current session, logon with closing other session, and logon without closing other session.

My scenario is to by pass the popup page recording from the Workflow if multiple users are not logged at a particular time Else i need to take the popup screen in order to logon into the SAP system.

Would really appreciate your help.

BR

Srini

peterengel
Advisor
Advisor
0 Kudos
Hi,

please try it out in the tester section of the debugger. If it is not working open a questions in our Q&A section and provide screenshots.

Br,

Peter
0 Kudos

Hi Peter, Any help in this scenario?

amysh95
Participant
0 Kudos
Hi peter.engel , Could you please let me know how can I handle Multiple logon in IRPA.

When there is already a session is running then a licence screen poped out. How to handle that.


 

Thanks
peterengel
Advisor
Advisor
0 Kudos

Hi,

there is an activity in the Flow area called “Switches output”. With this activity you can react on different screens. the activity has to be implemented after the log-in screen. Default exit is no multiple log-in screen and an alternative exit is the additional screen.

You will find more details also in our openSAP course and in the documentation.

Br,

Peter

xbealan
Explorer
Hi everyone,

I need to set some value to cell for example H column in the table. But i can't reach the cell and got exception. Scripting is enabled. How can I solve this problem?

 

Thank you in advance.

 

Regards,

Bengu



 

 
xbealan
Explorer
0 Kudos
Hi Akın,

 

You can download the latest version here.

 

Bengü
xbealan
Explorer
0 Kudos
Hello kratika-samishti ,

This is SAP GUI. Why did u recommend excel set one value activity? I wanted to learn please(If you think it is excel, it is ok).

Thank you for reply.

 

Regards,

Bengu
former_member666537
Participant
Hello xbealan

Sorry, I got it wrong. This is SAPGUI screen. It look like excel so i thought it was excel. One thing i want to say that if you are posting any query with screenshot then please mention some detail about it . Like for this screenshot, you should also mention about the screen that you have captured.

 

Thanks
xbealan
Explorer
0 Kudos
Hello,

 

You're right but this post was about SAPGUI that's way I didn't add any other details. But thank you again, you always help people on your blog 🙂

 
0 Kudos
Is your issue solved? I am still getting timeout error.