on 08-12-2020 8:31 AM
Hi Everyone,
Through my BOT, I am logging into SAP with a Hard coded User ID and PWD with below code :
SAPLogon750.pSAP.edUser.set('KAGITAPU');
SAPLogon750.pSAP.oPassword.set('Kris_325', true);
Now from cloud factory if I want to login to same SAP system for 2 different set of ID/PWD ( connected to 2 different machine ), how to handle i.e how can we put/parameterised different ID/PWD for sap logon ?
Regards
Indranil
Hi ib5879 , rohit.singhal and jeromegrondin - How about creating a registry entry in the iRPA context for the local machine and then read that registry entry and decide further course of action? The registry entry value can be different for different machines and thereby providing a differentiating factor between the machines.....
Thanks & Regards
SR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ib5879 :-
for defining the variable in the registry editor, please define the variable in the Global start event as below: -
ctx.setting( {
"Variable_Name_Here": {
key: ctx.cryptography.keys.none,
comment: "Descriptive text for the variable",
server: false
}
At the point where the variable is required, please use the sample code to get the values of the variable. Based on the variable, act accordingly in the bot design.
ctx.settings["Variable_Name_Here"].get(function (code, label, setting) {
if (code == e.error.OK) {
// get value from setting.value
ApplName.PageName.ItemName.set(setting.value);
}
Now, before you execute the bot - you should manually go in the machines and type in "registry Editor" in the windows search box. In the path : "HKEY_CURRENT_USER\Software\SAP\Intelligent RPA\CtxtRun\Settings\Settings" create the variable with the same name used in the code the set the value as per the machine related functionality.
Hope this helps.
Hello,
You can create 2 different environments in your Factory. Each machine would be using a specific environment.
Each environment would store a variable Credentials (with the exact same name).
That way, you can implement an activity to retrieve the credentials in your scenario, and all the security (storage of password, etc.) would be done by the Factory
Regards,
J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jerome,
I liked the idea. But my point is how to add different trigger in different environment then ?
For ex : Env 1 - Added Machine 1 - Added Variable Credentials - Added Trigger 1
Env 2 - Added Machine 2 - Added Variable Credentials - Added Trigger 2 (
Question is how to add Trigger 2 now and how Job will understand which trigger to execute ? Does that mean both the machine needs to switch on their Desktop Agent and based on that job will run on different machines and login to SAP using same Variable Credentials ?
Hi Indranil,
One option could be to maintain the user id and password along with system details in an excel at a specific folder path.
1. Create a variable in environment and store folder path there.
2. Then for each machine, in the folder created at the path maintained in the variable environment path create an excel.
3. Your bot will read the folder path from environment variable and open the folder in user system. Read excel and use the system details + credentials from excel.
Best Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jerome,
I had previously used a few pre-built bots from SAP store and in a couple of them, based on the documentation we had to store credentials in excel in local system (Create Business Partner - BAPI comes to mind).
I did think of the solution for creating multiple environments with each being dedicated to a single machine/user id, however if a scenario needs more than 2 such environments (scaling for more users), wouldn't maintenance and orchestration involve more manual work that we are trying to automate?
Another solution that comes to mind is a pop-up prompt which asks users to input credentials each time the bot is executed.
Thinking on the above three solutions and given SAP store also contains such examples, I recommended the first approach.
Could you please share your thoughts on the above.
Best Regards,
Rohit
Hi Rohit,
Storing credentials in excel in local machine can't be take up here because of Security concerns. Customer's won't agreeing to that.
Also pop-up prompt which asks users to input credentials each time the bot is executed, is not acceptable as it is not making the Bot fully automated. It adds manual steps in between then.
I liked the idea of adding variable credentials in cloud factory though.
Hi Indranil,
I did think of another way which is according to me best of the two things mentioned above.
Credentials are maintained in Cloud Factory account in a single environment for each user with variable name being something like: cred_<DesktopAgentuserId>.
In the code, there can be a logic written, where the desktop agent user id which is triggering the bot, is read at runtime. Based on that the appropriate credential variable in environment is read to find the login credentials to SAP system.
This way we are using only 1 environment and all credentials are stored in specific credential variables.
Do let me know your thoughts on the above.
Best Regards,
Rohit
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.