Skip to Content
Nov 14, 2018 at 11:38 AM

Agentry Java BusinessLogicException in Steplet



When we are posting transaction data, calling the steplet from client, we hit an exception in Steplet class where we initiate the Handler. Below is the code structure for Customized PoJo Object/Steplet/StepHandler and BAPI. All these are configured in SAP Config Panel properly. when I debug I get BusinessLogicException in steplet where the _returnData is "null" due to<error(s)_during_the_evaluation>. Below is the code snippet.

PoJo Object Structure


public class ZXyz extends SAPObject{

Declare variables

Default Constructor()

Getters and setters for declared variables

public ZXyz(Table arg0) throws Exception{





public String getID() {

// TODO Auto-generated method stub

return null;



public void setNotes(Table arg0) throws Exception {

// TODO Auto-generated method stub



public void setProperties(Table tbl) throws Exception {

// TODO Auto-generated method stub



Steplet Structure


public class ZXyzSteplet extends Steplet{

public ZXyzSteplet(TransactionSession session)

throws AgentryException, BusinessLogicException {


// TODO Auto-generated constructor stub



public boolean execute() throws AgentryException {


ZXyzStepHandler handler = new ZXyzStepHandler ((;


return true;


catch(Throwable exception){


return false;


StepletHandler Structure


public class ZXyzStepHandler extends StepHandler{

Default Constructor

//Handler Method

public void createXyz() throws Exception{

ZXyz zxyzObj = new ZXyz();

ZXyzBAPI bapi = new ZXyzBAPI(user, new GregorianCalendar());;



BAPI Structure


public class ZXyzBAPI extends AbstractFetchBAPI{

public ZXyzBAPI(User u, GregorianCalendar lu) throws Exception {

super(u, lu);

user = (User) u;

// TODO Auto-generated constructor stub



public ArrayList<? extends SAPObject> processResults() throws Exception {

// TODO Auto-generated method stub

return null;

public void setParameters(SAPObject obj) throws Exception {


try {

// SAP Table name to update back transactional Values.

JCO.Table tbl = this.getTable("ZXYZ_FORM");

Define local variables to get transactional values

// Arraylist created to update as records

ArrayList<ZXyz> HSRiskRecordodList= new ArrayList<ZXyz>();

// Business Logic to iterate through transactional data and add as records

for(int i=1; i<18;i++){

ZXyz xyzObject = new ZXyz();




// Insert the number of rows into the table


// Looping Arraylist and updating records to SAP Table

for(int i=1; i<HSRiskRecordodList.size();i++)


setValue((Table) tbl, "AUFNR", HSRiskRecordodList.get(i).getWorkOrder());

} }

catch (Exception e) {

user.rethrowException(e, true);