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

Transaction locking

Former Member
0 Likes
514

Hi All,

I would like to know how we can lock a transaction for a certain period of time.

For example, if there is a transaction zfics_ui which is executed by a user, then for the next 10 minutes another user should not be able to run this transaction. In other words, the second user should get a message that the transaction has been locked and the other user cannot trigger the transaction until the first person has finished processing of the transaction.

Regards,

Sushanth H.S.

1 ACCEPTED SOLUTION
Read only

former_member222860
Active Contributor
0 Likes
468

Hi,

U can lock/ unlock the transaction in Trx. SM01

regards

Mahesh

3 REPLIES 3
Read only

former_member222860
Active Contributor
0 Likes
469

Hi,

U can lock/ unlock the transaction in Trx. SM01

regards

Mahesh

Read only

Former Member
0 Likes
468

HI Sushanth,

Use SM01 transaction.

IN the last empty input field.. just enter the transaction you want to lock.... and press enter.. then check the check box of that transaction name and press LOCK/UNLOCK.

Then this transaction will be locked..

Regards,

Nitin.

Read only

Former Member
0 Likes
468

beacuse this method directly updates an SAP table, i do not recommend it, but...

the lock information is stored in table TSTC, field CINFO, bit 3.

here is a code FRAGMENT to help you should you decide to do this. it works, but i give no guarantees. use it at your own risk.

(selected is a field string read in from table TSTC for a specific tcode)

(plock and unlock are radiobuttons on the selection screen)


    case 'X'.
      when plock.
        set bit 3 of selected-cinfo to 1.
      when punlock.
        set bit 3 of selected-cinfo to 0.
    endcase.
    update tstc from selected.

again, i totally disavow any use of this code.