Hi all gurus!
I'm trying to create an IDoc in an iView and for this I use the java class JCO to get a client and this client is then operated with "send" and "confirmTID", all done with this example as a template:
The forum thread regards an error due to erroneous JCO version, but I have copied the code and made a running example. The problem is that the example creates a connection via this code (obfuscated data):
JCO.addClientPool("MyIDocPool", 3, "400", "<username>", "<pwd>", "EN", "<host IP>", "00");
I want to use the System Connection I have in the portal. When you use that, you get an IConnection with which you can operate remote enabled function modules in the SAP system.
But how do you combine the System Connection and the JCO used for the IDoc creation in the java class?
There are 2 ways to writing java code for jco conection
I hope the above links will help you much
You use JCo to connect to SAP Backend system.The data should be retreived from the backend only throurgh RFC enabled function modules or BAPI.
There are two ways of connections available when you want to connect to the backend system from a java applications one is direct method and the second is client pooling. In direct connection the back system will be connected every time when you access the applications. In pooling a common connection can be shared by n number of users. In both the methods you need the backend details for R/3 Connection.
Also you can pass the logon ticket to make connection if use SSO with logon ticket. Check the JCO api for more details.
So have a BAPI/ RFC FM to perfrom any opperation on the backend when you want to do it from other non SAP applns.
Note: If you use WD for JAVA, you can just configure SLD and JCO to make the backend connection.