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

ENQUEUE_ESINDX--lock a report

Former Member
0 Likes
1,789

Hi all.

When i use this FM to run my report by frontend , then i can relize this requirement that prevent two users run this report at the same time

But when i run it in background, then i don't work, also can make two users run this report at the same time ?

How can do it ?

Hi all.

When i use this FM to run my report by frontend , then i can relize this requirement that prevent two users run this report at the same time

But when i run it in background, then i don't work, also can make two users run this report at the same time ?

How can do it ?

1 REPLY 1
Read only

Former Member
0 Likes
854

I created a lock object (se11) called EZABAP to solve this problem.

Sample FM call below:

call function 'ENQUEUE_EZABAP'

exporting

name = sy-repid

exceptions

foreign_lock = 1

system_failure = 2

others = 3.

if sy-subrc <> 0.

message e003 with sy-msgv1 sy-repid.

stop.

endif."subrc

The message states who is running the program and tells user to try later.

Best!

Jim