我正在尝试从 SAP 系统读取表,但总是收到此错误:Exception in thread "main" com.sap.conn.jco.JCoRuntimeException: (127) JCO_ERROR_FIELD_NOT_FOUND: Field EMPLOYEE is not a member of INPUTat com.sap.conn.jco.rt.AbstractMetaData.indexOf(AbstractMetaData.java:404)at com.sap.conn.jco.rt.AbstractRecord.setValue(AbstractRecord.java:4074)at testConf.StepServer.main(StepServer.java:50)这是我的代码:public static void main(String[] args) { // This will create a file called mySAPSystem.jcoDestination System.out.println("executing"); String DESTINATION_NAME1 = "mySAPSystem"; Properties connectProperties = new Properties(); connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "xxx.xxx.x.xxx"); connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, "xx"); connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "xxx"); connectProperties.setProperty(DestinationDataProvider.JCO_USER, "username"); connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "test"); connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en"); createDestinationDataFile(DESTINATION_NAME1, connectProperties); // This will use that destination file to connect to SAP try { JCoDestination destination = JCoDestinationManager.getDestination("mySAPSystem"); System.out.println("Attributes:"); System.out.println(destination.getAttributes()); System.out.println(); destination.ping(); } catch (JCoException e) { e.printStackTrace(); }当它说JCO_ERROR_FIELD_NOT_FOUND时错误很明显:字段 EMPLOYEE 不是 INPUT 的成员,但员工是我表中的一个字段。
添加回答
举报
0/150
提交
取消