java - Why does SAP JCo raise an error "Field ... not a member of ..." even though the field exists? -
i want send data sap rfc table servlet application.
i trying 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 getting following error
com.sap.mw.jco.jco$exception:<127> jco_error_field_not_found: field userid not member of input
but checked, there exist column in sap.
what missing here? should pass rfc table name also? how?
i solve question following code.
jco.function function = null; connection conn = new connection(); jco.client mconnection = conn.open(); jco.table get_data = null; jco.repository mrepository; mconnection.connect(); mrepository = new jco.repository("keyword",mconnection); try{ function = this.createfunction("my rfc name"); if(function != null){ get_data = function.gettableparameterlist.gettable(table_name); get_data.appendrow(); function.getimportparameterlist.setvalue("id1","userid"); function.getimportparameterlist.setvalue("test name","uname"); function.getimportparameterlist.setvalue("classa","uclass"); get_data.nextrow(); mconnection.execute(function); } }catch(exception ex){ // exception handling goes here. } conn.disconnected();
Comments
Post a Comment