2008 Dec 12 5:48 AM
Hi Expert,
i am modifing one database ztable from different program.before modifing i am locking the same table
after locking i am modifing the ztable.
But my question is if my table is already locked from 1st program than what will happen in the 2nd program which runs in between time . either modification will success or not in 2nd program.
Please provide me answer.
Thanks,
Shyam.
2008 Dec 12 5:59 AM
Hi,
As you are saying that you are locking the table in both the programs.
So you should go for table modification only when Lock on the table is successful else come out.
In case you are not locking the table and trying to modify the table at the same moment, SAP should through an error in form of DUMP.
and if the modification happens with a difference of fraction of seconds, the last run program changes would be written in the table.
Hope this helps...in case of any further questions pls respond back.
Regards,
Lalit Kabra
Hi Expert,
i am modifing one database ztable from different program.before modifing i am locking the same table
after locking i am modifing the ztable.
But my question is if my table is already locked from 1st program than what will happen in the 2nd program which runs in between time . either modification will success or not in 2nd program.
Please provide me answer.
Thanks,
Shyam.
2008 Dec 12 5:51 AM
Hi,
You can isse an error message saying another user is modifying the data and need to exit inorder to have consistant data.
there are types of LOCKS like E. X, S.
you can check VA02 or other tcodes this happens there/
Regards
Ramchander Rao.K
2008 Dec 12 5:59 AM
Hi,
As you are saying that you are locking the table in both the programs.
So you should go for table modification only when Lock on the table is successful else come out.
In case you are not locking the table and trying to modify the table at the same moment, SAP should through an error in form of DUMP.
and if the modification happens with a difference of fraction of seconds, the last run program changes would be written in the table.
Hope this helps...in case of any further questions pls respond back.
Regards,
Lalit Kabra
2008 Dec 12 6:03 AM
Hi Shyam,
Well if 1st program has locked a table & if 2nd program is trying to modify records from the same table, then it will get an error message if you have locked the table at TABLE LEVEL.
You can lock a table either at record level(Highly recommended) or at table level(this will lock the entire table & wont allow modifications to any records).
So in the 1st program lock only the record which you are inserting/modifying.
2nd program while trying to modify another record of same table would be succesfull.
2nd program while tyring to modify the same record which program 1 is modifying would result into an error message in 2nd program.
Once the modification is done, you need to release the lock. Sequence is as follows:
ENQUEUE_....
modify/insert/update
DEQUEUE_....
or DEQUEUE_ALLBest regards,
Prashant
2008 Dec 17 5:04 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |