Skip to Content
0
Former Member
Sep 14, 2004 at 08:51 AM

How to connect to R/3 via JCo using MYSAPSSO2?

350 Views

Hello!

I'm developing a J2EE application who resides in an EP with Single Sign On. I have to retrieve some data from R/3, the way I want to connect is via JCo using MYSAPSSO.

I have read that is possible to connect passing MYSAPSSO2 as <i>user</i> and its value as <i>password</i>. The java code in the jsp is something like this:

-


javax.servlet.http.Cookie [] my_cookies = request.getCookies();

java.util.Hashtable cks = new Hashtable();

for(int i=0;i<my_cookies.length;i++){

cks.put(my_cookies<i>.getName(),java.net.URLDecoder.decode(my_cookies<i>.getValue()));

}

String user = "$MYSAPSSO2$";

String pass = (String)cks.get("MYSAPSSO2");

JCO.Client conex;

JCO.Repository rep;

boolean ok=true;

conex = JCO.createClient("000",user,pass,"es","192.168.0.1","00","","");

try{

conex.connect();

rep = new JCO.Repository("mirep",conex);

} catch (Exception e){

out.write("<br>"e"<br>");

ok = false;

}

if (ok)

conex.disconnect();

-


We are working with EP6 SP2, WAS 6.20.

The error is:

com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Se ha recibido un ticket SSP que no se puede interpretar

(I translate you:)

RFC_ERROR_LOGON_FAILURE: unable to interpret a retrieved SSP ticket

Thank you all!!