How control the sequence in forms

hi all,
i have id column in the form which has to generate the sequence number automatically,i have created the sequence in the database and assigned it and is working fine.
But the problem is that either we save the record or not the sequence is generating.so the as soon as we get in to insert mode the number is generated.
i need the sequence to be generated only when i save the record.
can anyone could help out with the situation.
thanks,
sanjeev varma.s.

hi,
i have already tried it out ,but couldn't get the result.
our problem is that i'm are not able to restrict the sequence, if i'm not saving the record.i have done it in when-validate-item of the previous naviagtion item so that the column on which the sequence is generated can be skipped and sequence is generated automatically.
the below is the code we have tried it out.
DECLARE
v_cname VARCHAR2 (50);
v_com_seq NUMBER;
BEGIN
SELECT NAME
INTO v_cname
FROM company
WHERE NAME = :company.NAME;
IF v_cname = :company.NAME THEN
MESSAGE ('Company name already exists Can not be duplicated');
MESSAGE (' ');
END IF;
RAISE form_trigger_failure;
EXCEPTION
WHEN NO_DATA_FOUND THEN
SELECT COMSEQ.NEXTVAL INTO v_com_seq FROM dual;
:company.CID := substr(:company.NAME,1,3)||v_com_seq;
END;
thanks,
sanjeev varma s

Similar Messages

  • How to control the sequence of a map?

    Hello
    we are using a send email with attachment (map) in our process design, the email body has a few pdf documents, does anyone know how to control the sequence of attachment in the email body?
    thanks,

    Values in a map are ordered randomly, you can't predict the order.

  • Controlling the sequence of Actions in PA 40?

    dear experts,
    can we control the sequence of actions executed thro PA 40?
    for example , we have the following sequence actions in a client scenario
    1. Hiring ( prioritised as 1)
    2.probation( prioritised as 2)
    3.confirmation( prioritised as 3)
    4.change of salary( prioritised as 4)
    5.transfer( prioritised as 5)
    6.deputation( prioritised as 6)
    7.separation (priotirises as 7)
    Actually, SAP allows  you to run change of salary after probation without confirmation
    it allows you to run separation action after change of salary without transfer or deputation in between,
    By prioritising actions customisation, system only throws a warning and allows the user to execute any actions after any other action except Hiring action ( sequence no 1)
    can we prevent the system to prevent this ,by doing customistion  , but without going for any development like hardcoding  of sequence
    soliciting PA experts advice
    nataraj s
    sap hr consultant

    hi,
    as far as i know there is no such customization.
    as such the sequence of actions depend on the clients.
    hence they are left independent of each other.
    there is no set standard or sequence of actions.
    like a person can be hired today can be transferred tomorrow.
    for some other person hired today for some reason terminated tomorrow.
    one person hired to day next action can be  cahnge in pay.
    hence i dont beleive waht you are asking for is possible.
    regards
    nalla

  • Controlling Commit Sequence In Forms.

    My Environment is Oracle Forms10g R2.
    Is it Possible to Control the commiting of blocks?
    e.g.
    I have three blocks A,B and C. I want to Commit B then C and then A. Can I do that?
    Regards,
    Eric.

    What do you really mean when you say "commit"?
    If you want your form to post the deletes/updates/inserts from block B first, then those in C, then those in A, place the blocks in that order in your Forms Builder Object Navigator.
    Then when you commit, block B changes will be applied first, then C, then A. The final database commit will then lock in those changes.

  • Controlling the sequence of an iPod slideshow using Elements

    I'm trying to control the order in which photos are shown in an iPod slideshow (that I'm displaying on a TV screen)
    I've been asking how to do this in some iPod forums, and someone suggested (without many specifics) that I could somehow set it up in Elements and then export it to the iPod.
    If you know how to do this or can point me to a post, article, etc that gives an explanation, I would really appreciate it! Otherwise, it's all trial and error.

    Doesn't it just show files in filename order?

  • Control the sequence of invocation of Partner Links in SOA11g

    H!,
    I have a BPEL11g process where i am invoking multiple partner links sequentially from my bpel.
    Through invoking the partner links i am inserting records in oracle base tables.
    The invocation sequence is: PartnerLink1 and then PartnerLink2.
    First i invoke partner link1 (web service invoke to another deployed bpel process(db insert)) and inserted records in location table which has foreign key relationship with order_release table.
    Then i invoke partner link2 (adapter service:db insert) and inserted records in order_release which has dependency on location table. The second insertion needs first insertion to be successful.
    Issue:+ The second invocations takes place to insert record into order_release table before the first invocation of partner link gets completed.
    So getting error that corresponding record is not present in location table as it is yet to commit the new record.
    Plz Suggest:+ How to stop the invocation of partner link2 to take place before invocation of parnerlink1 gets completed.
    a. Tweaking the threads or b. using some partner link property, how i can succeed in correcting the sequence of invocation?
    Edited by: rashmi r on Apr 3, 2013 6:29 AM
    Edited by: rashmi r on Apr 3, 2013 6:32 AM
    Edited by: rashmi r on Apr 3, 2013 6:34 AM
    Edited by: rashmi r on Apr 3, 2013 6:37 AM

    Thanks a million to all three of you. I just wish I had asked earlier!
    Cheers, Veit

  • How to use Sequence in Forms

    Hi,
    I have an Empno Column, At the time of Opening a Form The Empno Will be displayed by using Sequence.
    If the User doesn't save the Form Then the Empno Generated number will be changed.
    How to write the code to get sequence numbers at Empno columns by using Sequence?
    Thanks & Regards,
    Hari Babu

    Ok, I understand now your question. Since the oracle sequence is commited in a separate transaction, it is not possible to get the no-gap sequence, considering your example. In the other hand, if you don't commit immediately, than two concurrently opened forms could use the same sequence number, so you'll get the duplicate key!
    If you're sure that this couldn't happen, you can manage your own sequencing, storing them in another table. Let's say you reached seq 999: entering the form, you'll read from your sequence table 1000, increment to 1001, and assign it to empno, but without commiting. Next time, you'll get the same number, until you commit form, and at the same time, change in seq table. So another will get 1001.
    Downside of this approach are, as mentioned before, concurrent sessions, which will get the same sequence.

  • How control the special element  display or off?

    there are many elements in my xml file.some of them need not display in fm file.How can I control them?

    zhaop,
    There is a "drop" read/write rule that will remove elements on import. See the Structure Developer's Guide for more information. Note that this will delete them completely, not just hide them from display.
    Russ

  • How control the vendor's range of use of SUS

    Hi ,experts,
      we have one question now :
    we are going to use MM_SUS ,and we have two vendors A and B, wheather can we just  let vendor A use the SUS?any customizing may realize our
    needs?

    Gregg,
    The graphic in the upper left corner of each original card in the template is a placeholder. To use the placeholder, you drag a media file to the placeholder and your file takes on the size and shape of the placeholder. You will have to do this once for each card on your page. Drag to the placeholder, release. Repeat.
    As you have learned, the +Pages icon adds a page. Logical, right? It doesn't change what you already have in your document, just adds to it.
    I'm sure you will have other issues with templates, and we're happy to help you. Apple seems to use the templates to show off their niftiest tricks. That means that the templates are often complex and confusing to newcomers. As shortcuts to fancy documents, they are seductive traps. Just my opinion - not meant as critisism, offered to give you some perspective on the troubles you are having.
    Regards,
    Jerry

  • How can I control the node execution sequence?

    I have invoked several nodes for controls which are to "Reinit To Dflt". How can I control the sequence of there initialization?

    to ensure code (any code) is going to execute in the order you want, you can use some error cluster to controll data flow, so you need your individual code in a subVI with error in and out. Another posibility is to use sequences, but most people will say they hide code, so you can use one sequence only, and pass dummy data from one to another to ensure data flow.
    Hope this helps

  • Controlling the size of a form?

    Hi,
    Is it possible to design a form a little bigger than an A4 form, but to print just an A4 form? (I would like to put some buttons in a form bigger than A4 so the users could see them in acrobat, however, I don´t want that buttons to print. Using the property to don´t print is not possible because if I place the buttons in a A4 form, they will be over some text).
    Thank you

    Hi,
    In livecycle, select the masterpage node. In the page tab, specify, for instance, 13in in the height property. Put the object at the end of the page, and mark them as visible but don´t print. In acrobat chose "none" in page scaling property (or print with a print button inside the form and control the scaling property form there).

  • The sequence jump and any other good solution

    Hi everyone,
    One existing system apply for sequence number as report number. But sometime the report number will jump. Before create each report, the system will get the sequence number. Then the sequence number will plus one automatially. but how come the sequence number will jump from 32 to 250 itc. Seems it is impossible that user failed to create few hundreds report in a quite short term.
    Any oralce bug caused the problem or good solution to replace current report number design?
    Thanks in advance,
    Hawk

    Some users do like gap free serial numbers. To them it seems like a no-brainer, an easy thing to do. This is just one of the ways in which a real-world metaphor fails in RDBMS, because people don't understand database architecture. More importantly people have forgotten (or, increasingly, are too young to remember) how difficult this sort of thing used to be.
    In the days before computers serial numbers ("sequences") were tracked by using ledger books or self-incrementing stampers. This was usually foolproof but: [list]
    [*]If someone made a mistake - stamped a docket in error or entered an invalid application form - then we had a gap, there was no way to re-use that number.
    [*]Only one person at a time could get the next number: only one person at a time can write in book. Which is fine if we just have a single accounts clerk, but a nightmare if we need to share those resources. If you lock the stamper in your drawer (for safekeeping) and go off to tea, I can't stamp any dockets until you come back.
    [list]
    So you can see that computers are actually quite like real life. The SEQUENCE object is geared up to be a shareable source of unique IDs. The trade-off for shareability is gaps. The only way to guarantee no gaps is the solution you have already, a code control table. But that introduces a bottleneck - you need to be careful to ensure that the table does not remained locked for a long period of time. What happens if someone starts to run a report and then goes off to tea? Will they prevent anybody else using the report? You could use AUTONOMOUS TRANSCATION to acheive that, but if the surrounding transaction is rolled back for any reason...you get a gap!
    Ultimately this comes down to how often the report is run. If you've got hundreds of users running each day then you have a serious potential for resource contention. If it's only one guy running it once a week then it does not matter.
    Cheers, APC

  • The sequence jump and any ohter good solution

    Hi everyone,
    One existing system apply for sequence number as report number. But sometime the report number will jump. Before create each report, the system will get the sequence number. Then the sequence report will plus one automatially. but how come the sequence number will jump from 32 to 250 itc.. seems it is impossible that user failed to create few hundreds report in a quite short term.
    Any oralce bug caused the problem or good solution to replace current report number design?
    Thanks in advance,
    Hawk

    Some users do like gap free serial numbers. To them it seems like a no-brainer, an easy thing to do. This is just one of the ways in which a real-world metaphor fails in RDBMS, because people don't understand database architecture. More importantly people have forgotten (or, increasingly, are too young to remember) how difficult this sort of thing used to be.
    In the days before computers serial numbers ("sequences") were tracked by using ledger books or self-incrementing stampers. This was usually foolproof but: [list]
    [*]If someone made a mistake - stamped a docket in error or entered an invalid application form - then we had a gap, there was no way to re-use that number.
    [*]Only one person at a time could get the next number: only one person at a time can write in book. Which is fine if we just have a single accounts clerk, but a nightmare if we need to share those resources. If you lock the stamper in your drawer (for safekeeping) and go off to tea, I can't stamp any dockets until you come back.
    [list]
    So you can see that computers are actually quite like real life. The SEQUENCE object is geared up to be a shareable source of unique IDs. The trade-off for shareability is gaps. The only way to guarantee no gaps is the solution you have already, a code control table. But that introduces a bottleneck - you need to be careful to ensure that the table does not remained locked for a long period of time. What happens if someone starts to run a report and then goes off to tea? Will they prevent anybody else using the report? You could use AUTONOMOUS TRANSCATION to acheive that, but if the surrounding transaction is rolled back for any reason...you get a gap!
    Ultimately this comes down to how often the report is run. If you've got hundreds of users running each day then you have a serious potential for resource contention. If it's only one guy running it once a week then it does not matter.
    Cheers, APC

  • Controlling the size of a calendar

    Can someone tell me how I can control the displayed size of an APEX calendar region? I'd like to make the calendar bigger than the default size but I can't seem to find a way to do it.
    Thanks for your help,
    Dale

    Hi,
    In livecycle, select the masterpage node. In the page tab, specify, for instance, 13in in the height property. Put the object at the end of the page, and mark them as visible but don´t print. In acrobat chose "none" in page scaling property (or print with a print button inside the form and control the scaling property form there).

  • The sequence of system modules & user-defined modules

    Hi Experts,
    can u help me clear about the execution sequence about system modules , user-defined modules & the adapter of XI/PI ??
    I presume the sequence is first adapter ,second own modules, finally system modules at the sender end. 
    and the sequence at the receiver end is first own modules , second system modules ,third adapter.
    im right?
    by  the way,  how about the sequence when the scenario is be setted to synchronization, specially the sequence of the
    response.
    thx in advance.
    Brian.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    1. for async sender/receiver adapters, you use modules before the standard adapter module.
    2. for sync sender/receiver adapters, you can wither use modules before the standard adapter module (they will affect the request message) or after the adapter module (affecting the response message).

Maybe you are looking for

  • Pay of Terms + FBL1N

    Hi gurus, I need to limit the use of the changes through the FBL1N TX. How can I do? For example, depending on the user that is, limit the the possibility to modify the field Terms of Payment Key or Baseline Date for Due Date Calculation Is there any

  • Using SQL to find a match in consecutive data

    Hi I am trying to find a way (within a single SQL statement if possible) that will return a value based on whether a match is found between two points of data. Please let me demonstrate: create table routetest as select 1 routeid, 0000 routeposition,

  • Customer exit variables using the Table

    Hi Experts, I'm having the following scenario. I have created the below table OGVERSION   Fiscal Year1  OGVERSION1  Fiscal Year2   OGVERSION2     001                   0                   100                  -1                  100     002          

  • Can HA-Oracle agent distinguish a failed database from an inactive one?

    I read "Oracle and Sun Cluster:A technical Overview" by Joseph Bianco. It says "The HA-Oracle agent can distinguish a failed database from an inactive one". How do we configure HA-Oracle agent to be smart enough to distinguish normal shutdown (due to

  • Authentication - webservice PI

    Hi, in SAP PI (7.1) I generate a webservice that will be used by a third party system. The third party system is located on another server but in the same domain. Now when I am testing this webservice with SOAPUI or from the third party system I need