2006 Jan 19 7:48 PM
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
2006 Jan 19 7:55 PM
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.
2006 Jan 19 7:56 PM
Hi ,
You can create a lock object using SE11 transaction.
Lanka
2006 Jan 19 7:57 PM
Can't you achieve this with LOCK ENTRIES?
see FM's enqueue* and dequeue*
2006 Jan 19 8:03 PM
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.
2006 Jan 27 9:58 PM
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
2006 Jan 27 10:06 PM
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
2006 Jan 27 10:09 PM
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
2006 Jan 27 10:16 PM
What table is the check number in and is the module pool custom or SAP?
Rob
2006 Jan 27 10:17 PM
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
2006 Jan 27 10:20 PM