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

Locking in ALV

Former Member
0 Likes
1,785

Hi,

I have an ALV Report which has a button extract.

If I select a record and if the user presses extract button then it goes to another screen.

Actually my requirement is like only one user should extract at a time.

If one user is extracting and another user is extracting at the same time then i should get a message

saying that the extract is being locked by a particular user.

Did anyone work on this before?

Thanks

Hi,

I have an ALV Report which has a button extract.

If I select a record and if the user presses extract button then it goes to another screen.

Actually my requirement is like only one user should extract at a time.

If one user is extracting and another user is extracting at the same time then i should get a message

saying that the extract is being locked by a particular user.

Did anyone work on this before?

Thanks

10 REPLIES 10
Read only

Former Member
0 Likes
1,540

Is this one table or multiple tables that you extract from? Is/are they custom table(s) or standard SAP

table(s)?

You can create a lock object in SE11 and call the generated ENQUEUE and DEQUEUE function modules before your EXTRACT code executes.

Read only

Former Member
0 Likes
1,540

Hi ,

You can create a lock object using SE11 transaction.

Lanka

Read only

Former Member
0 Likes
1,540

Can't you achieve this with LOCK ENTRIES?

see FM's enqueue* and dequeue*

Read only

Former Member
0 Likes
1,540

Dear DN,

what exactly does the extract button do.If its picking up the data from the Database tables the it can be controles.say if it is using data from MARA the you have function modules..

ENQUEUE_E_PDTC_MARA for locking

DEQUEUE_E_PDTC_MARA for releasing the lock.

if its ztable then you need to create a lock object by yourself.Immediatley after creating the lockobjecttwo function modules are generated.

you can search them by...

goto se37

type enqueztab and then F4

you get two function modules

as enque_ztable

and deque_ztable.

once you look into the parameters of these FM's you would eaisly know the operations.

Hope this would help you.

Do reward points for useful answers.

Best luck.

cheers,

Suresh.

Read only

0 Likes
1,540

Actually this is not a table.

My requirement is that I have two screens.One has an ALV Report and the other is using Module pool. In alv report i have check number and a button PROCESS. If the user selects a particular record and then clicks on PROCESS then it goes to Module pool screen. I want to lock this check number so that only one user can go to module pool screen for a particular check number. THanks

Read only

0 Likes
1,540

Hi DN,

Are you using Classes or Function module for ALV.

You have to add code in User Command routine to define the procedure after you press the "PROCEESS" Button.

Lanka

As Pavan mentioned you can use ENQUEE /DEQUEE Locks or You

create Lockobject via T/code :SE11.

Message was edited by: Lanka Murthy

Message was edited by: Lanka Murthy

Read only

0 Likes
1,540

The better way to acheive this is

Please chek these FM

ENQUEUE_*

DEQUEUE_*

normally in place * u can give ur data element name for ur check no

-Pavan

Read only

0 Likes
1,540

What table is the check number in and is the module pool custom or SAP?

Rob

Read only

0 Likes
1,540

Lanka:

I am using FM's for ALV. This is the first time I am using. Can you give me an example of how to do this?

THanks

Read only

0 Likes
1,540

Table is DFKKCR and Module pool is customized.