Application Development and Automation 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: 
Read only

Locking record in a table?

Former Member
0 Likes
641

Hi,

Here is my requirement.

I am updating equipment through transaction IE32. I am using BDC update using call transaction. Now before I do call transaction IE32 I need to check whether that particular equipment is locked or not. for that I am using enqueue_lockobject to lock the record in EQUI table. If sy-subrc returns 0 means record is locked & if it is not 0 that means reord in not locked. In case where record is not locked I will do BDC update using call transaction IE32 but as I have locked this particular record it is giving error saying equipment is locked. To solve this problem I have unlocked that record just before call transaction IE32.

Now the real query:

can I do bdc update using call transaction IE32 after I locked that particular record?

Or I need to unlock it before doing BDC update as I have done?

Plz help

Regards

Prafulla

3 REPLIES 3
Read only

Former Member
0 Likes
510

In general if you BDC, it will automatically lock the correcponding records. so no need to lock that externally.

regards

gv

Read only

andreas_mann3
Active Contributor
0 Likes
510

Hi,

you need not to lock eqp.,

because i think SAP locks/Unlocks eqp. in Standard-TA.

if eqp. is locked you got an error message from :

 CALL TRANSACTION 'IE32' USING bdcdata MODE mod MESSAGES INTO itab.

Andreas

Read only

Former Member
0 Likes
510

Prafulla,

It is not necessary to lock the records before u carry BDC . Doing so will even result in the BDC failure (Intrenal Error Message type : unable to lock the record).

Thanks

Kam