How to handle Oracle Locks on Receivables Tables
I am trying to create and approve AR Adjustments using standard APIs ar_adjust_pub.create_adjustment & ar_adjust_pub.approve_adjustment, issue is I am using a loop for a cursor, inside the loop I am calling APIs to create and approve adjustments.
During the loop run, if any other user opens the transaction form in Receivables responsibility and query the transaction which I am adjusting using API, I am getting an error saying the transaction locked and nowait not specified. And the API exiting the process.
I saw the locked tables, RA_CUSTOMER_TRX_ALL and AR_PAYMENT_SCHEDULES_ALL are locked, when I closed the transactions form or commit the form, the API successfully creation adjustments.