Skip to Content
0
Former Member
Jul 21, 2005 at 03:19 AM

Commit - Within Loop

114 Views

Hello All,

I am stuck up with ABAP Dump - DBIF_RSQL_ERROR.

In my code i am fetching data from database tables ZOMLT and ZOMLG. The main objective being delete the orphan entries

available in ZOMLT. (ZOMLT and ZOMLG have 5 primary keys in common)

Step 1 : Based on conditions i have retrieved data from ZOMLT.

Step 2 : Retrieved data from ZOMLG and placed them into i_ZOMLT and i_ZOMLG internal tables respectively.

The total records that are selected are for ZOMLT - *38838 and for ZOMLG - 10622.

I have declared a variable of size 6 as a counter to get the total number of records in internal table, that is the reason

why the * (So, the reords fetched cross the 6 digits).

Step 3 : Then i am looping at i_ZOMLT and reading i_ZOMLG.

If the records available in ZOMLT does not match with the record present in ZOMLT i build the Orphan internal table (IF

SY-SUBRC NE 0 then build Orphan itab).

The total records in the Orphan tab is *17594, this is the place i get the ABAP/4 processor: DBIF_RSQL_SQL_ERROR - no more

locks available.

Once the Prohan table is populated i use the mass delete statement DELETE ZOMLT client specified from ITAB ORPHAN_TAB.

Would be great if your views/suggestions are provided on how to retrieve a smaller data from ZOMLT and ZOMLG and delete the

entries and then proceed for further data.

Regards,

- PSK