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: 
abhishek_malik
Explorer
 

Background


In our previous blog post Mass Creation of Users in SAP GUI, my colleague nikhil.prabhu  had demonstrated how we leveraged the power and features of SAP Intelligent RPA to automate the task of creating many users on SAP systems. So, it’s only natural that we worked on another project to complement the previous one; Automating the mass deletion of users. Using the previous project as a start/reference point, we set out to modify our current workflow to read a list of users and systems from an Excel spreadsheet, and delete them from those systems.

Settings to be done before starting this project



  • Go to Edit project and Enable Excel Integration in Libraries. If you want to use inbuilt Excel activities then it should be enabled.                                                                                                                                                                                               

  • Scripting should be enabled in SAP GUI Options.                                                                                                                                                                                                                             

  • Run transaction RZ11. Specify the parameter name sapgui/user_scripting and press Enter on the keyboard. In display Profile Parameter Details Current Value should be TRUE.                                                                     

  • Apart from this, Dialog (modal) display options also need to be enabled. Click Help>Settings>F4 Help and Select Dialog(modal).


Creation of Project and Addition of Application


Click on File and New Project for creating a new project. Enter details and click on Save.

Click on Add Application to add application and select UI Automation in Technology.

Select SAP Logon 760 in Applications and click on Scan and Capture.                                       

Capturing Pages


Right click on Application name and select Add New Page.

Click Ctrl button on the page which you want to capture, and it will appear in red rectangle.



Click on Scan and Capture on the page shown below.

In this way we captured all pages needed for the project.                                                           

Creation of Excel File




System names and the users that must deleted should be entered in the excel file.

The user must provide the start and end row numbers (i.e. from which row the deletion should start and at which row it should end) in the excel file. This is a new feature we have added in both our projects.

Workflow of our project



Explanation


1.



Excel and SAP logon will be started.

Start Row, End Row and System name will be taken from the Excel file.



2.                                                                                                                                                                     

  • System will be dynamically selected.

  • User will be logged in.

  • Transaction code will be entered.


3.                                                                                                                                                                   

  • User to be deleted will be taken from Excel.

  • User name will be entered, and View user icon will be clicked.

  • If user does not exist, “User does not exist” displays at the bottom of the page. When this happens, “Skip” branch of the switch block will be executed. If User is displayed then “Default“ branch of the switch block will be executed.




  • Row number will be incremented in Excel.




  • Exit Loop condition will be checked.


If either all users are deleted or the starting row number is equal to the last row, then control will be passed out of the loop.



4.



  • User will be deleted.


5.



Skip Branch: -

  • Row number will be incremented.

  • Exit loop condition will be checked and control will be passed to “Loops to the Start Block”


6.



  • If Exit loop condition is false, then control will pass to “Start Loop”. If it is true, then SAP Logon and Excel will be closed.



Deploying the bot on SAP Intelligent Robotic Process Automation Factory



  • Details on exporting packages and deployment can be found in the following link: OpenSAP/iRPA/Course2/Week2/Unit5

  • Once you've logged into the iRPA Cloud Factory, you will arrive at the Dashboard.


 

  • Before proceeding with importing and deploying the bot, hierarchies should be defined. Click on the Management > Hierarchies tab to create them.



  • Next, you should click on the Packages tab, and import the package that you exported from the Desktop Studio.                                                                                                                     

  • After the package is imported, you should click on the Deployments tab to deploy the bot. After deployment, you can schedule when you want the bot to run.                                                                                                                                                                                                           

    Final Result



  • All the users will be deleted.



Conclusion


Working on Intelligent Robotic Process Automation was very interesting. It helped us broaden our knowledge about SAP related technologies and Robotic Process Automation in general.

Through these projects we helped reduce the repetitive and tedious work of our team-mates. Now our team-mates can better utilize their time in working on other tasks. We hope to work on helping them in more tasks like this in the future.

                                                                                                                               

 
1 Comment