Hey all,
I extend the TimeEntryCreateBapi and TimeTicket class as you see below;
public class TimeEntryCreateBAPIx extends TimeEntryCreateBAPI { public static String COMPLETE_STATUS_GLOBAL = "WO.Complete"; public static String OPERATION_COMPLETE_STATUS_GLOBAL = "WOOperation.Completed"; private JCO.Table _tickets; private customtime _tt; protected User _wmUser; public TimeEntryCreateBAPIx(User u) throws Exception { super(u); } @Override public void setParameters(SAPObject obj) throws Exception { // TODO Auto-generated method stub super.setParameters(obj); setValue(_tickets, new Logger(_user, "setParameters"), "PERS_NO", _tt.getLb()); } }
public class customtime extends TimeTicket { public customtime(com.syclo.sap.workmanager.User u) { super(u); _user = u; // TODO Auto-generated constructor stub } @Override public void setProperties(ConfirmationCreateBAPI b) { // TODO Auto-generated method stub super.setProperties(b); setLb(_user.getString("transaction.LaborCode")); } public String lb; public String getLb() { return lb; } public void setLb(String lb) { this.lb = lb; } }
I put the jar into agentry.ini file and deploy the content. I change the class definition in the config panel, when i test the application i got this error;
LaborAddSteplet::throwExceptionToClient::688::LaborAddSteplet - | 2015 11 30 10:59:05#0-800#ERROR#System.err###Agentry SAPWM16 Worker Thread########com.syclo.agentry.BusinessLogicException | 2015 11 30 10:59:05#0-800#ERROR#System.err###Agentry SAPWM16 Worker Thread######## at com.syclo.sap.User.rethrowException(User.java:1128) | 2015 11 30 10:59:05#0-800#ERROR#System.err###Agentry SAPWM16 Worker Thread######## at com.syclo.sap.workmanager.stephandler.LaborAddStepHandler.run(LaborAddStepHandler.java:45) | 2015 11 30 10:59:05#0-800#ERROR#System.err###Agentry SAPWM16 Worker Thread######## at com.syclo.sap.workmanager.steplet.LaborAddSteplet.execute(LaborAddSteplet.java:71) | 2015 11 30 10:59:05#0-800#ERROR#System.err###Agentry SAPWM16 Worker Thread######## at com.syclo.sap.Steplet.doSteplet(Steplet.java:169) | 2015 11 30 10:59:05#0-800#ERROR#com.sap.mobile.platform.server.agentry.console###Agentry SAPWM16 Worker Thread########Exception: 10:59:05 11/30/2015 : 20 (Agentry3), Java Business Logic Error (com.syclo.agentry.BusinessLogicException: LaborAddSteplet - ), |