Java to SAP Connectivity
I am currently using RFC calls to talk to SAP, it is very slow, can you please tell me what are the most efficient ways to communicate with SAP for a web based application (Websphere Commerce)
Hello,
You will find a lot of information on the net about your subject.
You can see two wen site :
www.vogella.de/articles/SAPJCo/article.html
www.winfobase.de/lehre/lv_materialien.nsf/intern01/1DDA0D7896600DF5C125709F0045ED23/$FILE/Tips&Tricks_JCo_Programming.pdf
Thierry
Similar Messages
-
Error while connecting for Java to SAP
Hi All,
I am encountering the following error while connecting from Java to SAP through JCO:
RFC_ERROR_LOGON_FAILURE: You are not authorized to logon to the target system
I have checked the connection string and everything appears to be fine.
Please let me know what the problem is.
Regards,
Rupesh.Hi rupesh,
See this thread:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f3f93ee7-0c01-0010-2593-d7c28b5377c2
Regards, Suresh KB -
Connectivity of Java and SAP using JCO
Hi,
Using the example5 given along with the JCO package I was able to connect to Java from SAP. Can I use the same server for bi directional data transfer . That is I want to use the same server to recieve data from SAP and also I should be able to Send data to SAP from Java using the same server.
Regards ,
Nagaraju Donikena.Hi,
You can use the same server for data sending and receiving.
You can also go through the following link for knowing more about JCO.
http://www.persistent.co.in/resource_center/
white_papers/Java_SAP_Integration.pdf
Thanks
Ritushree -
Any other option rather than JCO to Connect JAVA through SAP ? which wayhow
Any other option rather than JCO to Connect JAVA through SAP ? which wayhow
points will be awardedHI,
For connectivity with SAP from Java, if you are looking at solutions based on the options SAP provides, then
1. SAP JCo --> You know it...but this one is recommended if you want to connect from a standalone Java application.
2. SAP JRA --> From applications inside JEE runtime environment.
http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5caa85b11d6b28500508b5d5211/content.htm
Reward points if it helps,
Regards,
Omkar. -
How to establish a connection from java to SAP Netwevare server
Hi All,
As per my requirement i need to create a connection from Java to SAP Netwevaer Server inorder to access the docs from KM. PLZ provide some sample code
(I know how to connect from java to SAP R/3 syatem using JCo connector).
Can anybody help me.
ADV ThanksLook
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/6615ea90-0201-0010-be81-e7a300fdf212
/people/rohit.radhakrishnan/blog/2005/05/27/uploading-files-to-km-repository-using-webdynpro-apis -
Hi folks,
my friday crusher:
We have a sync RFC-PI-SOAP scenario.
All is working fine in Dev system.
After moving into Test following error is displayed as the SOAP response message:
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.EOFException: Connection closed by remote host.</SAP:AdditionalText>
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Also Channel Monitoring says:
Message-Verarbeitung fehlgeschlagen. Grund: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.EOFException: Connection closed by remote host.
Couldn´t find any hints in SDN and the web to this issue.
Does anyone of you has made experiences with that problem?
Maybe it´s a system parameter for time out SOAP connections....?
Many thanks for your help
-and-
have a great weekend!
Cheers
AndréVery strange!
But I have the solution:
I have looked into channel monitoring / RWB again.
There I saw, this PI is using two clusters on two application servers.
Everytime the SOAP call is executed through the frist cluster, all was fine.
But no SOAP call was successfully executed by the second cluster.
Fortuity? No!
The second cluster node / app server wasn´t registered for internet access in the used proxy server.
So it wasn´t an PI issue.
Now, all is fine & I´m happy!
Thanks @all for helping!
Cheers,
André -
Java application to connect to AP 7.00 (IPC)
Hi,
I have to develop standalone java application that connects to IPC and does configurations via the IPC Server (via the RFCs the IPC Server exports).
I have JCo connection to the SAP ECC system (only one server. I assume the IPC server is running on the same host)
I then tried to call the "CREATE_SESSION" command. Repository returned null.
Do I need to set a special SystemNr in JCODestination? (To connect to the IPC Server)
Or is it possible to make a connection to SAP ECC system and then call the IPC RFCs?
Does SAP provide a function/transaction to retrieve a list of functions that a RFC destination supports?
Is there a Howto document on how to call the IPC server from a standalone (Java) application?
I hope somebody can help me!
Thanks!
BR GeorgError messages tell you everything you need to know (usually).
Student.java:13: cannot find symbol
symbol : class ControlPanel
location: class Student
private ControlPanel controls;
^
This means that the compiler cannot find the class ControlPanel. Does it exists. Is it in the same directory as your other files. Has it compiled correctly.
Student.java:38: cannot find symbol
symbol: method GridLayout(int,int,int,int)
frame.add(panel, GridLayout(4,2,5,5));
^
This tells you it cannot find the method GridLayout. I presume you meant to have a new in front of it. Besides the layout manager code should have been done prior to this and your code should be
frame.add(panel);Student.java:49: cannot find symbol
symbol : method addWindowListener(<anonymous java.awt.event.WindowAdapter>)
location: class javax.swing.JMenuItem
exititem.addWindowListener(
^
Once again the method addWindowListener cannot be found. JFrame has this method not JMenuItem. Probably need an ActionListener.
Student.java:69: cannot find symbol
symbol : method JMenuItem(java.lang.String)
location: class Student
JMenuItem queryItem = JMenuItem("Query");
^
Once again the compiler thinks you are trying to call a method called JMenuItem. You forgot new.
Student.java:78: cannot find symbol
symbol : method showMessgaeDialog(<nulltype>,java.awt.Component,java.lang.String,int)
location: class javax.swing.JOptionPane
JOptionPane.showMessgaeDialog(null, add(queryoutput), "QUERY RESULTS", JOptionPane.INFORMATION_MESSAGE);
Spelling! -
IDOC data transfer SAP to Java using SAP JCo
Dear Experts,
The challenging requirement we are having is, we need to create the interface for data transfer between SAP system and the Java system. The data will be transferred from SAP to java and similarly once some processing done in Java again the details needs to be transferred from Java to SAP.
For this data transferred we are planning to use IDOC process and for interface "SAP Java connector" we are planning to use. In this case we are having some doubts.
1. The data from SAP is going to be transfered from one Custom transaction (Z tcode). Once "Outbound IDOC" will get triggered and will carry the details. Now the doubt is, whether the data / details will get transfered to JAVA system automatically or we need to perform any other steps from SAP ABAP coding...(like converting in to flat file, XML file and etc) ??
2. We are planning to install "SAP Jco" in Java server. Is this correct...??
3. Other than SAP Jco any other softwares needs to be installed or not..??
4. Since we are going to trigger the "outbound IDOC" from custom transaction, we are planning to develope one program in SE37. Other than this any other program we need to develop or not..??
If anybody has detailed steps or explanation please share it with us.
Warm Regards,
VELHi All,
For the above mentioned issue, we implemented JCo software in JAVA system and created the JAVA program including SAP logon credential details like Client, User name, password and Language details.
When this JAVA program was compiled successfully then, that non SAP system will appear in SAP gateway Tcode.
Once non SAP system started appearing in SAP gateway that means, both SAP & Non SAP are connected automatically.
Regards,
Velmurugan P -
Development in JAVA within SAP ERP
Hi folks,
i have a general question. My last attempt was testing a Java application which connects via JCo and RFC to an ABAP module and receives some table data or send some integers to that module.
The approach was to write a Java application that handles all the logic and then do some RFC's to get data within a SAP database table and then process this data in the Java application again.
After some beginner problems, everything is working fine now. But now i want to test 2 more approaches.
First, i want to do most of the logic in ABAP and just the most necessary in JAVA, is it possible to do a RFC from ABAP to call a JAVA module? (just the reverse direction as i tried it the last time).
Second, is it possible to deploy a Java application inside a SAP ERP system, that the application can access to all the SAP databases without using an ABAP RFC? I want to write everything in Java that i do not have to write a single line in ABAP but whithout having any limitations.
Thanks in advance!
Kind regards
FelixTo get an idea how to call BAPI's or function modules via RFC from Java you could have a look [here|http://help.sap.com/saphelp_nw04/helpdata/en/35/42e13d82fcfb34e10000000a114084/content.htm]. There are different versions of the JCo library, the latest one is 3. There are a host of other ways to connect to ERP, but this would be one way to do it from Java.
If you cannot work with the standard business objects in SAP, you could of course create Z-tables and custom function modules. BAPI's are the function modules already delivered by SAP, but you can always extend or build your own. -
XML data file links java and sap
Hi ,
Please help me this
How to connect xml file to java into sap
please send me sample scenario.
in java i call the this sap function module 'BAPI_MAT_BOM_EXISTENCE_CHECK'.
1. Check BOM existence with BAPI_MAT_BOM_EXISTENCE_CHECK
2. Exit BOM diff if BOM doesn’t exist
3. Read BOM structure with CSAP_MAT_BOM_READ
4. Compare SAP BOM items incl. subitems to XML BOM items and subitemscurrently I use following methods tu opload and to transfor the xml into a string.
* Method to create XML from data file
CALL METHOD instance->import_from_file
EXPORTING
filename = gf_filename
RECEIVING
retcode = ch_retcode.
* Convert into XML-Stream
CALL METHOD instance->render_2_string
* EXPORTING
* pretty_print = 'X'
IMPORTING
retcode = ch_retcode
stream = lf_string .
* size = .
When I use read dataset the output of the xml is into an internal table where I have many lines depending on the XML data file, this means if my xml has 10lines the internal table of read dataset has also 10 lines but I need a string to make the transformation of the xml. -
What is JCo in SAP connectivity
Hi all,
i want to connect to SAP system from java program.Is it that i need a JCO jar file.
I am new to this.the code i got by searching in all the forums for sap connectivity is
import com.sap.mw.jco.JCO;
import com.sap.mw.jco.IRepository;
public class checkSAP{
private JCO.Client client = null;
private JCO.Function function = null;
private IRepository repository = null;
try {
client = JCO.createClient(
connClient, // SAP client
connUser, // userid
connPW, // password
connLang, // language
connHost, // host name
connHostSyst ); // System number
client.connect();
catch (JCO.Exception ex) {
System.out.println("Caught an exception: \n" + ex);
can anyone plz help me how to create a conncetion and retrive data
Regards
ChandraHi chandra,
pls find information on how to use jco here ... Re: Create a Planned order from JAVA JCO
regards, jens -
Transporting SAP connectivity across different environments.
Hi all,
I am calling a RFC from my Java Develoment component using SAP connectivity so that proxy classess for my ABAP function module are generated.
And this RFC call is successful in the development environment.
Now when i move it from "development" to "quality" to "production" environments, should i have to re-establish the connection to the R/3 server of the respective environment before moving it to that particular environment, so that new classes will get generated again.
Or is there any other method by which i can transport the component without any change in my code.
Your response will be highly appreciated.
Thank you.Hi Thezone,
Great ,Thanks for sharing.
Regards
Agasthuri Doss -
IAIK: java.io.EOFException: Connection closed by remote host
Hi Experts,
I'm having a performance issue during login and I found in Trace log the logs below.
Can you please tell me what things I should look at or where maybe my issue?
com.sap.engine.core.manipulator.TCPRunnableConnection
com.sap.engine.core.manipulator.TCPRunnableConnection.init()
OrderedChannel for http service
Warning: System/Network
Java: Cannot get input and output streams from socket. ConnectionsManipulator is not initialized.
[EXCEPTION]
{0}#1#java.io.EOFException: Connection closed by remote host.
at iaik.security.ssl.Utils.a(Unknown Source)
at iaik.security.ssl.o.c(Unknown Source)
at iaik.security.ssl.r.f(Unknown Source)
at iaik.security.ssl.f.c(Unknown Source)
at iaik.security.ssl.f.a(Unknown Source)
at iaik.security.ssl.r.d(Unknown Source)
at iaik.security.ssl.SSLTransport.startHandshake(Unknown Source)
at iaik.security.ssl.SSLSocket.startHandshake(Unknown Source)
at com.sap.engine.services.ssl.factory.SSLSocket.startHandshake(SSLSocket.java:162)
at com.sap.engine.services.ssl.factory.SSLSocket.getInputStream(SSLSocket.java:280)
at com.sap.engine.core.manipulator.TCPRunnableConnection.init(TCPRunnableConnection.java:351)
at com.sap.engine.core.manipulator.TCPRunnableConnection.run(TCPRunnableConnection.java:554)
at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
at com.sap.engine.core.thread.impl6.SingleThread.execute(SingleThread.java:80)
at com.sap.engine.core.thread.impl6.SingleThread.run(SingleThread.java:150)
Thank you very much,
JemaruHello Jemaru,
Don't you have some more information. This is the error in the Java stack what does the R3/Abap stack returns on this message?
Kind regards,
JK -
SAP Connectivity in Netweaver developer studio...
Hi everyone,
I am trying to use the feature of "SAP connectivity" in the NDS.
I created a proxy for a simple RFC.
What I am trying to do is to call the RFC from a Java code.
Here is what I wrote :
try {
Z_Rfc_Ws_Test2_Input input = new Z_Rfc_Ws_Test2_Input();
input.setInput("Salut la compagnie");
SAPProxy_PortType proxy = new SAPProxy_PortType();
Z_Rfc_Ws_Test2_Output output = proxy.z_Rfc_Ws_Test2(input);
} catch (Exception e) {
e.printStackTrace();
I get an exception because I didn't specify the username and its credentials. Of course, I have to specify the server and the client number.
Here is the exception :
com.sap.aii.proxy.framework.core.BaseProxyException: JCoClient connection missing
at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:150)
at com.proxy.SAPProxy_PortType.z_Rfc_Ws_Test2(SAPProxy_PortType.java:16)
at Client.main(Client.java:45)
Can someone help with this issue ?
Thanks in advance.Hi David,
In your below code the JCO configurations is missing I mean ur JCO client. Try some thing like this which is self explanatory.
(ur package name here if u have any)
import com.sap.mw.jco.*;
public class Jco {
public static void main(String[] args) {
// Necessary fields for Connection
JCO.Client myConnection = null;
JCO.Repository myRepository = null;
JCO.Function myFunction = null;
JCO.Field myHostName = null;
// Establishing a connection
try{
// Defining the connection parameters
myConnection = JCO.createClient("Client","User","Password","Lang","ServerIP","Sys Number");
myConnection.connect();
// Creating a repository
myRepository = new JCO.Repository(attribute,myConnection);
}catch(Exception e){
System.out.println(e.toString());
System.exit(1);
// Finally closing the connection
finally{
myConnection.disconnect(); -
hi friends..
can you explain me fallows..
suppose i want to upload PO from JAVA to SAP means..we can do wit BAPI.
in what way we connect these JAVA and SAP ?
what is BAPI Active X control ?hi,
You need to call the BAPI BAPI_PO_CREATE / BAPI_PO_CREATE1 in SAP from your Java development via a RFC connection. You can read the FM Documentations which are available in detail.
Your Basis colleagues can help you with the creation of RFC settings.
Hope this helps.
Best Regards, Murugesh AS
Maybe you are looking for
-
3rd party software for syncing media to blackberry phones
Not spam. I wanna say that right out front. I'm not trying to sell anything but I do have an app that can add a lot of value to windows users who need to sync Android G1's, Blackberry's, a PSP, iPhones, iPods and dang near any device.This is somethin
-
Facing issue while installing micrsoft deployment kit 2012
Can some 1 help me . I am using windows server 2008 data center 32 bit. I am facing a issue after installation of microsoft deployment kit 2012. The error occurs "powershell is required to use the deployment workbench" even i have installed the power
-
Sequences in Master-Detail Forms
Whenever I try to use Sequences in the default values for the column (#schema.sequence.nextval) in Master Detail Forms I get the following error : Exception from wwv_generate_component.build_procedure (WWV-01821) Error creating module: ORA-06502: PL/
-
Transform a Word document into a RoboHelp7 project
Hi all, One question: Is it possible to transform a Word document into a RoboHelp7 project besides copy and paste from the document into the project? Thank you
-
Auto Quality Notification and Return Delivery Via Usage Decision
Hello Gurus Need help ! I am using the Quality inspection with Material Specification. Just an overview of my current system settings - Inspection Type 101 for Purchased parts , My Inspection characteristics and Batch Charracteristics are linked .Bat