cancel
Showing results for 
Search instead for 
Did you mean: 

Error while connecting with JCo via SSO-Ticket

Former Member
0 Kudos

Hello everybody,

I have deployed a Java application (not WebDynpro) in the portal (EP 7.0) and I want to call a function module in the backend (xRPM 4.0) via RFC. I want to use SSO to connect Java application and backend. I already figured out how to grab LogonTicket from portal cookie to use it with JCO functions. As soon as i want to establish the JCO connection I get the following errors depending on how many times I try to connect:

1. No RFC authorization for function gruop SYST for user SAPSYS.

2. Connection closed without message (CM_NO_DATA_RECEIVED).

3. No valid trusted entry for the calling system.

Can anyone help me please?

Thanx in advance.

Rainer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rainer,

you have to use the user MYSAPSSO2 between "$" signs. For example, this way: "$MYSAPSSO2$" This is necessary for the SAP system to know, that this is a SSO user.

Please refer to the JCO class documentation and search for $MYSAPSSO2$.

The password could be the ticket content that you get from a SSO System.

Greetings,

Sigi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey Sigi,

thanx a lot. It works perfectly.

Regards,

Rainer

former_member182294
Active Contributor
0 Kudos

Hi Rainer,

Logon Ticket is working fine. But only problem is the user SAPSYS does not have proper authorization to execute the function group SYST. The function modules which you are trying to execute are part of function group SYST. Contact your BASIS team to provide required authorizations for user in in backend.

Regards

Abhilash

Former Member
0 Kudos

Hi Abhilash,

thanks for your quick reply. The error already appears if I try to connect to the SAP-System via JCo -- accordingly before the invocation of the function module.

Maybe the code explains my problem a bit better.

Regards,

Rainer


protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
	JCO.Client jcoClient = null;
	String user = "MYSAPSSO2";
	String passwd="";
	PrintWriter aWriter = response.getWriter();
		
	try {
		Cookie[] myCookies = request.getCookies();
		Hashtable aHashtable = new Hashtable();
		
		for(int i=0; i < myCookies.length;i++) {
		aHashtable.put(myCookies<i>.getName), 
                                URLDecoder.decode(myCookies<i>.getValue(),"UTF-8"));
		aWriter.println("Name = ");
		aWriter.print(myCookies<i>.getName());
		aWriter.println("Wert = ");
		aWriter.print(myCookies<i>.getValue());
		}
			
		passwd = (String) aHashtable.get(user);
			
		// Verbindungsaufbau
		aWriter.println("Attempt to establish connection");
		jcoClient = JCO. createClient("910", user, passwd, "EN", "sapm0200.sbb.ch", "01");
			
		jcoClient.connect();
		aWriter.println("Connection established");
		aWriter.println(jcoClient.getASHost());
		jcoClient.disconnect();
	}
		
	catch (Exception e) {
	aWriter.println(e.getMessage());
	}
}

former_member182294
Active Contributor
0 Kudos

For remote login some of the function modules of SYST are used. So ask you security team add or modify the S_RFC authorization object in the user profile for SAPJSF to include the SYST function group.

Regards

Abhilash