Skip to Content
Former Member
Jun 07, 2010 at 09:52 PM

Calling a remote JCo destination file


Hi everybody.

This is my first post here in the SAP SDN Forum.

While I'm not a SAP developer, I'm a Java developer. Currently I'm making an application to connect to SAP AS (with JCo 3.0) and retrieve data from BAPI structures and tables. I'm using the JCo 3.0 guide (SAPJCO_Doku_3.0_EN.pdf) successfully but I have some issues:

First: How can I call "remotely" the destination file??? For example: supose first that my destination file, let's say the ABAP_AS_WITHOUT_POOL.jcoDestination file and the Java application are stored in a directory like C:\My Documents\Files, from a first and successful run of the application. With another application in another directory I'd like to call and use that destination file, so in my second application I shouldn't create a second destination file. How can I do it??? What elements and/or properties should I use??? (Maybe the JCoDestination, the DestinationManager, the getRepository and related).

Second: Is it the same for calling a destination file that is in a remote machine??? In a directory like +\shared\Files+

I guess if this is in some way equivalent to file reading in Java, but I'm not really sure.

Please help me. Most of the sources I've read didn't say something useful about this, and I need this for my final application.

If you can, please add some generic example-code for a better understanding.