Error: User requested cancel of current operation - foreach not looping

Error: User requested cancel of current operation - foreach not looping

  

Good day Community,


I want to ask regarding this error, "ORA-01013: user requested cancel of current operation".


I keep getting this while copying the data from the external database to a local entity (cloud).


While debugging it, my foreach doesn't loop and would always stop in Create. This is my first time encountering this error.




Kind regards,

Louise Villanueva

Hi Louise,

Though I don't know what the Oracle error means, are you sure the assign in the loop is right? Given that the label says "OS_OITM.Current.OS_OITM", it seems that you are assigning the Current of a (probably empty) List, while I would expect it to be an assignment to an Entity variable.

Hi,


Looks like it's blocking at the database on that Create action (the error just the usual "timeout" message).

But I don't see any clear reason why it would deadlock there.

Can you try to put a CommitTransaction after the first loop and see if it solves the problem? (Note: Also a Advanced Query to delete all entries would be a lot more efficient than the first loop)


Regards,
João Rosado

Solution

Hi João and Kilian,


Thank you for the response. I already resolved it by adding a new unique id (autonumber) in my local copied SAP entity.


I was trying to copy three different SAP tables in my local copied SAP entity. I only added a new attribute TableName to distinguish which table they came from (this is to save object count hehe). The first and second table were copied without trouble but when it tries to copy the third table, there were items with the same ItemCode.


Before, I only have the ItemCode as my only unique id (I only copied the same attribute structure of the SAP table without adding new attributes since I'm only copying data). That's why it keeps on giving that error and blocking the next step.


Thank you again for the suggestions, I'll keep in mind the advance SQL for delete all. 


Best regards,

Louise

Solution