I want to send data to SAP RFC table from my Servlet Application.
I am trying to do this below way.
JCO.Function function = null;
Connection conn = new Connection();
JCO.Client mConnection = conn.open();
JCO.Repository mRepository;
mConnection.connect();
mRepository = new JCO.Repository("KEYWORD",mConnection);
try{
function = this.createFunction("MY RFC NAME");
if(function != null){
function.getImportParameterList.setValue("ID1","USERID");
function.getImportParameterList.setValue("Test Name","UNAME");
function.getImportParameterList.setValue("CLASSA","UCLASS");
mConnection.execute(function);
}
}catch(Exception ex){
// Exception handling goes here.
}
conn.disconnected();
But I am getting following error
com.sap.mw.jco.JCO$Exception:<127> JCO_ERROR_FIELD_NOT_FOUND: Field USERID not a member of INPUT
But I checked, There is exist column in SAP.
What is missing here? Should I pass RFC table name also? Then How?