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: 

How to lock (enqueue) table that is too large for lock object

Former Member
0 Kudos

I'm trying to place lock objects on a table that is too large for it's own lock object (key over 300 bytes I think?).

Any alternative ideas on how to lock/unlock these records for change?

10 REPLIES 10

Former Member
0 Kudos

What's the table?

Rob

0 Kudos

Rob you're on fire today!

A crazy custom table with 154 fields and 16 key fields (key is over 150 characters in lenght).

0 Kudos

My only idea is to create a <i>duplicate</i> of this table with a smaller key and use that table for the sole purpose of locking and unlocking records (I'd check that table for locks before the user is allowed to proceed with the original large table).

I don't really like that plan much though.

0 Kudos

Do you have a lock object for the table? Does it not work?

Sorry - didn't see your previous answer. What error message do you get when you try to create it?

Rob

Message was edited by:

Rob Burbank

0 Kudos

Error: Total length of lock argument for table xxxxx longer than 300

Total length of lock argument for table xxxxx longer than 300

Message no. DI776

Diagnosis

For each base table of the lock object which is to be locked a lock argument is formed. For technical reasons this argument may be only 300 bytes long.

This limit was exceeded by the table xxxxx that is part of this lock object.

System response

The action was cancelled.

0 Kudos

Well, you could specify fewer key fields as the lock argument. You'd run the risk of locking too many records but you might be able to work it so that you can specify it almost uniquely.

For example, if begin date and end date were part of the key, maybe you could get away with only one of those in the lock argument.

Rob

0 Kudos

Yeah, have tried that too. Tried ONLY client. Still got the same error. I'm guessing that it will try to use the entire key and will continue to fail until the actual key of the table is smaller.

0 Kudos

OK - can you define this as a secondary table in a lock object. You would have to use a new primary table that has suitable foreign key relationships.

Rob

ferry_lianto
Active Contributor
0 Kudos

Hi,

You try to lock and unlock the database table using FM ENQUEUE_E_TABLE and DEQUEUE_E_TABLE.

Regards,

Ferry Lianto

0 Kudos

Ferry, that doesn't help. I'm trying to create a lock object for this table and I'm not allowed as it exceeds limits set by SAP.