cancel
Showing results for 
Search instead for 
Did you mean: 

How NOT to harcode user and password in the code using SAP Jco

Former Member
0 Kudos

Hi, I have successfully used SAP Jco to call from a Java Mapping program in XI to a Function Module in SAP.

But there is a MAJOR problem, the User and Password from the SAP user are harcoded in the Java program, is there a SECURE way to get and use the user and password without being harcoded in the java program?

Regards.

Mariano.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Answers (5)

Answers (5)

Former Member
0 Kudos

Mariano,

Apart from all suggestion from xperts, one more simple way. If your function module is present on XI server, with xslt on abap mapping you do not need to provide sap server details. You can call this function module directly in xslt on abap mapping. Transaction Code for xslt on abap : xslt_tool.

Just for info.

Thanks,

Nilesh

GabrielSagaya
Active Contributor
0 Kudos

Hi

Please look at this blog how to hide the connection parameters in JCO calls

/people/sameer.shadab/blog/2008/07/15/jco-lookup--hide-the-connection-parameters-from-source-code

Shabarish_Nair
Active Contributor
0 Kudos

just to add to the above comments the lookup will be the best option as mentioned by all.

providing you the link for the lookup API that should help you more - http://help.sap.com/javadocs/NW04S/current/pi/index.html (also look at the document provided by Mike to see how a RFC lookup is implemented)

stefan_grube
Active Contributor
0 Kudos

PI mapping provides an API where you can use RFC look-ups based on a communication channel.

If possible, you should rather use that API instead of JCo.

Regards

Stefan

former_member181985
Active Contributor
0 Kudos

Use RFC lookup concept instead.

In RFC lookup you will call the RFC communication channel. So password will not be exposed.