There was a requirement that all users will use their credentials to log in to the S/4HANA system which was required to handle document change history, therefore, storing one credential in the cloud was not meeting our requirement. In this blog post, you will learn how to read credentials from a local machine and thus make the configurable scripts with the SAP Intelligent RPA 2.0 (aka SAP iRPA).
NOTE: This is just a workaround, there may be such activities available in an upcoming release. The same requirement can easily be achieved in Desktop Studio (SAP Intelligent RPA 1.0). Please have a look at the blog post.
As of now, there are no such activities available in Cloud Studio therefore this approach gives the flexibility to get the user’s credentials without changing the script.
SAP Intelligent RPA 2.0 – Cloud Studio
Steps in action
1. Variable creation
Create variables along with values as below.
1.1. Open Registry Editor
- In the search box on the taskbar, type regedit. Then, select the top result for Registry Editor (Desktop app).
- Press and hold or right-click the Start button, then select Run. Enter regedit in the Open: box and select OK.
1.2. Create entries as below
2. Reading variables value
2.1 Create automation in cloud studio with custom script and paste below code to get the values.
let username = irpa_core.registry.get('SOFTWARE\\SAP\\Intelligent RPA\\Cloud Variables\\Credentials\\Username'); irpa_core.core.log('Username: ' + username); let password = irpa_core.registry.get('SOFTWARE\\SAP\\Intelligent RPA\\Cloud Variables\\Credentials\\Password'); irpa_core.core.log('Password: ' + password);
For more information, please have a look at the documentation of Module – Registry
2.1 Test the automation
This way I could proceed with the current requirement. I hope this will help others who may be in the same situation. Happy Learning!!!