-
Allocate and start LocalTransaction:
connection.getLocalTransaction().begin();
-
Create Interaction and Records , then fill records with business data.
-
Execute the first call:
MappedRecord output1 = (MappedRecord)interaction.execute(null, input1);
-
Evaluate output1 and using it fill the new input2 with some data.
-
Execute a second call:
MappedRecord output2 = (MappedRecord)interaction.execute(null, input2);
-
Execute more calls, if needed
-
If all this calls were proceeded successfully, then commit LocalTransaction :
connection.getLocalTransaction().commit();
-
After COMMIT , all statements written with UPDATE TASK in ABAP will be persisted in the target data base.
-
Otherwise execute a ROLLBACK by calling:
connection.getLocalTransaction().rollback();
In this case all statements written with UPDATE TASK will be discarded.