Skip to Content
0
Former Member
May 19, 2010 at 11:23 AM

batch insert - update tables (related by foreign keys) simultaneously

103 Views

Hi,

I have two tables that are connected by a foreign key.

I am using two batch transaction like:

  PERFORM bdc_transaction USING 'SM30'
                          CHANGING p_subrc.

With this I first update one table and then i do a refresh to the bdcdata restart the filling process of the bdcdata and then perform a new transaction.

The issue is that i want to prevent that if the second table is somehow being used by someone how do I assure that there is rollback and that no data is inserted in both the tables.

Remember that the bdc_transaction allways performs a commit work.

If there is a better way to do this than recorring to transactions please mention it.

Best regards,

Luis