How to lock an user defined transaction for some time during which no user can access the same?
Use transaction SM01. Scroll through the transactions and check against the transaction to be locked. And after the maintenance is over, go back to SM01 and uncheck the same to unlock.