cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple SAP login Handle from Cloud Factory

indranilbiswas
Advisor
Advisor
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Srinivas-Rao
Contributor
0 Kudos

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.

Jerome
Advisor
Advisor
0 Kudos

Hello,

It can be difficult to maintain when you have many machines to take care of.

Srinivas-Rao
Contributor
0 Kudos

Hi - sure. I agree and the same would be true for multiple environment option as well. I guess now it is the choice of ib5879 to take it forward based on pros and cons.

thanks

SR

indranilbiswas
Advisor
Advisor
0 Kudos

Hi Srini,

Can you please share the example of creating a registry entry in the iRPA context for the local machine and then read that registry entry and decide further course of action ?

Indranil

Srinivas-Rao
Contributor
0 Kudos
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.

Jerome
Advisor
Advisor
0 Kudos

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.

indranilbiswas
Advisor
Advisor
0 Kudos

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 ?

Jerome
Advisor
Advisor
0 Kudos

Hi.

Not sure to fully understand what you're trying to achieve. Could you please elaborate ?

rohit_singhal
Active Contributor
0 Kudos

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

Jerome
Advisor
Advisor
0 Kudos

Hi,

From a security perspective, you MUST NOT store your credentials in an Excel file.

Regards,

J.

rohit_singhal
Active Contributor
0 Kudos

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

indranilbiswas
Advisor
Advisor
0 Kudos

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.

rohit_singhal
Active Contributor
0 Kudos

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