Locked Records Indicator
Hi,
Here is the scenario:
We have several users (in AutoCAD) that retrieve, delete, modify, and post data back to Oracle Spatial DB (10g).
During data retrieval, we use the SDO_WITHIN_DISTANCE operator based from either a Road Name or Building Name with a flexible buffer distance. Now, the chances of the users having retrieved the same records are very high.
My query is, is there an indicator in the row level that will show that the particular record has already been locked/retrieved by another user? I have read about the "SELECT .... FOR UPDATE" system of locking records, but the problem would be the possibilities of having a "Lockout" or a "Deadlock". That is why, we would like to handle the records firsthand before displaying it into AutoCAD.
Knowing this, we can provide some mechanism in AutoCAD to avoid the record to be modified or deleted by another user (i.e. giving a read-only attribute, changing layer or color, etc. etc.).
Thank you very much for your ideas.
Regards,
Arnold Higuit
Depending on your requirements, you may want to do the initial query without trying to lock the records (if you do the select ... for update nowait on the initial query and there are records locked, it will fail).
After you do your initial query, then you can try to select individual records by a unique key for update (using nowait), and any record that is already locked can be styled in an appropriate way.
Note this will be significantly slower (selecting each individual record).
Similar Messages
-
Standard Report to display locked records of an infotype
Hi All,
Is there any SAP standard report to display the locked records of an employee.
Suppose for an employee his two absence record has been locked and one additional payment has been locked. Is there any SAP standard report to display his locked records.
Thanks and Regards,
Visali. MalepatiHi,
Hi there is no standard report to get the locked records.
You create a query thru quick viewer.
where you can heve selection field as lock indicator and Personnel number.
Steps:
1. Goto SQ01
click Qucikviewer
or
SQVI
2.Create a new query
Datasouce:Table
Table:PA0006
3.Lst field Selection tab:
Add the fields pernr,lock indicator,enddat,begdate.
4.Selection fields Tab:
Add the fields pernr,lock indicator
5.Execute:
Your Query is ready now: -
Custom Infotype not displaying locked records in the list screen (3000)
I have a custom infotype (9xxx) that will not display the locked records (locked indicator (sprps) is set to X) in the list screen (3000) in PA20 and PA30.
Any ideas on what may be causing the records to not display in the list screen?
Thanks,
TedHi,
for creating both employee and appliciant infotype you must check 'Both' in PM01 IT tab.
Regards. -
Lock records when in Update Mode / problem with 2 users on 1 document
Hi,
when user A updates e.g. a purchase order and user B goes into this purchase order and updates e.g. the remark before user A, then user A cannot save his changes. Imagine user A has put in several new lines and has made several price adjustments, his work will be gone.
In most cases this should not happen very often, but it could. Since B1 recognizes when another user has updated the document before, it should be possible to solve this situation more convenient (either by lock, saving to a new document, comparing to the old version, etc).
Thank you
SebastianHi Sebastian,
Your request is understandable. It may not have big problem to change current process by coding. However to lock records whenever in update mode, that could create too many locks. It is basically not good for performance. The trade off may be allowing save as function. However, this may not be a desirable solution for most end users.
Thanks,
Gordon -
How to lock record in a remote database ???
Hi All!
How to lock record in a remote table ??? Is it possible to lock by using the RPC ??? What are the options available ??
thanks
Sanjeeb Bose
HCL Infosystems Ltd
Kolkata IndiaDBLinks may be one option...
--Shirish -
Restrict the detail record based on the record indicator
Hi, i have a master detail form
when i query the form at header block it shows all the headers say
header block
header, line num, desc
1, 1, pen
1 ,2, rubber
1 ,3, sketchpen
line block
line num, sub item ,cost
1 ,1.1, 50
1 ,1.2, 60
2 ,2.1, 70
2, 2.2, 5
it shows the output in this way
i want to restrict the line level block (say if my cursor is at record indicating row 1 in header) then in line level it should show
lines pertaining to line num 1 and header 1 --eg pen records
if my cursor is at line num 2 in header block, in line level block it should show only line num 2 details ie rubber details, how can i restrict this.
Thanks,Define the relation between header and detail
join condition : header.line_num = detail.line_num
delete record behaviour : non-isolated
prevent masterless operations : Yes
after this if you navigate, the detail records will automatically gets queried accordingly.
Regards
Dora -
Reading Locked records from HR table using LDB PNP
Hi,
I am trying to read the table pa0168 using LDB PNP.
But the problem is that get pernr staement does not retrieve locked records i.e where PA0168-sprps eq "X'.
Can anybody help me with this.
I have to use LDB so i don't want a solution of writing a select * for the pa0168 table.
hence i have to use get pernr statement but it should also retrieve locked records.
how can i achieve that.? please help
Thanks
GT
Message was edited by: GTHi GT,
In the START-OF-SELECTION event, set the parameter value
pnp-sw-ignorelockedrecords = 'N'.
Good Luck,
Suresh Datti
( Pl award points if the answer helps you ) -
How to lock records in 8.1.7?
Hi,
How can I lock records in 8.1.7 so that only one user can select/update these records at one time? If possible, can it return an error mesg if one user try to select/update records locked by others?
Thanks a lot.
DavidOracle automatically locks a row just before updating or deleting.
You can lock rows explicitly before doing an update etc by selecting it for update:
select * from emp where empno=21 for update;
update emp
set sal=sal*1.1
where empno=21;
commit;
The lock will be released on the commit (or rollback).
Please note that in Oracle, writers never block readers and readers never block writers. Which means, that although you have locked a row (or group of rows) for update, other users will still be able to select against those rows (in the pre-changed or consistant state). -
How to get locked records of a pernr while using PNP LDB
is there any way to retrieve locked records of a pernr
while using PNP LDB??currently the get pernr event is unable to load locked records of a pernr.Hi,
PL use this piece of code in your Program..
INITIALIZATION.
PNP-SW-IGNORELOCKEDRECORDS = 'N'.
Regards,
Suresh Datti -
Hi all,
I have a scenario where i have to lock the lookup table records for editing. So that other users cannot edit the record.
I am processing the lock record command for records which are not locked by other session (LOCK_BY_OTHER_SESSION).
Lets say User A lock the records.
I am loging in to the data manager using User B. When i try to edit and save the locked records data manager should warn me with a message like "Record has been locked by other user. would you like to edit anyway?". But i am not getting any warning message.
I doubt the records were not locked by user A.
Is my understanding correct? Am i missing any step here? Please help!
Best regards,
Arun prabhu SFound the answer!
Lock will be lost once the user session destroyed. -
Hi All. I use Firebird DB with WLS. In Firebird when no DataBase transaction parameters specified the default parameters is set. By default transaction isolation levels is "concurency, wait". It means that when 2 concurrent transations try to lock record (select ... from table for update), second transactoin waits while the first will be complete. I need exception in this case (nowait in transactoin parameters).
In Firebird JDBC driver there is a file with mapping to standart jdbc transaction isolation levels:
TRANSACTION_SERIALIZABLE=isc_tpb_consistency,isc_tpb_write,isc_tpb_wait
TRANSACTION_REPEATABLE_READ=isc_tpb_concurrency,isc_tpb_write,isc_tpb_wait
TRANSACTION_READ_COMMITTED=isc_tpb_read_committed,isc_tpb_rec_version,isc_tpb_write,isc_tpb_wait
I change wait to nowait in this file, bat i dont no where i can set transaction isolation level on weblogic server. How I can do this?In the on-lock trigger, instead of Lock_record; you should write your own sql "select for update no wait".
Then I am not sure... either write your own exception clause to trap the ORA-00054, or trap the exception in the on-error trigger. -
I have created a Form on a table with report.
Now I want to create a record indicator in my report.
(so I know the report line I'm working in, in my form)
Thanks, regards RobbertI assume that you have the Form and Report all on the same page.
If so you will have an item (e.g. :p1_record_id) on the page that is populated with the id of the record you are editing. Use that in a DECODE in your report query to display a flag for the row currently being edited e.g.
SELECT
DECODE(empno,:p1_record_id, 'Flag') x,
ename,
job
FROM
empShunt -
Lock records (urgent)
Dear members,
I hava a problem with lock record. Would you please help me to solve my problem. I had read on OTN messages about locking records that others members have used the following:
On_lock trigger(Block level)
Lock_record;
On_Error trigger(Form level)
DECLARE
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
BEGIN
IF errnum = 40501 THEN
message('This record has been locked by another user');
ELSE
Message(errtyp||'-'||TO_CHAR(errnum)||': '||errtxt);
END IF;
RAISE Form_Trigger_Failure;
END;
I still received the ORACLE message "COULD NOT RESERVE RECORD(2 TRIES). KEEP TRYING? YES OR NO".
If I select "NO" my message will come up, but I want the ORACLE message suppressed. How do I do that!
THANKSIn the on-lock trigger, instead of Lock_record; you should write your own sql "select for update no wait".
Then I am not sure... either write your own exception clause to trap the ORA-00054, or trap the exception in the on-error trigger. -
Duplicate Data Records indicator / the handle duplicate records
Hi All,
I am getting double data in two request. How can I delete extra data using "Duplicate Data Records indicator ".
I am not able to see this option in PSA as well as DTP for "the handle duplicate records".
can u help me to find the option in PSA/DTP.
Regards
Amit SrivastavaWhat Arvind said is correct.
But if you can try this out in an End Routine, this may work, Not sure though.
Because then you will be dealing with the entire result_package.
Also, say if the target that you are talking about is a DSO, then you can Delete Adjacant Duplicates in Start Routine while updating it into your next target. That can be a cube, for ex. -
Locked record in infotype 0167
Hi,
I would be thankful if some one can explain me the concept of lock record of an employee in infotype 0167.
As in one of my requirement i have to fetch both the records ie active and locked (having same begda and endda).
Is there any specific thing i need to do apart from
INITIALIZATION.
pnp-sw-ignorelockedrecords = 'N'.
Regards
ManuHi Manu,
Locked record means taht record id not yet ready to process / use in reporting, becuase that data is insuffient. You can lock/unlock a infotype record using pA30-0167-edit-Lock/Unlock option.
For example infotype 2001 or 2002.
Regards,
Ranjith
Maybe you are looking for
-
hi i'm getting this error when i'm creating in projects implementation superuser HR foundation - Enter AND maintain APP-PAY-06041: you cannot use the enter resource form because human resource is fully installed. Instead use the Human resource people
-
hi This is ravi I am working with OATS function scripting.After my record was completed when i tried to play back the script some of the text boxes data are not recognizing by the tool. Eg:when i am recording the script i am using country name as den
-
Is there any tools in an Oracle database or by Oracle to encrypt data in the database in 8.05 database or earlier? In versions above 8.05 - 8i and above, is the PL/SQL Encryption Toolkit free with the database or is it an add on package. Thanks
-
Problem when deploying on tomcat two applications with same appmodule name
We have deployed two different adf-uix applications to a tomcat application server. Each of the two applications has one application module, the two application modules have the same name. This seems to cause a conflict between the two applications.
-
Migrating Oracle EBS 11i to Linux OEL 5 64bit
Hello Experts! My company is planning to migrate our EBS 11iR2 to Linux 5. Please someone can tell me what will be a good step to start. We are on Oracle Database 9iR2 and it is on Sun 32Bit OS same as Middle Tier. We want only Middle Tier to be migr