Skip to Content
0
Former Member
Jan 11, 2007 at 10:55 PM

Error in Java Program when passing table to RFC function . JCO is used

84 Views

Hai All,

I developed a JAVA application to update data into SAP using JCO via RFC. When i pass table to the function module i am getting the below error

com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Conversion from type T to D not supported.

Please let me know how to solve this.

Below is my code

IRepository m_Repository;

IFunctionTemplate ftemplate;

JCO.Table PwdReq;

JCO.Function function;

m_Repository = JCO.createRepository("MYRepository", client);

ftemplate = m_Repository.getFunctionTemplate("Z_GESEFM_UPD_PWD_RESET_REQUEST");

// Create a function from the template

function = new JCO.Function(ftemplate);

// Feeding in input parameters

PwdReq = function.getTableParameterList().getTable("RESULT2");

String userid = "PATCHTEST14 ", reqDate = "",reqNo = "01",reqStatus = "03", boxID = "09",ind2 = "X",

lcode = "abcd",rem = "One record testing";

PwdReq.appendRow();

PwdReq.setValue(userid, "USERID");

PwdReq.setValue(reqNo,"REQ_NO");

PwdReq.setValue(reqStatus,"REQ_STATUS");

PwdReq.setValue(boxID,"BOX_ID");

PwdReq.setValue(ind2,"IND2");

PwdReq.setValue(lcode,"LCODE");

PwdReq.setValue(rem,"OTHER_REMARKS");

// execute the function with the input parameters

client.execute(function);

Thanks & Regards,

H.K.Hayath Basha.