Creating communication between Java application and SAP
I have to create communication between SAP system and my Java application. I am using JCo and put it in library and class path. While importing package com.sap.mw.jco.*, it shows a compilation error.
Below is my code:
import com.sap.mw.jco.*;
public void createSnippet() throws JCoException{
JCO.Client mConnection =
JCO.createClient("xx", // SAP client
"xxxx", // username
"xxxx", // pwrd
"xxxx", // Select language (null for the default language)
"xxxx", // Enter application server name
"xx"); // Enter system number
JCoFunction function = dest.getRepository().getFunction("BAPI_CR");
JCoTable eqptable=function.getTableParameterList().getTable("EQU_LIST");
eqptable.appendRow();
eqptable.setValue("Example1", "MY_VALUE1");
eqptable.setValue("Example", "My_VALUE2");
connection.execute(function);
}