How check if selected record already locked?
Hi everybody,
Please, how can I check if selected record(s) already locked by another user
to prevent Oracle error.
Thank you.
Dmitry
Great question. You can use a product called CleanEnter to prevent duplicates being created for Contacts (or Accounts or Leads) by checking against ANY field you wish including the Custom field you are mentioning.
To learn more about CleanEnter, go to http://www.activeprime.com/cleanenter/
Happy to discuss if you would like.
Cheers,
Greg
[email protected]
617-247-9908 x21
Similar Messages
-
How to leapfrog selected record and going to the next one
Hi ,
My DB 11G , OS Linux Redhat ,
i have a Linux script to read the name of the files listed on the Table , then open those files and save the content on another table , i need to speed up the process by running this script multiple time , so i need to
read the first record (File name ) then running the script again to check if the record already selected then go to the second record and so on .
is there any way to check the selected row then leapfrog this record and going to the next record .
Im already tried (for update skip locked ) but this will return ( no row selected message when locked ) and when running on the 2 Scripts it will considering it as same session and always will be the same .
my query is (
select bi_file_name
from dbm_cdr_head
where bi_file_name like 'hd_auto%' and bi_auto_status=35;)
thanksReally its about 1 million file per day ( Telecom CDRS Calls Details Records) updated every minutes , i think its very difficult to keep track by External Tables ,
thank you for you advice about advanced queuing i will going to read about this new concept for me -
How to find a record is locked?
HI,
My problem is I want to know before deleting or updating
whether the record in question is locked or not.
if locked I would like to just flash a message and come out
other wise delete or update the record.
thanx in advance
sreekantTry a SELECT...FOR UPDATE NOWAIT.
If the required row is already locked, you'll get an ORA-00054
error ("resource busy with NOWAIT specified"). You can write an
EXCEPTION handler to inform the user. If the row isn't already
locked, this has the effect of locking it for you.
HTH -
How to get selected record details when single selection is used in a table
Hi All,
Inside a query region I have created a table using region wizard,for this table I have added a singleSelection Item. What I want is , on selection of a particular record i want to update or view that record in a new page , for this I have added update and view icons in each row.
But I am unable to get the particular selected record
OATableBean tableBean = (OATableBean)webBean.findChildRecursive("ResultTableRN");
OASingleSelectionBean singleSelection = (OASingleSelectionBean)tableBean.getTableSelection();
For this singleSelection object I was unable to find any method which will give the value of the view attribute associated with it.
Anybody any suggestions regarding it ?
Thanks in advance,
Anant NImbalkar.Hi Anant,
here is how you have to do it
1) you need to enable PPR on that Singl selection , by changining the Action type =fireAction.
2) define the envent , EVENT
3) define paramters for that event. This is place that gives you handle to the Attribute of VO.
So you can define paremters such
Name = PARAM1
value =${oa.EqxContactPrivEOVO1.ContactPrivilegeId}
You can define as many paramters as you can for the vo field that u wanted to have.
Now in the procesformRequest() , all you do it handle the event EVENT and get the parameters
if ("EVENT".equals(pageContext.getParameter(EVENT_PARAM)))
String accountid= pageContext.getParameter("PARAM1");
You can refer developer guide for further details. -
How to display selected records on one HTML page?
Hi,
I would like to display selected part of records on one page in HTML region. For example I have a Master - Detail table set named Procedures and Tasks (each Procedure can have one or more tasks)
I would like to be able to display all Tasks for a given Procedure in one HTML region on a page... The problem is that the number of tasks vary between procedures and can change in time. Also, the 'task description' can be very large so a simple report list of all tasks is something I cannot use... (I would like eg for the task name to be here, and the task_description to be there - unlike the report where everything is in one line...) The following are my ideas but non of them seemed to be feasable here...
1. Use a report based on vertical columns (However I am using Theme 10 for which there are no vertical column templates. The only vertical templates I can see are the default ones but I have no idea how to customize them - where are they?)
2. In HTML region use &ITEM_NAME. substitutions. In order to display more than one &EMN_NAME. (based on eg. EMPID) I suspect that I would need to write some kind of javascript loop. Has anyone have an idea about how would such a script look like?
3. Display each Task in a separate screen. This is something I would want least but better than nothing - to have a customized report which would display one task at a time with some kind of pagination to it...
Please let me know if someone has tried something simmilar or maybe there is a 4th option which will be simpler and easier...
Many thanks,
Pawel.
I tried to make a very simple illustration of what I would like to achive here:
http://htmldb.oracle.com/pls/otn/f?p=44995:3:9461299983704828937::::
Message was edited by:
padmochoJust to answer this one myself....
In order to achive the above I used a PL/SQL Dynamic Content page and entered a html content in htp.prn('');
Then, I created a PL/SQL LOOP which searches through the various rows...
In the end, whenever I wanted to display html content I just used htp.prn and for variables I used htp.p(<var_name>);
Maybe, it helps ;) -
How can I select records from a DB table with intervals?
Hello,
Suppose my DB table is having 20 lakh records. I need to fetch 50000(for eg, this number may change ) records intially then the next 50000 records and so on , so that I never get a runtime error "memory low".
I can select the first 50000 records using "select up to " statement but once i select the first 50000 records how can i fetch the remainning records as parts.
Please help.Urgent.
Neeraj.Hi,
Use packaze size statement in select statement.
EX: This is syntax.
SELECT ... INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE <itab> [PACKAGE SIZE <n>] ...
1. If you want first 50000 records and do the required functionality with those and refresh the 50000 records and go for next 50000 means use
SELECT CARRID CONNID
FROM SPFLI
INTO CORRESPONDING FIELDS OF TABLE ITAB
PACKAGE SIZE 50000.
ENDSELECT.
2. If you want to append all records means
SELECT CARRID CONNID
FROM SPFLI
INTO APPENDING FIELDS OF TABLE ITAB
PACKAGE SIZE 50000.
ENDSELECT.
Don't forghet to reward if useful.... -
How to delete selected records in PSA?
Hi,
I want to delete two records from PSA, but in PSA delete option is disabled, how can i delete two records from PSA,
is it possible or not,
Regards,
Venkat.Hi Venkat,
As already mentioned by Ansel you can use a DTP filter to achieve this.
In the DTP, on Extraction tab, where it says Filter, click on it in change mode and there it gives you an option to create a routine.
Write a routine for your logic and execute.
Regards
Hemant Khemani -
How to get selected records from an ALV Grid in some other internal table
I am using a standard SAP program (RFKKMA02) in a Z program. Now i want to select some rows in ALV and after doing some modification, i want to store those records in some other internal table. I am not using OO concept.
Thanks in advance.u create first internal table of structur of fields that u want to copy and then move taht values to internal table
-
Spreadsheet : How to force select record to row 1
I have a spreadsheet output that will display 1 to many rows depending on the query parameter. I want the selected row to default back to row 1 after re-running the query that populates the spreadsheet.
Currently, when I select spreadsheet row#2, this triggers another query that pulls additional data according to the selected row. The problem is this: when i run the initial query that re-populates the spreadsheet and there is no record or row #2, Xcelsius throws a parameter error message because the 'refreshed' spreadsheet still has the focus set on 'row 2' from the previous step.
What is the best way to get passed this where each time i run the query that populates the spreadsheet and that it focuses on row 1 always.
I've tried setting the properties to 'select row 1' doesnt solve the issue.Just a thought:
The select row 1 option will work only when the object is loaded to the memory. So to solve your problem, find out a way to hide the object when you fire the query using dynamic visibility and then unhide when the query returns the result. This way you may be able to make use of select row 1 option. -
How to delete selected records from process form child form
Hi,
I have one child table attached to process form which has 6 columns.
I have added 3 rows to the child form . if i tried to remove any row from the form always the first record is removing even though it is not selected to remove. I have coded according to Re: Removing from Child Process Form
Please help me
thanks in advanceCan you tell us the code you had written?
Regards,
A -
How to pass selected records from one table to another ?
Hi,
In my view i have designed a table with certain records. I need to pass only specific records of this table to another table which been designed in another view. Can anybody please give sum idea for this.
Rgds
Sudhanshuhi,
Refer the below code:
1. I have selected some data from the table.
2. The selected data is moved to some other internal table.
3. Internal table is further binded to the node in which data is to be shown.
data : lo_nd type ref to if_wd_context_node,
lo_nd1 type ref to if_wd_context_node,
lt_temp type wdr_context_element_set,
wa_temp type ref to if_wd_context_element,
ls_node1 type sflight,
lt_node1 type STANDARD TABLE OF sflight.
lo_nd = wd_context->get_child_node('CN_MAIN'). <CN_MAIN is my node>
CALL METHOD lo_nd->get_selected_elements <here selected data is moved to lt_temp>
RECEIVING
set = lt_temp.
loop at lt_temp INTO wa_temp.
CALL METHOD wa_temp->get_static_attributes
IMPORTING
static_attributes = ls_node1. <Selected data in work area.>
APPEND ls_node1 TO lt_node1. < Data moved to internal Table>
CLEAR ls_node1.
ENDLOOP.
Finally Internal table is binded to the node required.
lo_nd1 = wd_context->get_child_node('CN_MAIN2').
lo_nd1->bind_table( lt_node1 ).
In your case , map this CN_MAIN2 with the Component Controller and from component controller you can access data in your second view also.
I hope it helps.
Thanx.
Saurav. -
Query to select records between 2 different times
Hi all,
With trap_store table as (trap_id number,trap_received date))
and trap_time table as (from_time varchar2(10),to_time varchar(10))
How to i select records from trap_store table where time part of trap_received is between from_time and to_time of trap_time table.
Need to retrive records from trap_store table between 2 times. data in from_time and to_time(varchar columns) are stored in format HH24:MI:SS
from_time and to_time range can span over 2 days ie; from_time can be 23:00:00 and to_time can be 01:00:00
Thanks in advance,
Sreekeshava SHi,
Here's one way:
WITH got_received_time AS
SELECT trap_id, trap_received
, TO_CHAR (trap_received, 'HH24:MI:SS') AS received_time
FROM trap_store
SELECT trap_id, trap_received
FROM trap_store s
WHERE EXISTS (
SELECT 1
FROM trap_time
WHERE ( from_time <= to_time
AND s.received_time BETWEEN from_time
AND to_time
OR ( from_time > to_time
AND ( s.received_time <= from_time
OR s.received_time >= to_time
;If you'd care to post CREATE TABLE and INSERT statements for a little sample data, and the results you want from that data, then I could test this. -
How to check if the file already exists in the client directory
Hi all.
I'm on devsuite 10g. I'm using webutil to download files from DB using webutil function db_to_client.
What I need is to check if the file already exists in the client directory and if yes to display a message to ask the user if he wants to overwrite or no. How can I make this???
Here is the code that I'm using to download the file.
Thanks all for the collaboration.
Fabrizio
declare
file_path varchar2(2000) := null;
BEGIN
/** I ask where saving the file on the client machine **/
file_path:= webutil_file.file_selection_dialog
(directory_name => null,
file_name => :bin_docs.name,
file_filter => '',
title => 'Saving file',
dialog_type => save_file, --save_file
select_file => TRUE);
/** I download the file from DB to client **/
if webutil_file_transfer.DB_To_Client_With_Progress
( file_path ,
'BIN_DOCS',
'DOC' ,
'doc_id = '||:bin_docs.doc_id,
'Downloading file',
' '||:bin_docs.name) then
msg_alert('Download del file avvenuto con successo','I',false);
else
msg_alert('Si è verificato il seguente errore in fase di download '||SQLERRM,'I',false);
end if;
end;How about something like the below:
Note: I have a yes/no alert to asking if they want to over-write the existing file.
DECLARE
file_path VARCHAR2(2000) := null;
over_write BOOLEAN := TRUE;
BEGIN
/** I ask where saving the file on the client machine **/
file_path:= webutil_file.file_selection_dialog
(directory_name => null,
file_name => :bin_docs.name,
file_filter => '',
title => 'Saving file',
dialog_type => save_file, --save_file
select_file => TRUE);
IF webutil.file_exists(file_path) THEN
/** check a file by the same name exists in the selected directory **/
IF show_alert('Ask_overright') != alert_button1 THEN
/** If we say no then set over_write value to false **/
over_write := FALSE;
END IF;
END IF;
IF over_write THEN
/** I download the file from DB to client **/
IF webutil_file_transfer.DB_To_Client_With_Progress
( file_path ,
'BIN_DOCS',
'DOC' ,
'doc_id = '||:bin_docs.doc_id,
'Downloading file',
' '||:bin_docs.name) then
msg_alert('Download del file avvenuto con successo','I',false);
ELSE
msg_alert('Si è verificato il seguente errore in fase di'
||' download '||SQLERRM,'I',false);
END IF
END IF;
END;
cheers
Q -
How to know whether record is already there in lsmw to create or change
Dear Freinds,
How can we know whether a record is already exisitng in the database ,
for us to decide to do the LSMW in INS or MOD.
I mean to say if for a record already exisits in the database (ex pa0002) and we are doing a LSMW , How can we check a record already exsits in the database and modify of that record and if doesn't exits go for create option. Please let me know in which step we can do this validation?
Regards
syamlaHi Atish ,
How can i do this , you said we can check whether we have to insert(INS) or Change(MOD) for a record in the database at Convert Data , At convert data i cannot
do the change as it is Standard program.
If you have any piece of code please let me know how i can do the same.
regards
syamala -
BCS Breakdown Check - how to adjust individual records?
Hi all,
I just arrived at a new client and have found several thousand inconsitent records.
Breakdown check shows us how many there are and also allows entry of a vlue for missing subassignments.
However, there is no option to adjust individual lines (not even to differentiate between totals records and journal entries), eg Item 800210 now requires breakdown by Partner Unit, however, there are 15 records with a blank value but only one line in breakdown check in which to enter a partner.
Obviously the user wants to enter different partners depending on further details (eg cons unit, amount, other breakdown values etc.),
where/how can such selections be made?Thanks Dan,
Here is a response from SAP developers themselves:
If a customer introduces a new breakdown later and adopts old data, it
is very appropriate a fair to fill the newly introduced breakdown by one fixed value in all old data records. Otherwise, we would project a
degree of detail into historic data records, which was not available at
the time when these records were created.
So, this requirement does not make really sense, and we cannot support
it. For historic records, we only support entering one fix breakdown
value for all affected records. From that time on, the customer can of
course maintain a higher degree of detail on new postings.
Maybe you are looking for
-
How do I designate an e-mail to use to "send a link" from the File menu?
When I have a web page open that I want to send to someone through my e-mail, I try to use "Send Link" in the File menu. When I click on it, nothing seems to happen. How do I link that command with my e-mail account?
-
Problem while connecting the Weblogic Domain to MySql5.
Hi, I would like to send you the entire stacktrace.. JAVA Memory arguments: -Xms256m -Xmx768m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=192m WLS Start Mode=Development CLASSPATH=;C:\WEBLOG~1\patch_wlw1030\profiles\default\sys_manife
-
What's the right way to enter a URL addy?
I have a flash site that links out to plain html pages. I created text links in Flash that are SUPPOSED to open the html pages. What the heck is the correct way to type them in? My site exists in a file called August10SixthMan. This file has a "Site"
-
FLV in SWF over the web. Possible or Not?
Is it possible to insert an FLV in a captivate project, publish it, and upload it to the web and watch it??? apparently not. It works locally, it works if you publish to the 'C:\' drive and then download the file to another person's 'C:\' drive and o
-
Win98 / Mac OSX networking after OS 10.4.6
I have the following problem: I have a LAN with W2000, W98 and MAc OSX computers. The W98 computers could normally log to the MacOSX computer since they have the same username and no password. I just had to click on the OSX and I was in my user direc