Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

LOCK Table Overflow issue with 50K lock entries

Former Member
0 Kudos

Hi All,

I'm facing with lock table overflow issue in one scenario . There are around 50K lock entries that are causing this when executing a material

creation or change.

The FM used in the report is BAPI_MATERIAL_SAVEREPLICA  .

When doing the report execution using this FM the locks are created and cleared after the Bapi is executed.

Option of increasing table size category is ruled out as already we have max cap size on this.

Just let me know if anyone has any hint on handling this lock table overflow issue .

Thanks for your time.

Br,

Vijay

1 ACCEPTED SOLUTION

SimoneMilesi
Active Contributor
0 Kudos

Hello Vijay,

How many material are you processing each time?
If you put 50k materials in the input tables, you'll see 50k lock entries.


Remember always to put BAPI_TRANSACTION_COMMIT / BAPI_TRANSACTION_ROLLBACK.

Even more, try to "break" in smaller amount of record the processing to avoid the overflow

Simone

3 REPLIES 3

SimoneMilesi
Active Contributor
0 Kudos

Hello Vijay,

How many material are you processing each time?
If you put 50k materials in the input tables, you'll see 50k lock entries.


Remember always to put BAPI_TRANSACTION_COMMIT / BAPI_TRANSACTION_ROLLBACK.

Even more, try to "break" in smaller amount of record the processing to avoid the overflow

Simone

0 Kudos

Hi Simone,

Thanks for the reply. The records are processed one by one .

I ve found the root cause and the issue is coming from the FM when error record is being processed. When ever Bapi is returning an error record the Standard FM is in enque and the records are locked . For next record iteration the old lock is present in sm12 and for the current record if its error then lock's are getting accumulated . This was the reason when two programs were doing update and the locks keeps accumulating overshooting the enqueue total size .

For the error scenario I 've used rollback and locks are released.

Now the issue is resolved and in testing.

Br,

Vijay

Jelena
Active Contributor
0 Kudos

Glad to hear it's resolved, kindly close the discussion.