A sequence number error in a form
I am currently creating a form with a sequence number in forms 10g
<pre>
table name: emp
table desc: emp_id number,emp_name varchar2(20),emp_no number
</pre>
i have to generate the emp_id automatically.
<pre>
create sequence emp_seq
minvalue 1
start with 1
increment by 1
cache 20
</pre>
I use pre_insert trigger in block
<pre>
begin
select emp_seq.nextval into :emp.emp_id from dual
end
</pre>
problem;
I can not insert a record because of sequence number in :emp.emp_id
no compilation error but there is no automatic sequence number appeared in :emp.emp_id after run a form.
It used to work before(fine with automatic sequence number in :emp.emp_id).
it happens after I changed layout format and someone add more columns in emp table.
eventhough i did not use sequence number in emp.emp_id
in pre-insert-trigger
<pre>
begin
select nvl(max(emp_id),0)+1
into :emp.emp_id
from emp;
</pre>
still can not show up any number in :emp.emp_id
please help me out
Thank you . It works now.
would you mind explain to me; what I can not use automatic sequence number in emp.empid text field in pre-insert-trigger in my case
is it trigger confliction in my forms?
Similar Messages
-
Sequence Number Generation in XML Form Buider??????
Hi All,
I want to generate some Sequence Number for each XML Form Generated by the XML Form Builder Application?
Ex: my XML Form Builder Application is "MYAPP". Using this I filled data and Save, then an XML will be created, then it should have some unique Number(say 1234), then if I fill the differennt Data and Save, then another XML will be created. For this the Number should be 1235, next 1236, ........
I can use the XML Form ID, but that is not User friendly format. Becaz I need to display this Number to the End User.
(Example: 10b2ae7b-e269-2b10-d88e-ddade2e62015.xml)
If anybody have idea on this, Please guide me...
Thanks&Regards||
Ashok M.
Edited by: Ashok Kumar Munugoti on Oct 16, 2008 8:04 AMclosing this Thread.
-
Sequence number in pre-insert form trigger
i have two tables invoice (master) inv_detail(detail) and assign the invoice number using a sequence number,
by writing the folowing code in the pre-insert trigger
select a.nextval into :inv_no from dual;
( i make the trigger at the form level becuause i have a master (invoice) and detail (inv_detail) relation at the same screen,so i must fetch the value of the
sequence into the :invo_no in the screen,to let the 'copy value from' property at the detail block works so the value of the foreign key will be copied from
the sequence number at the screen.
will this method be a good one for multi user envirment(to select the a.nextval in the pre-insert trigger at the from level?)Kevin, thank you for the correct explanation. I was making an assumption and of course it was wrong.
Mohannad, please do not try to link the invoice count with the sequence number. Any time you need a count, just do a select count(*). The sequence number is ONLY a unique key, and should represent nothing else.
People have discussed this situation heavily. If you insist on trying to ensure there are no gaps, you will:
1. Fail -- there are many scenarios where gaps will occur.
2. Waste your time.
3. Whatever process you build to try to prevent gaps will cause unnecessary overhead and work for the server, and in a multi-user environment, cause processing bottlenecks due to table locks. -
When I try to use sequence number while creating a materialized view,
I got errors:
create materialized view ruby_keywords
build immediate
as
select keyword, keyword_id_sequence.nextval
from (
select distinct name as keyword
from product
union
select distinct description as keyword
from product
Here is the error info:
SQL Error: ORA-02287: sequence number not allowed here
02287. 00000 - "sequence number not allowed here"
How could I solve the issue here?
The sequence is already created with the following statement:
create sequence keyword_id_sequence
start with 1
nomaxvalue;
Thanks,
Jtry creating a function and call the same function in the view.
SQL> select seq_id.nextval from dual;
NEXTVAL
43
SQL> create or replace view view_sequence as
2 select seq_id.nextval from dual;
select seq_id.nextval from dual
ERROR at line 2:
ORA-02287: sequence number not allowed here
SQL> create or replace function fnd_sequence
2 return number is
3 vSeqId number := 0;
4 begin
5 select seq_id.nextval into vSeqId from dual;
6 return(vSeqId);
7 end;
8 /
Function created.
SQL> select fnd_sequence from dual;
FND_SEQUENCE
44
SQL> create or replace view view_sequence as
2 select fnd_sequence from dual;
View created.
SQL> select * from view_sequence;
FND_SEQUENCE
45
SQL>note: i have only tried the view you may try it on a materialized view to see if it might work -
Sequence number over multiple adobe form calls
Dear all
I posted this question in another subforum - http://forums.sdn.sap.com/thread.jspa?threadID=1997461 - three days ago,
but nobody could answer, so I try to post it here.
We would like to have a sequence number for each page.
The Adobe Form gets called more than once, so the second call doesn't know, how many pages were printed already, thus it cannot continue the sequence number.
Do you have any ideas?
Of course, I would prefer not to publish an SAP-service only for this purpose...
(The transaction is HRFORMS, we would like to print a sequence number bar code, so that the packing machine to the envelope senses, if two pages are stuck together.)Hi,
I have a problem in printing current page number of an adobe form.
My requirement is that , my form got 2 pages. On first page i am not printing page numbers and excluded from numbering.
Numbering starts from second page. The second page needs to be repeated twice.
In this case my page printing should look like :
First page - no page number
second page - 1 of 1
Third page - 1of 1 (as it is a copy)
IF second page extends to multiple pages (eg.. 2)
First page - No Page no
First instance of second page - 1of 2 , 2 of 2
Second instance of second page - 1 of 2 , 2 of 2 . Presently it is printing like : 3 of 2 , 4 of 2. I need to initialize current page count. I could able to set the total page count 2 via variable from print program. But while printing the second instance, I am not able to initialize the current page count.
I have seen the following thread which exactly talks about my problem but with out any solution.
http://forums.sdn.sap.com/thread.jspa?messageID=10601698�
I have tried initializing the current page count in the initializing event and tried assigning the initial value when the second copy starts but for entire no of pages the same initialized value is coming.
Can anyone help me in this regard.
Thank You,
Regards,
Naresh. -
027: Unable to read the sequence number from the Workstation object
Environment:
NW 6.5 sp4
Zen 6.5 sp1
We had a problem with our inventory server processing .STR files a couple
months ago - had to turn off inv. policies on workstations while we resolved
it. Now it's resolved and we're running inventory again. We have a large
number of workstations reporting this error:
027: Unable to read the sequence number from the Workstation object
They have no data in the DB, although they do have minimal scan info, and
the last scan status date matches that of the sequence number error.
I've seen this sporadically in the past and have been able to resolve it by
initiating a full scan on the individual workstation. However, that does
not seem to be making a difference this time.
Novell's troubleshooting document basically says see if the server's
running, and see if there's data for the workstation in the db. Then call
tech support.
Any other ideas?
~~~Nicoya...Jared wrote:
> Nicoya Helm,
>
>> 027: Unable to read the sequence number from the Workstation object
>
> I am thinking that this can also mean a previous full scan was not
> found. Or maybe the STR file name is bad.
>
> This information is stored here
> HKEY_LOCAL_MACHINE\Software\Novell\Workstation
> Manager\InvScanner\"STRFileName"
The machines I'm troubleshooting have valid formats for their STR names,
but that doesn't necessarily mean they are valid STR sequence numbers.
Does removing the value in the reg key cause the STR file name to be
recreated?
>
> Because imaging is used, it's possible that this information is matching
> on some machines which could cause problems.
I've verified that none of our images contain the c:\zenworks history
folder, and we run a script that cleans up any zenworks items before
sysprep (i.e. makes sure there's no registration info on the
workstations, etc). Our imaging scripts also clear any ZIS info to
avoid any duplication as well, so I don't think imaging would be causing
this.
> I believe 6x also has a hist.ini file like 3x inventory does, you might
> delete the file also.
Good tip about the hist.ini file, I didn't know about that. It does not
solve the sequence number error, but it does seem to force a full scan
of the system and cause the new scan to be stored in the DB, which was
not happening before.
Thanks! -
Error While Generating Sequence Number. Contact your system Administrator
Hi All,
I have developed a form to provide our client with 'an easy to fill' User Interface. This form will be used instead of the standard form present in Business Suite.
Some columns of the table, on which form is based, are getting populated via generation of sequence numbers.
Now the problem is, after deploying custom form developed by me in the instance, Standard form is showing this error
" Error While Generating the Sequence Number. Please contact the System Administrator "
I am unable to trace why this error had started appearing..
Any suggestions would be of great help...
Thanks in Advance,..Forms version 6i,
Database version 9.2.0.6.0
Sequences which I am using are used there in Standard form also..
So evrytime i need to save the record, I am selecting NEXTVAL of it into
the respective item of the datablock.. -
Show the object and the line number, where the error happens in Forms
Hi!
Al lot of our programmer use the ugly when others clause to raise messages like "error <sqlcode> happens in ....". Often this hides the really error in some underlying procedures. Is it possible to call the error stack from forms like in 10g database dbms_utility.format_error_backtrace? Actually FRM-40735 hides all this information. This should be work for client and database pl/sql errors!
With kind regardsFirst of all, send every programmer in your organization a message to STOP doing that. I am afraid there is nothing you can do when you have to call some stupid code from your form that contains the when others then... sequence.
Below is an email I sent out just two months ago. I'll share it with you:
Hi _______,
I looked over the _________ package to try to determine why it was so difficult to find the source of the problem. The problem was that the line number reported when the job failed was line 326, which is the Raise command at the end of the __xyz__ procedure.
When someone writes:
exception when others then raise;it causes line number reporting to fail when an unexpected Oracle error is encountered. Furthermore, the line does absolutely no good, because Oracle will automatically raise unhandled errors without that code.
The only thing that code does is cause problems when someone looks for the source of a failure. Without that code, job failures can be located in just a few minutes.
That same code sequence is repeated three times in the _________ package. The problem may also exist in the __abc___... functions that the _______.lookup_xxxl function calls, since no line numbers were reported from there, either. It would be very helpful if you would remove the problem code, and PLEASE instruct everyone on your staff to never use that sequence anywhere.
- - - - - - - - - - - - - - - - - - - - - - end of email - - - - - - - - - - - - - - - - - - - - - -
Now, in addition, you can trap FRM-40735 in your on-error trigger and then display the message found in DBMS_ERROR_TEXT. In fact, you might try the format_error_backtrace from there, too. -
Portal Master-detail form how to auto assign detail record sequence number
Portal Master-detail form how to auto assign detail record sequence number.Please help me?
You can just read the following section
Can I specify a sequence number generator as the default value for a form column?
Yes. Enter the following in the "default value" field for the column:
#<schema name>.<sequence name>.nextval
where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
#SCOTT.CUSTOMER_SEQ.NEXTVAL
same way you can do for master - detail form.
for more information on forms please refer the following URL.
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
hope it helps. -
SInce the latest update Firefox has crashed continually for about two weeks now. Continually means at least 10 times a day. Now it does not open at all and I get this message when launching Firefox:
XML Parsing Error: not well-formed Location: chrome://browser/content/browser.xul Line Number 1068, Column 87:SInce the latest update Firefox has crashed continually for about two weeks now. Continually means at least 10 times a day. Now it does not open at all and I get this message when launching Firefox:
XML Parsing Error: not well-formed Location: chrome://browser/content/browser.xul Line Number 1068, Column 87: -
Error in mail sender channel : invalid sequence number
Hello all,
I'm having the following issue.
I'm using the mail adapter to get messages from a mail server, which are attached to the mail.
This interface is already productive, and is working fine most of the time.
Only frequently I get the following error, which can be found in the java log.
exception caught during processing mail message[630];
java.io.IOException: the specified message not found: -ERR invalid sequence
number
This error seems only to appear when there are a lot of mails to be fetched.
All the mail is read into PI and processed succesfully, only I also get a lot these errors.
Does anyone know what causes this error?
I also don't know where this sequence number is coming from, and what's the meaning of this.
Is it possible it's trying to read the same mail more then once?
The settings in the mail sender channel are:
- transport protocol : POP3
- message protocol : XIPAYLOAD
- Use mail package : enabled
- content encoding : none
- Keep attachments : enabled
- QOS : exactly once
- Set adapter specific message attibutes : enabled
The PI version is 7.01
Thanks a lot in advance for the replies on this question.
Kind regards,
Marco van IerselHi
Well we have used it with POP3 and it is working in the way as it should be.
This feature is recommended by sap when the number of emails to be read is large.
You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
That's why I have asked you to give it a try. -
Sequence number in ADF FORM.
hi All,
I have a table with ID as primary key and have a sequence created for this primary key and have a trigger for generating sequence number while inserting the record in table.
How can i map this Sequence in ADF so while inserting record from Form i can skip the ID column.
Regards,
Suresh kumarI am using MySQL and primary key is auto incremented in my table. Therefore I have selected
SQL Plateform : SQL92
Data Type Map : Java
When I am trying to create entiry object, I do not get option of selecting DBSequence. I did some documents reading, I found out that DBSequence is part of "*Java Extended for Oracle*" Data type Map.
While creating the EO , in the Attribute Settings, I click the Browse and search for DBSequence. I found out oracle.jbo.domain.DBSeqence.
Can someone please let me know that I am going to face any problem in future by using DBSequence in his manner?
Thanks in Advance. -
Enq: TX - row lock contention in forms 10g sequency number generation
Iam Getting the Deadlock issue in oracle formdeveloper 10g database is 11g Acutually in our small Hospital organization using different forms generating entrying labrequest form finally save time
one sequency number will generated i have give procedure below every save criteria form using below procedure some time iam getting lock iam using blocksession query i have find out some
OSUSER
MACHINE
TERMINAL
PROGRAM
SQL_ID
LOGON_TIME
BLOCKING_SESSION_STATUS
BLOCKING_SESSION
EVENT
user423
UMCCDOM\LEVEL4-MICU
LEVEL4-MICU
PrjMcr.EXE
0ccngw7dfkmgb
23/09/2013 11:34:41 AM
VALID
277
enq: TX - row lock contention
SYSTEM
WORKGROUP\PRIAPPSVR
PRIAPPSVR
frmweb.exe
0ccngw7dfkmgb
23/09/2013 11:32:50 AM
VALID
186
enq: TX - row lock contention
SYSTEM
WORKGROUP\PRIAPPSVR
PRIAPPSVR
frmweb.exe
0ccngw7dfkmgb
22/09/2013 2:49:47 PM
VALID
277
enq: TX - row lock contention
SYSTEM
WORKGROUP\PRIAPPSVR
PRIAPPSVR
frmweb.exe
0ccngw7dfkmgb
23/09/2013 7:00:22 AM
VALID
186
enq: TX - row lock contention
user290
UMCCDOM\LEVEL2-N
LEVEL2-N
PrjMcr.EXE
0ccngw7dfkmgb
23/09/2013 10:28:06 AM
VALID
277
enq: TX - row lock contention
lock are happen after open the code i have find out used FOR UPDATE in procedure please tell me any alternative for this every labrequest form saving time using this procedure for generating prefix sequence number multiple user using with different systems
PROCEDURE Gsp_GenSeqNum (I_SvPrefixCd IN VARCHAR2,I_SvUserName IN VARCHAR2,
O_SvSeqNum OUT VARCHAR2) IS
--This Procedure generates the sequence number
--by retrieving the prefix based on the code
--supllied to the procedure.
CURSOR crSeqGenerator IS
SELECT Gsn_prefix_last_num, Gsn_prefix_year
FROM G_SEQUENCE_NUMBER
WHERE Gsn_prefix_Cd = I_SvPrefixCd
AND Gsn_prefix_year = TO_CHAR(SYSDATE,'YYYY')
FOR UPDATE OF Gsn_prefix_last_num;
udSeqNum G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
udNextSeqNum G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
udYear G_SEQUENCE_NUMBER.Gsn_Prefix_year%TYPE;
udPrefix G_SEQUENCE_PREFIX.Gsp_Prefix_Value%TYPE;
BEGIN
SELECT Gsp_Prefix_Value
INTO udPrefix
FROM G_SEQUENCE_PREFIX
WHERE Gsp_Prefix_Cd = I_SvPrefixCd;
OPEN crSeqGenerator;
FETCH crSeqGenerator
INTO udSeqNum,
udYear;
IF crSeqGenerator%FOUND THEN
udNextSeqNum :=udSeqNum + 1;
O_SvSeqNum := udPrefix||'/'||TO_CHAR(SYSDATE,'YY')
||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
ELSE
INSERT INTO G_SEQUENCE_NUMBER VALUES(I_SvPrefixCd,TO_CHAR(SYSDATE,'YYYY'),0,I_SvUserName,SYSDATE);
udSeqNum :=0;
udNextSeqNum :=udSeqNum + 1;
O_SvSeqNum:=UdPrefix||'/'||TO_CHAR(SYSDATE,'YY')
||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
END IF;
UPDATE G_SEQUENCE_NUMBER
SET Gsn_Prefix_last_num=udNextSeqNum
WHERE Gsn_Prefix_Cd = I_SvPrefixCd
AND Gsn_Prefix_year=TO_CHAR(SYSDATE,'YYYY');
CLOSE crSeqGenerator;
END Gsp_GenSeqNum;
Thanks
subbuThis application is inbuit with some modules VB (cath ,cardio)and oracle forms for required sequence number generation different time used this procedure whereever required the sequence Prefix generation.If i replace the procedure sequene to oracle standard sequency if the user cannot save the form unnessary sequency generated order is missing from sequence.
-
Invalid number error with Form on table page
We used the "Form on Table..." wizard to create a simple page to update the SCOTT.EMP table. When we submit the page we get the ORA-01722: invalid number error. When I view the data in the WWV_FLOW_DATA view in the FLOWS_010500 schema, I can see all the data from our form in long format with the actual values that were submitted. But I can not track down where this error is coming from.
James,
What data did you enter in each field? Could it be as simple as you tried to enter character data into the deptno column?
Sergio -
Item Sequence number in form?
Hello All,
Can I get the item sequence number in the form according to the Obejct Navigator? Is it possible by any way?
Regards
SUNHello Gerd,
Thanks for your replay. My requirment is like below.
I am converting a key-board enabled application to mouse enabled application. Here as we have the code in the key-next-item I am doing one loop. Through I am doing do-key('next_item') and it is firing the key-next-item trigger. I am getting the from item and the to item and running the loop from from tiem to to item. I put the code in when-mouse-click trigger.
My problem is when I am click the mouse in the 10th item and before cursor coming to the 10th item through the key-next-item trigger of 9th item it is moving the corsur to 12th item. That time it is failing.
Also now my cursor is in the 10th item and I am clicking in the 2nd item. Then as I am running the loop from ---- to item then from the 10th item it is doing the do-key('next_item') and going forward and after traving all the items it is comming to the 2nd item. Which is wrong , it should come to the reverse way. For this I have a procedure which is doing the do-key('previous-item), but problem is in which case I will call the procedure I am not able to get?
Can you please give me any suggestion on it and what it the best way to do this type of application changes. I saw a white paper in oracle site, but here I am not able to get any more information.
Regards
SUN
Maybe you are looking for
-
How to access variables from other classe through getter ?
Hi ! I have 10 classes Cau_1.java containing char Cau_1_Answer; Cau_2.java... Cau_2_Answer; Cau_10.java... Cau_10_Answer; and another class Resume_grammar.java with char[] AnswerList = new Char[10] used to hold cau_1_Answer, Cau_2_Answer...Cau_10_Ans
-
Switching files from Mac to PC (via an EHD)
Hoping this is the right forum ... I have a Toshiba 500gb external hard drive. I've been using it to back up data and to switch work, etc. between my usual computer (eMac) and a laptop (Dell). Since a recent crash on the Mac I decided to do a full ba
-
Oracle 8.1.7 on Red Hat 7.3
I am about to embark on an application upgrade. Currently, it runs on HP-UX (extortionate hardware prices) but I'm wanting to move to a Dell PowerEdge platform running Linux. The problem that I have is that my prefered platform the PE2600 ships with
-
How to eliminate # for empty date value in BEx Analyser
Hi Gurus, Can any one please let me know how to eliminate # for empty date value in BEx Analyser. Thanks in advance peter
-
ORA-01461: can bind a LONG value only for insert into a LONG column - APEX
Hi There, I getting the above error in the edit query section of the report queries. Navigation: Shared Components>Report Queries>Edit Report Query The same sql query is working fine in Toad. Also if I create a view on this sql query and use it in th