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

Accessing Lock table contents

Former Member
0 Likes
820

Hi,

In one of my custom program I have locked the batches of MCHB, for this I have created a lock and object.

I would need afavor wrt to Locks.

Now after locking I wanted to see the contents or the batches that are locked so that would like to filter the locked batches and pick the unlocked ones.

Please do ehlp me out in finding a solution.

Bwaj.

Hi,

In one of my custom program I have locked the batches of MCHB, for this I have created a lock and object.

I would need afavor wrt to Locks.

Now after locking I wanted to see the contents or the batches that are locked so that would like to filter the locked batches and pick the unlocked ones.

Please do ehlp me out in finding a solution.

Bwaj.

5 REPLIES 5
Read only

Former Member
0 Likes
784

i dont understand..

do you mean see locked objects?? if so, go to transaction SM12

Read only

0 Likes
784

Hi,

I have written a program in SE38, locked the contents.

Now within the same program I wanted to get all the batches that are not locked by anyone. With my above logic who ever access data their batches got locked. To avoid duplicates we wanted to find a way to see the list within prgram and programmatically filter batches from total list.

SM12, we shall explicitly go and see.

Do let me know should you need any other inf.

Bwaj.

Read only

0 Likes
784

i think you want in your program, be able to see locked batches... try using function


 call function 'ENQUEUE_READ'
    EXPORTING
      gclient = gclient
      guname  = guname
      gname   = gname
      garg    = garg
    IMPORTING
      subrc   = subrc
    TABLES
      enq     = enq
    EXCEPTIONS
    exceptions
      communication_failure = 2
      others  = 1.
  if sy-subrc = 0.
    exit.
  elseif sy-subrc = 2.
    message w116.
  endif.

i only use parameter gClient and gUname. You should use whatever you need...

After call this function table enq is filled by all locks

Read only

0 Likes
784

Hi,

I am looking a bit similiar to this, I assume this would work. Will explore and let you know.

Thanks a lot for your quick sol'n.

Bwaj.

Read only

0 Likes
784

Hi Marcos,

Thanks a lot, this works for me. Appreciate for your help.

Bwaj.