on 11-17-2008 11:52 AM
Hi,
there is a way to create a dynamic JCO.Client?
I have this code:
JCO.Client jcoclient = JCO.createClient(
"data",
"data",
"password",
"it",
"10.140.5.122",
"12");
jcoclient.connect();
I want to get dynamically from the system the parameters for method "createClient". It's possible??There is a way??
THANS
Hi,
I want to get it directly from the r/3 system in witch the application run. It's possible????
I dont think that its possible to get the details.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
> Hi,
> there is a way to create a dynamic JCO.Client?
> I have this code:
>
>
> I want to get dynamically from the system the parameters for method "createClient". It's possible??There is a way??
> THANS
To avoid hard coding the JCO connection details, take a look at the [Destination Service API|http://help.sap.com/saphelp_nw04/helpdata/en/8b/8e7dac1e661d44bf2a676fd3948cc6/frameset.htm].
Here is a [blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/10300] on how to use the SAP Enterprise Connector (which is used to call JCOs) with the Destination Service API. Once the Destination service is set up, you can then create your JCO.client as follows
final InitialContext ctx = new InitialContext();
final DestinationService dstService = (DestinationService)ctx.lookup(DestinationService.JNDI_KEY);
if (dstService == null)
throw new NamingException("Destination Service not available");
RFCDestination dst;
// get the ERPR3 destination created in visual administrator
dst = (RFCDestination) dstService.getDestination("RFC", "ERPR3");
Properties jcoProperties = dst.getJCoProperties();
//Establish a direct connection
JCO.Client client = JCO.createClient(jcoProperties);
client.connect();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not sure about your requirement
following method may be of use
JCO.createClient(properties)
Create a properties file and use this for the details
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.