on 03-27-2014 12:04 PM
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.
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.