on 01-11-2013 10:43 AM
Hi Experts,
I am new to SAP e-sourcing9 scripting. I try to implement the logInfo for a toolbar scripting. The codes are given below
import com.sap.odp.ibean.*;
import com.sap.odp.api.doccommon.masterdata.*;
import com.sap.eso.api.contracts.*;
import java.util.*;
//logging
global.log = Logger.createLogMessage(session);
logInfo(String message){
global.log.setLogMessage(message);
Logger.Info(global.log);
}
home = (ContractIBeanHomeIfc)IBeanHomeLocator.lookup(session.ContractIBeanHomeIfc.sHOME_NAME);
contractList = home.findWhere("INACTIVE=0");
logInfo("contract list size : " + contractList.size());
Here I am facing issue, when I try to run this its showing me error. The error message given below :
Sourced file: inline evaluation of: ``import com.sap.odp.ibean.*; import com.sap.odp.api.doccommon.masterdata.*; . . . \'\' : Cannot access field: ContractIBeanHomeIfc, on object: SessionContext( Swastik/-2147483547.-2147483547)
One More thing, HOW TO VIEW THE LOG MESSAGE FOR A SCRIPT ?
Thanks and Regards,
Swastik
Hi Swastik,
Script logs will be in the Sourcing log files which can be viewed from the NW log viewer. You can find more details in the blog below
http://scn.sap.com/community/sourcing/blog/2011/11/28/viewing-the-logs-in-sap-sourcing-70-on-premise
With respect to the error you are getting, the lookup method takes 2 arguments but it Looks like instead of a comma you used period as parameter separator. It should be IBeanHomeLocator.lookup(session, ContractIBeanHomeIfc.sHOME_NAME);
Hope this helps.
Regards,
Vikram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.