on 08-09-2016 12:39 PM
Hello All
How to connect SAP System(ECC) and get the data data from RFC/BAPI using JAVA + in Eclipse.
is it possible to run the same application into the Tomcat server using eclipse.
Regards
Vijay
Hi Vijay,
I remember that you already participated here in this forum in the past with trying to help other users having JCo questions and you posted JCo code and examples.
How is it possible then that you are asking now how to do RFC and BAPI calls from Java?
The SAP Java Connector (JCo) is offered exactly for this purpose.
You can download the standalone version for usage scenarios outside of SAP NetWeaver AS Java environments from here:
http://service.sap.com/connectors
Please also see note 1077727.
The same JCo business application code can then also run in Tomcat. But I don't know if there are also eclipse plug-Ins for direct Tomcat integration or if the application deployments must be done manually.
I strongly recommend NOT deploy the JCo itself into an Web Application Server environment but to add the JCo libraries to the server startup classpath instead or to install it centrally as a separate library which can be referenced from all using applications. Avoid that the JCo library is loaded multiple times, otherwise you will probably get native library loading errors on following attempts to use JCo.
Best regards,
Stefan
PS: I assume that you know that Tomcat is offering a servlet container only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can you tell me full path for download (sapjco3.jar and sapidoc3.jar) under http://service.sap.com/connectors
Please see note 1077727.
I
I downloaded sapjco3.jar file and added under build path in NWDS7.3. I am trying to implement this below code. But I’m unable to see the JCO.Client
JCO.Client connClient = null;
IRepository mRepository; //taken from j2ee\cluster\dispatcher\bin\ext\com.sap.mw.jco\jrfc.jar
connClient = JCO.createClient("<SAP Client>","<UserId>","<Password>","EN","<Application server host name>","<system number>");
try {
connClient.connect();
}
catch (Exception ex)
{
ex.printStackTrace();
System.exit(1);
}
mRepository = new JCO.Repository("Hell", connClient);
JCO.Function strHELLO = mRepository.getFunctionTemplate("ZCI_PRICE_CHECKER").getFunction();
JCO.ParameterList importParam = strHELLO.getImportParameterList();
importParam.setValue(val,"EV_MAKTX"); // get the data from FM.
try {
connClient.execute(strHELLO);
}catch (JCO.AbapException ex)
{
}
Can you pls. provide me proper API for this and help me on this requirement.
Hi Vijay,
you are using the API of JCo 2.1. JCo 3.0 has a new API that is working differently. Simply have a look at the samples included in the archive you downloaded how communication is done now or look at the comparison in the migration guide, which is available from https://service.sap.com/connectors -> SAP Java Connector -> Tools & Services
Best regards,
Markus
Hi Vijay,
do you remember this thread? :
I have problem in fetch data from sap to java | SCN
BTW, the SAP NW AS Java environment is still capable to serve the old JCo2 API. However, this is deprecated since 2007 and I strongly recommend to use the new JCo3 API also in the NW AS Java environment now. Especially for new developments.
In a standard eclipse environment (or in Tomcat) there is no other choice than to use the JCo3 API now.
Best regards,
Stefan
Thanks for your reply
Is it possible to develop Vijay Dudla'a code in Help on accessing tables of SAP from the Java A... | SCN
using JCo3.jar file.
Hi Vijay,
yes, from the technical perspective, it's of course possible to migrate this program from using JCo2 to JCo3. How the code needs to be adapted is explained in the JCo2 -> JCo3 Migration Guide that Markus mentioned above.
But I fully agree to Markus that the RFM RFC_READ_TABLE should not be used for security reasons. SAP recommends to use official BAPIs or write own RFMs which offer the needed business case specific functionality, but not a generic one that is capable of accessing database tables directly from outside.
Best regards,
Stefan
Instead of RFM RFC_READ_TABLE.I'll use my FM.
I'm unable to download the JCo3.Jar file from SMP. If u have Jar files kindly forward to my mail: kallurivijay.sapep@gmail.com
Kindly help me.
Hi Vijay,
the SAP Java Connector is not free software.
But every SAP customer and partner gets an S-User ID with access to the SAP Marketplace. Please ask your local SAP Administrator (inhouse) for getting such an S-User ID with appropriate download permissions. You do not need an extra authorization from SAP.
The download is free for all customers and partners.
Best regards,
Stefan
Can you pls. provide me the path for download sapjco.jar in SMP.
http://service.sap.com/connectors
32bit | SAP JCo 3.0.15 as zip file (5.424 KB), August 2, 2016 | |
---|---|---|
64bit Itanium | SAP JCo 3.0.15 as zip file (6.303 KB), August 2, 2016 | |
64bit x86 | SAP JCo 3.0.15 as zip file (5.468 KB), August 2, 2016 |
Any update on above thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.