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: 

Lock - custom Z function

Former Member
0 Kudos

Hi ,

I need some guide how to lock custom function e.g Z_FUNC_CALSALR, the scenario will be like this:

When ever user run program A that call this function , other user which also running Program B that call this function will be paused until the function release from lock status.

Appreciate , If any one can suggest me the work around on this.

THanks

Badz LEe

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Maybe you could be use a parameter Ztable.

The FM Z_FUNC_CALSALR set a flag on this table at start and reset this flag at end.

Program B has to check this flag to know if the function is running.

Regards,

Giuseppe

3 REPLIES 3

Former Member
0 Kudos

Hi,

Maybe you could be use a parameter Ztable.

The FM Z_FUNC_CALSALR set a flag on this table at start and reset this flag at end.

Program B has to check this flag to know if the function is running.

Regards,

Giuseppe

former_member125931
Active Participant
0 Kudos

Hi,

Use FM:RS_ACCESS_PERMISSION to lock/Unlock your custom function module,once your function module get locked any other person could not suppose to use the same so throw a message in this case ,after every call Unlock it agian by calling same function module.

Thaks and regards,

Sree.

kesavadas_thekkillath
Active Contributor
0 Kudos

If you want to lock a function module then you have two use these two function modules

DEQUEUE_ESFUNCTION

ENQUEUE_ESFUNCTION

Pass FUNCNAME = you function module name to ENQUEUE_ESFUNCTION for locking and DEQUEUE_ESFUNCTION for unclocking.

Use these functions in your function module or outside it as required.