Sequence Operator

How can I use Sequence Operator within a single mapping ???
I get a single value with Sequence.NextVal. Then, I need to use this value for further operations in the same mapping. For example: use value to update target table(s), pass the value to Post-Mapping Operator, pass the same value to Mapping-Output Operator and so on.
Thanks in advance

If all there is on the mapping is a sequence and a table, it looks as if he wants to use a single sequence value to either insert a single row to the table, or update the table with a single sequence nextval.
This is a valid task, but not really the sort of bulk inserts/updates that mappings are designed to do.
Assuming that I am correct, what I would suggest in this case, is replace the sequence with a constant of type number and set it's initial value via it's expression property to the sequence nextval. I would suggest making a database function such as:
CREATE OR REPLACE FUNCTION get_next_sequence_number_fnc (sequence_name in varchar2)
RETURN NUMBER PARALLEL_ENABLE
IS
retval number := null;
BEGIN
-- Sequence nextval wrapper to overcome SQL limitations on nextval
execute immediate 'select '||sequence_name||'.nextval from dual' into retval;
return retval;
END;
to do this task, so the Constant would get instatiated with an expression of get_next_sequence_number_fnc('your_sequence_name')
I haven't worked a major project yet that didn't need to use a get_next_sequence_number_fnc function to be able to access a sequence in a normally disallowed part of a complex query, so it's a handy function to keep around.
This will iterate once in the generated package specification, and then you could pass that variable value to both the table and post-mapping procedure without any problems.
Mike
Edited by: zeppo on Sep 5, 2008 9:03 AM, stuoid editer reformatting....

Similar Messages

  • Confirmation of parallel sequence operation.

    Hello friends,
    I want to do confirmation of parallel sequence operation. I use 3 or5 work centers  at a time for doing one operation. So i have defined parallel sequences for standard sequence. When I do confirmation of quantity and activity time in CO11N for one parallel sequence, other sequence quantity and activity time should be decreased. But system takes actual  quantity and time.
    How to make settings , so that  quantity and activity values should be decreased automatically for next parallel sequence.
    Waiting for Reply!

    Dear ,
    You are not able get the paralle sequence operation in CO11N because production order will copy the Routing based on the Order Type dependent paramter-OPL8-Routing  set up.
    Here , basically , you might have chkeced Alternative Sequence  and Sequence Exchange field (0)  , so while creation production order , routing with operation which are in alternative sequnce will be copied  and will be used in CO11N confirmation.
    2.You need to maintain "Operation Sequence is not checked " for operation sequence for the Ordertype/Plant combination in confirmation parameters using transaction OPK4.-Confirmation parameters of Order
    Try and revert back
    Regards]
    JH

  • Connecting the Sequence Operator to the Mapping Output Parameter?

    my OWB Client: 10.2.0.2.8
    my OWB Repository: 10.2.0.2.0
    I need to obtain a sequence number (from the Sequence Operator), then output it
    using the Mapping Output Parameter, if possible.
    I have tried two things:
    1. Connect Sequence Operator nextval variable to the Mapping Output Parameter.
    This generates error:
    "Table,View Or Sequence reference 'xx_SEQ.NEXTVAL' not allowed in this
    context"
    2. Join the Sequence Operator nextval variable with a source table, then
    connect a port from the dataflow to Mapping Output Parameter.
    This generates error:
    "Mapping Input Parameter and Mapping Output Parameter are intended to be
    executed before and after the data flow of the mapping and cannot accept
    inputs from any part of the data flow."
    From what I have seen so far, it appears it may not be possible to use the
    Sequence Operator along with the Mapping Output Parameter. If Im wrong, please
    let me know of an example of how the Sequence Operator and Mapping Output
    Parameter can be connected.
    Thanks

    User -
    Look at adding a Post-Mapping Process to your mapping, there you have a choice of built in functions or custom ones that could return a sequence value for you. You may have to create the sequence outside of OWB ...
    TXB

  • Problems with Sequence Operator in OWB

    Hi everybody,
    i want to use a sequence in my mapping. Now i have two problems.
    The first problem is the following. When i want to import my sequence (exists on my DB) i can select the sequence in the Selection Window, but when i click on Import i didn't see it in the Design Center, also there is no window which tells me that i have successfully imported the sequence.
    The second problem is, when i drag the Sequence Operator into my Mapping i shows the Selection Window where i have to select the poject and object to bind the operator. But i can't select any object.
    Can anyone help me with my problems and tell me how i can use a Sequence and the Sequence Operator in my Mapping
    Many thanks in advance.
    Greetings

    Hi everyone!
    I'm having a repeated problem with sequences in OWB: I'm filling a TIME table with 1096 rows. Now matter how and when I create the sequence it always starts with 2 instead of 1. Moreover, the last value of the sequence is 1101, when it was supposed to be 1097 or 1098....
    I did achieve the right ouput sometimes, but I must be doing something wrong. Here are the several ways I've tried in OWB:
    1) I've created all the sequences by sql code, in SQL DEVELOPER or PLUS*, and then imported to OWB. Because of being imported, I didn't have to deploy each sequence. Then, I've connected (by drag and drop to the canvas mapping) the sequence I wanted with NEXTVAL (as I always do) attached do TIME_ID of table TIME;
    2) I've dropped and created, several times(as before), the sequences and never had problems..until now. I've also experimented creating, by scratch, the sequences just in OWB and then deploy them in Control Center. After this, deployed the mapping and executed, just like in 1).
    So, the difference lies on how I create the sequences and what are the correct steps to create, deploy (if needed), deploy the map and execute the map.
    This is insain and I really need this to work. I've tried so many ways....
    Could someone PLEASE help me with this? Any thoughts?

  • Alternative sequence - operations number

    Hi all,
    I've got an issue on the alternative sequence.
    The standard sequence is made by operation 10, 20 and 30.
    I try to add a new alternative sequence to substitute the operation 20 with 2 different operations: 20 and 25.
    The system give me an error on the routing: CP331 - Operation: date 28.04.2010: operation number incorrect.
    I tried the option to change the standard sequence to 10, 20 and 40,  but the error is the same. The system checks the return operation (20) and is not possible to add operations into the alternative sequence with operations number greater than return operation.
    It seems that is not possible to substitute 1 operation with 2 operations.
    Anyone has solved?
    Thanks, regards.

    Hi ,
    Okay, you want to create an alternaive sequence only.
    Standard sequence is   10  20 30
    Alternate Sequence:
    1.Branch operation : 10
    Number of the operation from which an alternative sequence is to replace the reference sequence.
    2. Return operation: 30
    (number of the operation up to which an alternative sequence is to replace the reference sequence)
    Operations: 20, 25
    This should work.
    Please check and confirm.
    Regards
    Datta

  • VLD-1800: Illegal use of sequence operator(s)

    I'm getting the following error.
    VLD-1800: Illegal use of sequence operator(s)
    ["ACCT_SEQ"] in a complex mapping.
    Does anyone know why this wuld be happening?
    Also, what constitutes a complex mapping?
    Any help is greatly appreciated.

    Hi John,
    Can you explain what your mapping is supposed to execute (merge statement with sequence, multi table insert with sequence, ...) ?
    Best Regards,
    Sébastien De Clercq,
    Brussels, Belgium

  • Illegal use of sequence operator

    Hi All,
    In my map I am using a sequence in the expression operator and then I am putting the output to a joiner and after that data is moved to target table but while validating this map I am getting error:sequence operator r used in complex mapping which requires generation using nested subquery.sequences r not allowed to be used in nested subqueries. Can anyone tell me how can this issue be resolved.
    Thanks n Regards,
    Amrit

    Hi,
    You can try moving the Sequence operator after join, ie as a final step close to target.
    Mahesh

  • Resetting the Sequence operator in OWB

    I have a Sequence operator for one column in the mapping. It correctly increments by 1 for each row (nextval) . I have done some testing and now I want to reset the next increments. Like I want to start from 1 instead of some 588 like that which is result of my testing.
    How to reset the sequence operator so that it starts from 1 again.
    Thanks

    Hi Tom,
    First you should create a store procedure that resets the last_number of a specified sequence w/ parameters sequence_name and start value. Then just call the stored proc from OWB to reset your sequence.
    --stored proc ex:
    create or replace PROCEDURE reset_sequence (
    seq_name IN VARCHAR2, startvalue IN PLS_INTEGER) AS
    cval INTEGER;
    inc_by VARCHAR2(25);
    BEGIN
    EXECUTE IMMEDIATE 'ALTER SEQUENCE ' ||seq_name||' MINVALUE 0';
    EXECUTE IMMEDIATE 'SELECT ' ||seq_name ||'.NEXTVAL FROM dual'
    INTO cval;
    cval := cval - startvalue + 1;
    IF cval < 0 THEN
    inc_by := ' INCREMENT BY ';
    cval:= ABS(cval);
    ELSE
    inc_by := ' INCREMENT BY -';
    END IF;
    EXECUTE IMMEDIATE 'ALTER SEQUENCE ' || seq_name || inc_by ||
    cval;
    EXECUTE IMMEDIATE 'SELECT ' ||seq_name ||'.NEXTVAL FROM dual'
    INTO cval;
    EXECUTE IMMEDIATE 'ALTER SEQUENCE ' || seq_name ||
    ' INCREMENT BY 1';
    END reset_sequence;
    --calling stored proc ex:
    --sequence name is employees_seq; reset value to 1
    DECLARE
    SEQ_NAME VARCHAR2(200);
    STARTVALUE PLS_INTEGER;
    BEGIN
    SEQ_NAME := 'EMPLOYEES_SEQ';
    STARTVALUE := 1;
    RESET_SEQUENCE(
    SEQ_NAME => SEQ_NAME,
    STARTVALUE => STARTVALUE
    END;
    Hope it works! Cheers!=)
    Regards,
    Carlo

  • Help:set up simple test sequence, operator selects particular test then teststand links to part of sequence file and performs test

    Hi,
    I am extremely new to TestStand, please see question below and offer advice.
    I want to set up a simple test sequence.
    I want a message to popup on screen that asks the operator which unit of 6(max 10) Units to test(i.e. there are say 6-10 box's to select from).
    Then the sequence goes to the particular part of the sequence and performs the test on which ever unit was selected.
    What is the best way to do this?
    Could i use message popups to do this?and if so what do i need to do link it to the correct part of the sequence file?
    Do message popups only allow 6 options to select from?
    Thanks,
    Solved!
    Go to Solution.

    Hi,
       You can do using message popup method. You can ask the user which unit want to execute by inserting message in message expression in message popup step settings.Something like below
    "Enter unit number to execute 
     1.  Unit1
     2.  Unit 2
     10. Unit 10"
    then check "Enable response text box" from options tab in step settings.When user enters unit number you can get the user entered value by inserting the below statement in post expression of message popup step settings
        Locals.String = Step.Result.Response 
        Note : String is a local variable to be defined.
    Convert that string in to number and send that output to switch expression there by you can use a sequence call step to call sequence whichever to be executed. (I hope your each unit will be seperate sequence file)
    I hope these resolves your problem. If you don't understand let me know so that I can develop a small example and send it to.
    Cheers,
    krishna 

  • Sequence operations

    I am using a motion system in conjunction with a number of other devices (power laser, frit dispenser, etc) and would like a simple way to sequence tasks.
    For instance I have a sequence:
    Send motion system to starting position at high speed.
    Open Laser shutter
    Send motion system to next position at low speed.
    Close Laser Shutter
    Send motion system to next position at high speed
    Open Shutter
    Send motion system to next position at low speed
    Close Shutter
    Move motion to idle position
    In the past I have hard-coded these operations or used a state machine.
    It seems that there should be something else that I can use that is part of standard LabView (notifiers, queues, etc).
    Perhaps fill a queue with all tasks and only advance when the prior one is done (if this is the solution, I am unsure how to implement it).
    I would assume that this is a fairly common task.
    Any input is appreciated.
    Thanks

    Thanks for the thought.
    I am actually already using a producer/consumer loop for this application.
    Essentially there are a number of operator actions that can be performed while the system is working (e.g. pulling production documents, updating a database, etc).
    Each of those "button presses" cause an item in the consumer loop.
    Additionally, for the processing, a case is invoked in the consumer loop to start the motion system.
    While the system is moving, the timeout event is used to invoke another consumer case and get motion system status (position, following error, etc).
    The system cannot wait for the motion to stop (status updates are needed, as well as access to other functions).
    I would need a separate queue for the motion/laser/frit system to accomplish this.
    If this is the appropriate way then that is okay.
    As it is , I am considering just updating my old way of doing things and having an array of clusters with each element having either a motion profile, laser setting, etc and remove elements from the array as they are finished.

  • Can't open sequence: " operation not allowed.  Out of memory"

    I have a project with several sequences. The master sequence started freezing on me. I restarted FCP and the computer, but now it won't let me open this sequence. It will let me open others in the project, but not this one. It's even smaller than others. I get the error message, "Operation not allowed. Out of memory." How do I fix this if I can't open it? I've cleaned out render files as well.
    Thanks for the help!

    The graphics/stills don't reside in your project or in a Sequence - those are just pointers to the original media. The images should be on a hard drive wherever you stored them.
    The problem could also be due to a corrupt render files. You could try trashing the render files for the project and see if it opens afterward.
    -DH

  • Cannot open Sequence:  "Operation Not Allowed" then "Out of Memory"

    I quit FCS1 for about 5 hours and returned. When I opened the project I was working on I got these messages: "Operation Not Allowed" then "Out of Memory" when I attempt to open my master working sequence. Other sequences (small nests) do open within the project. The project opens, so the file is not corrupt. A back-up copy of the same project file on a separate physical disc generates the same results. I deleted the prefs and User Data folder, even ran FCP Rescue. Same results. Then I resorted to the Autosave Vault. The two most recent saves resulted in the same error messages. Fortunately the next did not. I lost a considerable amount of work. The system says my memory is OK (6GB). Any ideas? (An attempt to open on a FCS2 machine {8GB RAM} resulted in the same two error messages.)
    The project is fairly lengthy (90 mins) and does have numerous 1 and 2 frame audio edits. Nothing particularly unusual in the video tracks--although I am mixing DV and HDV. It doesn't seem to me these attributes would matter, just throwing them out there.

    ...removing and re-rendering is a great idea, if you've got the time.
    And if during render you get the same out of memory error, try rendering "in-to-out", rendering small chunks until you get to a chunk which brings up the error. Then, you've found an offending "corrupt" file.

  • Cannot open a sequence: "Operation not allowed" error message

    I had been editing a sequence in Final Cut Express HD (v.3.5.1) and then I went to "Render All" and it was most of the way through rendering when suddenly an error message popped up that said "Operation no allowed." I clicked "Okay" and then another error message came up that said "Error: Out of memory." Now I can't open the sequence, and I've lost a few hours of work. Every time I try to open the sequence, I get the same error messages.
    Does anyone know why this happened and if I can recover it?
    Using Final Cut Express HD 3.5.1.

    Does anyone know why this happened and if I can recover it?
    Sounds like you ran out of space on the hard drive fitting in the renders.
    One or more render files may be corrupt as a result.
    Try opening one of your Auto Save Vault files that pre-dates the upset.
    Al

  • Alternate Sequence operation confirmation ...

    hi folks ,
    i have 3 operation in STD seq like 10, 20, 30
    and for the std sequence thr is alternate seq. which contain alternate operation for
    20 th operation of STD.
    FOR operation 20 now :
    In STD seq only one activity Machine time required for 1 item to process is 10 min.
    In ALT seq only one activity Machine time required for 1 item to process is 5 min.
    when i am confirming the 20 operation in CO11 the time required for the opr 20in ALT seq opr. 20 is not appering on the QTY / YIELD .
    regards

    Hi,
    You can cross-check in the production order, operation overview whether the operation 20 is that of the alternative sequence. If not when you create the production order the sytem will inform that alt. seq exist. Here you have to choose the alt.seq.
    Also check the settings in the confirmation parameters (opk4).
    Propose qty/standard value is to be selected.
    Regards,
    SDS

  • The deleted operation affects the confirmed yield of the parallel sequence

    there is a production order.
    the control key of the last operation is PP03,and it's confirmation is : Milestone confirmation.
    and the production order has a parallel sequence,a external processing operation.
    but i marked the external processing operation deleted.
    then i confirm the last operation,and it's sysstatus is CNF
    but the parallel sequence operation is not CNF.
    WHY?

    Dear,
    did you delete the operatrion after release or before the release?

Maybe you are looking for

  • Need help in xml bursting email bodt contents based on condition

    Dear All, I have a requirement as below. I am developing a xml publisher report with bursting functionality, i need to set a email body based on some condition, so please help me out how i can set the email body dynamically in xml bursting file. Note

  • HT1338 i think i have a virus

    e-mail to all my contacks was sent out with out me sending it

  • Set Region/Chart Width Dynamically

    I am sure this has to be simple, but have been searching the forum for "Chart Width" and a LOT of data comes back. So, after searching for a long, time, I ask here... :-) I would like to set the width of my charts dynamically from settings in the dat

  • Problems viewing site in earlier versions of IE

    Hi everyone, I'm wondering if you can help me. I've just built a site and it appears fine in FF & IE8 but in earlier versions of IE the pages break up and I lose the scroll boxes. Can anyone offer me some advice? The site can be viewed at www.vulture

  • Re: Windows 7 Upgrade fulfillment discussion

    I posted a message and it magically disappeared.  Wow, the mods are doing a great job by censoring messages and I wish, really wish, that they worked in the fulfillment center so that we would all have got our supposedly "free" Windows 7 upgrades by