cancel
Showing results for 
Search instead for 
Did you mean: 

RFC client connect without giving password

osc
Discoverer
0 Kudos

Hi,

I wrote a JCo client, get connected to SAP and called an rfc enabled function.

This is all working fine, but I have to give user and password in the JCO.createClient method.

Is there any possibility to avoid giving password and user?

Is it possible to use first something like an R/3 connection (created via SM59) and then call the rfc function?

I tried JCO.createClient with a param_list with parameter "alias_user" or "saplogon_id", but it didn't work.

Do you have any hints to solve this issue?

Thank you in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You need to connect to SAP with a user and password via SAP JCo.

You should create a new RFC user only for your application. This user must have the type : "Communication Datas".

Regards,

Mathieu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hallo Oli,

what I normally do is create a little text file and save it as conn.properties containing the login information. Then I just read the conn.properties for the connection information in my Java program like the IP, username, password, etc.

This way you don't need to change your complete program for just the simple login data. Logging in without the username and password is not possible as far as I know, with the properties file you can have multiple users who can change their login information and run the program.

Hope that helps,

Sameer