cancel
Showing results for 
Search instead for 
Did you mean: 

Error while using "edit" transaction on Equipment Object - SAP Work manager on Syclo Agentry

Former Member
0 Kudos

Hello Experts,

I am trying to execute an edit transaction on Equipment object. I have currently called the edit transaction using a button on Equipment Details screen as follows.

1) Created a transaction on Equipment object.

P

2) Properties have "EquipmentID".


3) Config. under this property:




4) the Update step under this transaction.



5) the action which calls this transaction:

6) Action steps:



7) Action step to call the transaction:


Apart from these settings, I have created the required screen set, required button, navigation, set up fields on the screen referring to the transaction and all other required settings.

Now, while running the application, I am able to navigate and pass the field values from details screen to custom edit screen.


While clicking on apply (green check button), it throws the following error:



What can be missing here? Is it mandatory to create a rule on Key property of the transaction? As of now, no rule exists on the ID as it is an edit transaction.


Any help will be greatly appreciated.



Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1) In the Button that calls the action for the editor, please make sure you have "Selected Equipment" for the target

2) In screenshot 3 you don't need say from other object, just use "From Object property"

3) You Action should be using "Equipment" object instead of "Main Object"

Former Member
0 Kudos

Hi Steve,

Thank you so much for your reply. along with these 3 steps, I also changed the action step to point it to equipment instead of "none" and it stopped throwing the error.

However, I got an exception while executing the BAPI using stephandler.

My source code looks as below.

Steplet:

public boolean execute() throws AgentryException {

    try{

   EquipmentEditStephandler handler = new EquipmentEditStephandler((com.syclo.sap.User)_user);
   handler.editEquipment();

    return true;

    }

    catch(Throwable exception){

    throwExceptionToClient(exception);

    return false;

    }

    }

StepHandler:

public void editEquipment() throws Exception{

        CustEquipment[] array = null;

        CustEquipment custEquipObj = new CustEquipment();

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

        bapi.run(custEquipObj);

        bapi.processResults();

        }

The BAPI code to set parameters:

public void setParameters(SAPObject obj) throws Exception

    {

   super.setParameters(obj);
   try {
   Logger log = new Logger(_user, "FetchBAPI_Java_Class");
   //Pass Transaction Vales to BAPI_WRAPPER
   JCO.Structure jcoStructure = _imports.getStructure("IS_EQUI_ADDR");
   String City = user.getString("transaction.City");
   setValue(jcoStructure, log, "CITY", City);
   String Country = user.getString("transaction.Country");
   setValue(jcoStructure, log, "COUNTRY", Country);
   String Name2 = user.getString("transaction.Name2");
   setValue(jcoStructure, log, "NAME2", Name2);
   String EquipmentID = user.getString("transaction.EquipmentID");
   setValue(jcoStructure, log, "EQUIPMENTID", EquipmentID);
  

}

catch (Exception e) {

   user.rethrowException(e, true);

   

   }

    }

while executing, the data structure that reaches ECC, is blank.

on the Java front, this exception is thrown:

Former Member
0 Kudos

In the ATE please make sure that all required fields are getting filled in.  THen you need to check to see if they are getting into your POJO.

Stephen

Former Member
0 Kudos

Hi Stephen,

the error got resolved now. With the settings that you mentioned, I also had to set the target of the action step to "Equipment". it is working fine now.

Thank you so much for your help.

Answers (0)