Cursor Jumping to last record when query mode for Multi-record block.

I have a multi-record block. the seq field has this validation to check that there should not be a gap
in sequence for S_type and cer_dl field.The program unit is as below.
PROCEDURE seq_validation IS
--Validation to check that there is no gaps in sequence for S_TYPE and cer_dl fields
l_value_to_check varchar2(100);
l_seq_found number;
l_curr_sequence number;
l_new_value varchar2(100);
l_found boolean:=FALSE;
l_new_set boolean := FALSE; --s_type and cer_dl are different from previous set.
begin
if trim(:b1.s_type) is not null
or trim(:b1.cer_dl) is not null
then
-- Program continues here only if all the items are not null
-- Get information from record that needs to be validated
l_value_to_check := trim(:b1.s_type) || ':'|| trim(:b1.cer_dl) ;
l_curr_sequence := :sequence;
if :SYSTEM.CURSOR_RECORD = '1' then
---to check sequence is entered as 1 in the first record
message('Error:Sequence should start with 1');
raise form_trigger_failure;
end if;
go_item('b1.XYZ');
else
FIRST_RECORD;
while :SYSTEM.LAST_RECORD != 'TRUE'
loop
l_found := FALSE;
l_new_value := trim(:b1.S_type) || ':'|| trim(:cer_dl) ;
if l_new_value = l_value_to_check then --
l_new_set:= FALSE;
l_seq_found := :seq;
if l_seq_found >= l_curr_sequence then
go_item('b1.seq');
l_new_set := FALSE;
elsif l_seq_found < l_curr_sequence - 1 then
go_item('b1.sequence');
l_found := FALSE;
elsif l_seq_found = l_curr_sequence - 1 then
l_found:= TRUE;
go_item('b1.xyz); --go to next item
end if;
else
l_new_set := TRUE;
end if;
NEXT_RECORD;
end loop;
if l_new_set then
go_item('b1.xyz'); -- go to next item
else
if not l_found then
message('Error:Sequence should be in order.');
go_item('b1.seq');
raise form_trigger_failure;
end if;
end if;
go_item('b1.xyz'); ---go to next item
end if;
end if;
end;     
In the insert mode its working fine(unless you gurus feel to change to make it more perfect.
When I say enter-query and put 'IAS' in the s_type field and then do a execute query it brings all the records of 'IAS'.
Now as I want to update the records, and when I navigate across field(s_type,cer_dl,Seq,xyz) using tab and move the cursor down on second
record(IAS N 2 N), what happens is when I navigate to sequence field the cursor jumps to LAST RECORD( IAS Y 3 N ) of LAST field XYZ.
I am putting the sample record
s_type cer_dl seq xyz
IAS N 1 N
IAS N 2 N
IAS N 3 N
IAS N 4 N
IAS Y 1 N
IAS Y 2 N
IAS Y 3 N
The cursor moves to last record --IAS -Y -3-N when I tab across the second record.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

When I say enter-query and put 'IAS' in the s_type field...For your validation to work you must not allow users to enter records in the middle of a block, clear records from the block or query specific records. If you allow the users to enter a query then you are allowing 2 of the rules to be broken.

Similar Messages

  • How to display LOV on web in ENTER-QUERY mode with form or block query only.

    Hello all
    How can I display lov automatic on the web in from enter-query
    mode in form or block query only mode.
    thankx

    If I understand correctly your explanation, your called form
    fails to activate the LOV in enter-query mode when it is deployed
    and test on the browser.
    So lets proceeed like this, to make it work in all environments,
    let us programetically activate the LOV.
    HOW?
    In the called form, write in the WHEN-NEW-ITEM-INSTANCE TRIGGER
    at block level (if have more than one LOV)
    IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
    IF get_item_property(:system.cursor_item,lov_name) IN ('YOUR
    LOV1', 'LOV2' etc) THEN
    IF SHOW_LOV(get_item_property(:system.cursor_item,lov_name))
    THEN
    NULL;
    END IF;
    END IF;
    END IF;
    The above code maybe tweak to suite your need and condition.
    This way, we explicitly make the LOV appear in ENTER-QUERY mode
    whenever the user clicks on an item with an attached LOV.
    Hope this helps.
    Mohammed R.Qurashi

  • Problem when querying OLAP for Value based hierarchy

    Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
    the strange part is if I only put one value, it will work perfectly
    for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
    but if I put multiple value to the list
    CF_HIER::426362
    CF_HIER::424470
    CF_HIER::429073
    CF_HIER::424230
    then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
    for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
    this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
    this is the code how I guery
    ////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
    String[] elementIdArr = new String[elementIdList.size()];
              int i = 0;
              for (Long elementId: elementIdList) {
                   String elementIdStr ="";
                   if (hierarchy instanceof MdmLevelHierarchy)
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            level.getName()+dimension.getValueSeparationString()+
                                            level.getName()+"_"+elementId;
                   else
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            elementId;
                   elementIdArr[i++] = elementIdStr;
              Source myList = dp.createListSource(elementIdArr);
              result = hierarchy.getSource().selectValues(myList);
         Source joinedSource = measure.getSource();
              joinedSource = joinedSource.join(result );
    is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
    thanks

    Hi I have problem when querying OLAP for value based hierarchy , for level based dimension it work fine
    the strange part is if I only put one value, it will work perfectly
    for example if I put only 1 value for that value base hierarchy like CF_HIER::426362, then it will get the correct value for that id 426362
    but if I put multiple value to the list
    CF_HIER::426362
    CF_HIER::424470
    CF_HIER::429073
    CF_HIER::424230
    then only some value will come out correctly, some of them will be 0, I wonder why because if I query using each value, then it show correct value
    for multiple value usually only the top in hirarchy give correct value, but the leaf will give 0, but if I query only the leaf, the leaf will give correct value
    this problem only happen for my value based hierarchy, for the level based hierarchy it work fine both for each value or multiple value in the list
    this is the code how I guery
    ////the "elementIdList" is where the value is (CF_HIER::426362,CF_HIER::424470,CF_HIER::429073,CF_HIER::424230), if I only put single value in this list the query work fine, but if I put multiple value then some value give correct result, some will give 0
    String[] elementIdArr = new String[elementIdList.size()];
              int i = 0;
              for (Long elementId: elementIdList) {
                   String elementIdStr ="";
                   if (hierarchy instanceof MdmLevelHierarchy)
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            level.getName()+dimension.getValueSeparationString()+
                                            level.getName()+"_"+elementId;
                   else
                        elementIdStr = hierarchy.getName()+dimension.getValueSeparationString()+
                                            elementId;
                   elementIdArr[i++] = elementIdStr;
              Source myList = dp.createListSource(elementIdArr);
              result = hierarchy.getSource().selectValues(myList);
         Source joinedSource = measure.getSource();
              joinedSource = joinedSource.join(result );
    is there any suggestion where I'm doing wrong?or is it different between querying value based hier with level based hier?
    thanks

  • Cursor jumps to random positions when I click in APSE8

    Hello there, I've been using PS for quite some time and I have decent experience with it. However, recently I've encounted this certain bug in the program frequently and now I'm here in the forums to seek for a solution.
    I use Adobe Photoshop Elements Version 8.0, and I use Windows 7.
    The problem: Whenever I use the brush/pencil tool on the canvas, everytime I click to use the tool, sometimes the cursor seems to 'jump' out of position and I end up unintentionally putting paint on the wrong part of the canvas. And before I release the click, I try to move the mouse around in random directions to no avail; the mouse doesn't respond until I release the mouse. In another similar case, sometimes for a split second the cursor seems to move on its own and it leaves behind a random trail of color. Example: Let's say I wrote down my name 'Andrew' on the canvas. I end up something similar to 'Anc e.", along with a black dot/calligraphic stroke or two unintentionally placed when writing down my name. I had to undo and click several times until I properly got the tool working. I'm working on a certain project in PS and this bug is greatly hindering my progress and any solution or further explanation would be much appreciated.
    I'm guessing a part of my bare hand is just barely in physical contact with the touchpad?

    I would try another mouse.  If you have a cordless mouse there have been problems with random acts in PS before, although that was last year.
    If you have other questions about Photoshop Elements they have their own fourm at http://forums.adobe.com/community/photoshop_elements.   This is the Photoshop Forum.

  • Re: Tecra M11 - Cursor jumps to random locaation when typing

    Does anyone know how to switch off the trackpad when using a mouse, or advise on what the problem is - when I am merrily typing away, and I'm fairly fast, I suddenly find I am typing in the middle of what I typed already, instead of at the end of the line as normal. I cannot work out whether this is interference from the trackpad, or I am hitting something else in error! I tried switching off the trackpad using Fn F9 but it doesn't seem to work.... is there another way to disable it?
    Cheers all!
    Amoeba

    What is probably happening is your palm is touching the TouchPad while you are typing.
    To avoid this problem, you can turn off the Touchpad completely, or simply turn off "Tapping" in the Advanced Touchpad Settings.

  • Any 3rd party utilities that fix full screen mode for multi-monitor users?

    I am a multi-monitor user.  As multi-monitor users know, full screen mode is basically useless since if you try to go full screen on one monitor, it causes the other monitor to go blank and become unusable (at least with most programs).  Are there any 3rd party utitilities or fixes for this?
    Thanks

    Spaces, which is what this functionality stems from, was limited in that it used your entire setup and switched all of the screens over; space to space. I never used spaces because I always had multiple monitors and I was always working with multiple apps simultaneously that I wanted to be able to reference while working on the others.
    Now they call Spaces, "mission control" and changed the appearance of it, but the functionality remained the same, each workstation comprised all of your monitors, and would switch over all of them when switching to a new "Desktop".
    Fullscreen apps wrongly assumes that it can take the functionality of the afformentioned MS/Spaces and use it for one app, negating the whole idea of why someone would have multiple screens (real estate to work with other applications).
    If they stop considering multiple monitors as one Workspace, they can then make it so they are asynchronous "tablets" instead of one conjoined entity.
    So, you say people have been asking about this for 2 years, I've been asking for this for 5!
    The issue here is, the only answer is to not use it. Making Mission Control and Fullscreen apps completely ignored by people like us, where I could be using both functions to glide around my work station and three monitors, mixing and matching which apps I want to be viewed on each separate monitor, to perform one single task; together.
    It would actually reward people who wanted to utilize Thunderbolt technology and have more then one monitor.
    There is no telling why apple chose to push out something that would only support the casual user, with one display, but the only direct way to let apple know that we feel limited by the OS is to send feedback. Even though it seems that we are powerless in this situation, I hope that they do consider how to make this function better.
    </rant>

  • Form trigger - fire in enter query mode

    Hello,
    Could someone help me with the following problem, please?
    I want to create an key-exeqry and I want it to execute in enter-query mode. Unfortunatly Designer set's the property 'fire in enter query mode' for the trigger to 'No'. I can't find any setting to set it to 'Yes'. Does someone knows a setting or a work-around?
    I'm working with designer6/headstart6.
    Thanks in advance,
    Martine.

    Sandra,
    I tried to put the key-exeqry in the template. There's only one problem the key-exeqry is a 'in place of' trigger. When I put the code 'Null;' in the trigger, a generated form without a key-exeqry doesn't work because the 'key execute query' does nothing. A generated form with a key-execute query works fine.
    At the other hand, when I put the code 'Execute_query' in the trigger, a generated form without a key-exeqry works fine, but the other one doesn't.
    Which code should I include in the template-trigger?
    Thanks,
    Martine.

  • Iphone 3gS Cursor jumps around.

    My Iphone 3gS cursor jumps around on occasion when typing texts or emails. The issue has persisted despite several resets and software upgrades. When the cursor jumps, it can either go to the next line or else into the "Sent from my Iphone" line. Any ideas on the cause and especially on how to fix this? Thanks in advance!

    I "catch" this ... I can only call it malware / miscellious software... occassionaly when browsing not always legit sites on the deep web.
    Here's how I'm able to sucessfully clear that condition.
    Power down the notebook
    Reset the SMC using the power adapter to verify the SMC reset.
    Immediatly after resetting the SMC reset the PRAM several times 3 or 4 times.
    Allow the Mac to boot normally.. No more issue.

  • PKI: Query mode

    Hi.
    I tried to implement Query mode for certificate obtaining. CA and client routers both run IOS 12.4(15)T1 and they have following configurations:
    CA
    crypto pki server ca
    database level complete
    grant auto
    lifetime crl 1
    cdp-url http://172.20.90.91/ca.crl
    database url disk0:
    crypto pki trustpoint ca
    ip-address GigabitEthernet0/0
    revocation-check crl
    rsakeypair ca
    crypto pki certificate chain ca
    certificate ca 01
    308202F8 308201E0 A0030201 02020101 300D0609 2A864886 F70D0101 04050030
    8D6883B4 C9681095 9535861F D58417C6 1897DE8A 68A716FE D67B83FB
    quit
    client
    crypto pki trustpoint CA
    enrollment url http://172.20.90.91:80
    serial-number none
    ip-address none
    fingerprint FB2DF4C0A6242C392DAF9C6D811F32CE
    subject-name CN=ubc.test
    query certificate
    revocation-check crl
    rsakeypair UBC 768
    crypto pki certificate chain CA
    certificate ca 01 query
    fingerprint FB2DF4C0A6242C392DAF9C6D811F32CE
    certificate 1A query
    I successfully obtained root and identity certificates at the beginning. But when I reloaded the client it could not get its certificate.
    Can anybody give my some light - what did I miss?
    With best regards,
    Maxim

    No. Clocks are fine. Both routers are synced to one time source.
    Is there anything else I have to check?
    Maxim

  • Cursor Jumps on T61p Ultrapad

    Just upgraded from a T43 to a T61p. Nice computer. The only problem, which could be a feature that I need to get used to is that when I move my finger on the ultrapad from the top to the bottom (or vice versa), the cursor jumps about two inches when my finger reaches the center point.  If this is a feature to assist with navigation, I have found it a challenge in that the ultrapad on the T61 is smaller than the one on my old T43. Is there a way to disable or adjust this?

    I suggest reseating the touchpad connector under the palm rest, instrauctions on how to remove the palm rest can be found here.
    Andy  ______________________________________
    Please remember to come back and mark the post that you feel solved your question as the solution, it earns the member + points
    Did you find a post helpfull? You can thank the member by clicking on the star to the left awarding them Kudos Please add your type, model number and OS to your signature, it helps to help you. Forum Search Option T430 2347-G7U W8 x64, Yoga 10 HD+, Tablet 1838-2BG, T61p 6460-67G W7 x64, T43p 2668-G2G XP, T23 2647-9LG XP, plus a few more. FYI Unsolicited Personal Messages will be ignored.
      Deutsche Community     Comunidad en Español    English Community Русскоязычное Сообщество
    PepperonI blog 

  • How i know when a EXECUTE_QUERY retrieved last record

    Hi...
    How i know when the EXECUTE QUERY retrieved the last record in a block ....?
    Exist a trigger after trigger POST-QUERY?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

    Kevin, sorry
    But the :system.last_record not change the value during the execution of EXECUTE_QUERY.
    Only useful when the data was retrieved into blocks...not during..
    Other mode?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

  • Set search text when form is in query mode

    Hi forum members,
    is it possible to set the value of a textfield when a form is in query mode?
    In our form you can enter query mode with F7 and execute the query with F8.
    When you go back to query mode with F7 and then press F7 again, the search criteria of the past query appears.
    Now in our form there is an alternativ search, that can be executed in query mode with F9. A different search canvas appears then with a more detailed search.
    When I go back from that canvas to the initial canvas, change to query mode with F7 and try to get the last search criteria with F7, not the last search criteria (from F9 search) appears, but the first one (F8 search).
    I have tried to copy the search value into an invisible textfield and then copy it back to the search field when F7 is pressed after the alternative search canvas was closed.
    Instead of appearing in the search field, a new record is created in background.
    Is there any other way to set the value of a textfield in query mode?
    Thanks,
    Marco

    Hi Craig,
    thank you for this hint.
    Unfortunately it does not solve my problem.
    My goal is to fill the search fields with values when they are in query mode.
    I try to explain it step by step:
    Step 1
    - In my Form I change to query mode with F7.
    - I fill a search field, e.g. Name: TIGER.
    - Then I execute the search with F8.
    - Record is displayed in the block
    Step 2
    - I press the F7 Button to change to query mode again
    - Now when I press F7 again, the search values from the last search (TIGER) appear (I think it is a standard forms functionality, isn't it?)
    - I execute the search with F8
    - Record is displayed
    Step 3
    - Again I change to query mode with F7
    - I fill the search field (this time Name: SCOTT)
    - Now advanced search is executed with F9
    - A special search canvas opens over the form with result records and more detailed information to the result
    - I close the search canvas
    Step 4
    - Again I change to query mode by pressing F7
    - I want to get the search value from the last search (SCOTT) by pressing F7 again
    - Value from the first search appears (TIGER)
    My goal is to save the search value from step 3 anywhere (in a variable or copy field or something) and get it back in step 4 when the form is in query mode.
    It seems to me that it is not possible to fill fields that are in query mode, is that right?
    Thanks a lot!
    Marco

  • Cursor not working properly.. Gives every record last records' entry.

    hi all.
    a simple one for someone I'm sure...
    Ive just added the cursor:
    -- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable..
         CURSOR csr_ora_loc_code IS
         SELECT sil.ORACLE_LOC_CODE
         FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
         WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code;
    ..to the script I'll paste below in order to populate every record with whats in sil.ORACLE_LOC_CODE field.
    But, although it works fine when you have 1 record to run in, when several records are to be loaded in together, the script, although enters the records into ORACLE fine, populates every record with the same location code - whatevers in the last record (instead of treating each one individually). How can I fix this?
    Thanks for looking..
    The code..
    /* Formatted on 2009/04/29 11:52 (Formatter Plus v4.8.7) */
    SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
    SET verify OFF
    SET feedback OFF
    DECLARE
    -- Debugging/error handling
    -- Work variables
       ora_loc_code number                     := 0;
       p_emp_number                     VARCHAR2 (14);
       v_rec_cnt                        NUMBER                          := 0;
       insert_flag                      VARCHAR2 (8);
       err_num                          NUMBER;
       err_msg                          VARCHAR2 (150);
       err_line                         VARCHAR2 (350);
       err_seq                          NUMBER                          := 0;
       l_validate                       BOOLEAN                     DEFAULT FALSE;
       l_std_business_group_id          NUMBER                          := '0';
       l_default_code_comb_id           NUMBER                        := '217269';
       l_organization_id                NUMBER                          := '0';
       l_set_of_books_id                NUMBER                          := '1';
       l_job_id                         NUMBER                          := '10';
       l_obj                            NUMBER;
       l_datetrack_update_mode          VARCHAR2 (30)             := 'CORRECTION';
       l_assignment_sequence            NUMBER;
       l_name_combination_warning       BOOLEAN                         := FALSE;
       l_assign_payroll_warning         BOOLEAN                         := FALSE;
       l_org_now_no_manager_warning     BOOLEAN;
       l_other_manager_warning          BOOLEAN;
       l_spp_delete_warning             BOOLEAN;
       l_entries_changed_warning        VARCHAR2 (30);
       l_tax_district_changed_warning   BOOLEAN;
       l_person_id                      NUMBER;
       l_assignment_id                  NUMBER;
       l_special_ceiling_step_id        NUMBER;
       l_per_effective_end_date         DATE:= TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
       l_people_group_id                NUMBER;
       l_group_name                     VARCHAR2 (30);
       l_assignment_number              VARCHAR2 (35);
       l_effective_end_date             DATE := TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
       l_date                           DATE                           := SYSDATE;
       ip_p_address_id                  per_addresses.address_id%TYPE;
       ip_p_object_version_number       NUMBER;
       ip_p_party_id                    per_addresses.party_id%TYPE;
       l_per_object_version_number      NUMBER;
       l_asg_object_version_number      NUMBER;
       l_full_name                      VARCHAR2 (240);
       l_per_comment_id                 NUMBER;
       l_per_effective_start_date       DATE;
       l_concatenated_segments          VARCHAR2 (240);
       l_soft_coding_keyflex_id         NUMBER;
       l_comment_id                     NUMBER;
       l_no_managers_warning            BOOLEAN;
    -- Get employee details info from work table
       CURSOR get_employee_details
       IS
          SELECT std_hire_date, std_last_name, std_sex, std_date_of_birth,
                 std_email_address,
                 LPAD (std_employee_number, 8, '0') std_employee_number,
                 std_first_name, std_marital_status, std_middle_names,
                 std_nationality, std_title, std_national_identifier,
                 std_address_line1, std_address_line2, std_address_line3,
                 std_address_line4, std_post_code, std_telephone_1, std_country,
                 std_region, std_location_id, std_organization_id,
                 std_supervisor_id, std_person_id, std_position_id
            FROM SU_TEMPLOYEE_DETAILS;
    -- checks employee details info from PER_ALL_PEOPLE_F table
       CURSOR c_check_employee (p_emp_number VARCHAR2)
       IS
          SELECT per.person_id, per.business_group_id, per.last_name,
                 per.start_date, per.date_of_birth, per.email_address,
                 per.employee_number, per.first_name, per.marital_status,
                 per.middle_names, per.nationality, per.national_identifier,
                 per.sex, per.title, padd.address_id, padd.primary_flag,
                 padd.address_line1, padd.address_line2, padd.address_line3,
                 padd.town_or_city, padd.postal_code, padd.telephone_number_1,
                 paas.assignment_number, paas.object_version_number
            --  padd.telephone_number_2, padd.telephone_number_3, paas.job_id, paas.location_id,
            --  paas.organization_id, paas.assignment_type, paas.supervisor_id,
            --  paas.default_code_comb_id, paas.set_of_books_id, paas.period_of_service_id,
          FROM   per_all_people_f per,
                 per_all_assignments_f paas,
                 per_addresses padd
           WHERE per.employee_number = p_emp_number
             AND per.person_id = padd.person_id
             AND paas.person_id(+) = per.person_id;
       emp_rec                          c_check_employee%ROWTYPE;
    -- Cursor retrieves latest Object Version Number from per_assignments_f table..
       CURSOR csr_ovn (cp_person_id IN per_all_people_f.person_id%TYPE)
       IS
          SELECT MAX (paas.object_version_number)
            FROM per_assignments_f paas, per_all_people_f per
           WHERE paas.person_id = per.person_id
             AND per.employee_number = paas.assignment_number
             AND per.person_id = cp_person_id;
    -- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable..
         CURSOR csr_ora_loc_code IS
          SELECT sil.ORACLE_LOC_CODE
         -- INTO ora_loc_code
         FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
         WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code;
    BEGIN
    -- Process each record in the work table
       FOR v_emp IN get_employee_details
       LOOP
    -- determine whether customer already exists
          OPEN c_check_employee (v_emp.std_employee_number);
          FETCH c_check_employee
           INTO emp_rec;
          IF c_check_employee%NOTFOUND
          THEN
             insert_flag := 'I';
             DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number);
          ELSE
             DBMS_OUTPUT.PUT (CHR (10));
             insert_flag := 'X';
           RAISE_APPLICATION_ERROR (-20001,  'Employee No: ' || v_emp.std_employee_number  || '  already
    exists - please  UPDATE  manually..'    );
           END IF;
          CLOSE c_check_employee;
    -- Obtain the most recent Object Version Number..
          OPEN csr_ovn (v_emp.std_person_id);
          FETCH csr_ovn
           INTO l_obj;
          -- IF csr_ovn%NOTFOUND     THEN        RAISE NO_DATA_FOUND;   END IF;
          CLOSE csr_ovn;
    -- Open Oracle Location Code cursor
          OPEN csr_ora_loc_code;   -- (v_emp.std_person_id);
          FETCH csr_ora_loc_code
           INTO ora_loc_code;
          CLOSE csr_ora_loc_code;
    -- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from
    --            info in  table record
          IF insert_flag = 'I'
          THEN
    --         BEGIN                             -- Importing Employee Procedure --
             Hr_Employee_Api.create_gb_employee
                     (p_validate                       => l_validate,
                      p_hire_date                      => v_emp.std_hire_date,
                      p_business_group_id              => l_std_business_group_id,
                      p_date_of_birth                  => v_emp.std_date_of_birth,
                      p_email_address                  => v_emp.std_email_address,
                      p_first_name                     => v_emp.std_first_name,
                      p_middle_names                   => v_emp.std_middle_names,
                      p_last_name                      => v_emp.std_last_name,
                      p_sex                            => v_emp.std_sex,
                      p_ni_number                      => v_emp.std_national_identifier,
                      p_employee_number                => v_emp.std_employee_number,
                      p_person_id                      => l_person_id,
                      p_title                          => v_emp.std_title,
                      p_assignment_id                  => l_assignment_id,
                      p_per_object_version_number      => l_per_object_version_number,
                      p_asg_object_version_number      => l_asg_object_version_number,
                      p_per_effective_start_date       => l_per_effective_start_date,
                      p_per_effective_end_date         => l_per_effective_end_date,
                      p_full_name                      => l_full_name,
                      p_per_comment_id                 => l_per_comment_id,
                      p_assignment_sequence            => l_assignment_sequence,
                      p_assignment_number              => l_assignment_number,
                      p_name_combination_warning       => l_name_combination_warning,
                      p_assign_payroll_warning         => l_assign_payroll_warning
             Hr_Person_Address_Api.create_person_address
                                      (p_validate                     => l_validate,
                                       p_effective_date               => v_emp.std_hire_date,
                                       p_pradd_ovlapval_override      => NULL,
                                       p_validate_county              => NULL,
                                       p_person_id                    => l_person_id,
                                       p_primary_flag                 => 'Y',
                                       p_style                        => 'GB_GLB',
                                       p_date_from                    => SYSDATE,
                                       p_date_to                      => NULL,
                                       p_address_type                 => NULL,
                                       p_comments                     => NULL,
                                       p_address_line1                => v_emp.std_address_line1,
                                       p_address_line2                => v_emp.std_address_line2,
                                       p_address_line3                => v_emp.std_address_line3,
                                       p_town_or_city                 => v_emp.std_address_line4,
                                       p_region_1                     => NULL,
                                       p_region_2                     => NULL,
                                       p_region_3                     => NULL,
                                       p_postal_code                  => v_emp.std_post_code,
                                       p_country                      => v_emp.std_nationality,
                                       p_telephone_number_1           => NULL,
                                       p_telephone_number_2           => NULL,
                                       p_telephone_number_3           => NULL,
                                       p_party_id                     => ip_p_party_id,
                                       p_address_id                   => ip_p_address_id,
                                       p_object_version_number        => l_obj
             Hr_Assignment_Api.update_emp_asg
                            (p_validate                    => l_validate,
                             p_effective_date              => SYSDATE,  -- l_date,
                             p_datetrack_update_mode       => l_datetrack_update_mode,
                             p_assignment_id               => l_assignment_id,
                             p_object_version_number       => l_obj,
                             p_supervisor_id               => v_emp.std_supervisor_id,
                             p_default_code_comb_id        => l_default_code_comb_id,
                             p_set_of_books_id             => l_set_of_books_id,
                             p_concatenated_segments       => l_concatenated_segments,
                             --IN/OUT
                             p_soft_coding_keyflex_id      => l_soft_coding_keyflex_id,
                             --IN/OUT
                             p_comment_id                  => l_comment_id,
                             --IN/OUT
                             p_effective_start_date        => l_date,     --IN/OUT
                             p_effective_end_date          => l_effective_end_date,
                             --IN/OUT
                             p_no_managers_warning         => l_no_managers_warning,
                             --IN/OUT
                             p_other_manager_warning       => l_other_manager_warning
                            --IN/OUT
             Hr_Assignment_Api.update_emp_asg_criteria
                 (p_validate                          => l_validate,
                  p_effective_date                    => SYSDATE,       -- l_date,
                  p_datetrack_update_mode             => l_datetrack_update_mode,
                  p_assignment_id                     => l_assignment_id,
                  p_object_version_number             => l_obj,
                  p_organization_id                   => l_organization_id,
                  p_location_id                       => ora_loc_code,
                  p_job_id                            => l_job_id,
                  p_position_id                       => v_emp.std_position_id,
                  p_special_ceiling_step_id           => l_special_ceiling_step_id,
                  p_effective_start_date              => l_date,
                  --per_effective_start_date,
                  p_effective_end_date                => l_effective_end_date,
                  --IN/OUT
                  p_people_group_id                   => l_people_group_id,
                  --IN/OUT
                  p_group_name                        => l_group_name,    --IN/OUT
                  p_org_now_no_manager_warning        => l_org_now_no_manager_warning,
                  --IN/OUT
                  p_other_manager_warning             => l_other_manager_warning,
                  --IN/OUT
                  p_spp_delete_warning                => l_spp_delete_warning,
                  --IN/OUT
                  p_entries_changed_warning           => l_entries_changed_warning,
                  --IN/OUT
                  p_tax_district_changed_warning      => l_tax_district_changed_warning
                 --IN/OUT
             v_rec_cnt := v_rec_cnt + 1;
             DBMS_OUTPUT.PUT (CHR (10));
             DBMS_OUTPUT.PUT_LINE (   'There were '
                                   || v_rec_cnt
                                   || '  records read in..'
             DBMS_OUTPUT.PUT (CHR (10));
    -- End of customer related details
          END IF;
       END LOOP;
       COMMIT;
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          ROLLBACK;
       WHEN OTHERS
       THEN
          ROLLBACK;
          err_num := TO_CHAR (SQLCODE);
          err_msg := SUBSTR (SQLERRM, 1, 150);
          err_line :=   'ORACLE error occurred processing record.. ' ||  err_msg;
          DBMS_OUTPUT.PUT_LINE (err_line);
          INSERT INTO SU_SL_ERRORS  VALUES (err_num, err_msg, SYSTIMESTAMP);
    END;
    EXIT;

         CURSOR csr_ora_loc_code IS     SELECT sil.ORACLE_LOC_CODE
         -- INTO ora_loc_code
         FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
         WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code; OPEN csr_ora_loc_code; -- (v_emp.std_person_id);
    FETCH csr_ora_loc_code
    INTO ora_loc_code;
    CLOSE csr_ora_loc_code;Obviously yes.It will select one sil.ORACLE_LOC_CODE, as you are fetching one. That can be any one of the sil.ORACLE_LOC_CODE, as you didn't tell Oracle to pick a particular one.
    If you want to get some particular sil.ORACLE_LOC_CODE, you need to put some filter on that.     CURSOR csr_ora_loc_code(p_your_parameter NUMBER) IS -- whatever datatype you wan to pass
          SELECT sil.ORACLE_LOC_CODE
         -- INTO ora_loc_code
         FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
         WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code
         AND your_column = p_your_parameter;
          OPEN csr_ora_loc_code(v_emp.std_person_id);   -- (v_emp.std_person_id); -- I'm not sure why did you comment this out.
          FETCH csr_ora_loc_code
           INTO ora_loc_code;
          CLOSE csr_ora_loc_code;By
    Vamsi

  • The cursor jumps around on my macbook pro. it happens all the time when  i am typing and suddenly the cursor is at a previous spot and i am typing away. i am not using a mouse but i am also not accidentally hitting my trackpad. someone please help!

    my cursor jumps around when i'm typing. it randomly lands in a previous part of the text. i do not use a mouse. i am decinitely NOT accudentally hitting the trackpad. it happens enough that i am starting to hate my fairly new macbook pro. i tried turning off bluetooth but it still happens. the strangest part is i cant find other complaints of this happening, at least recently. anyone have ideas?

    If you have a fairly new Mac...
    You are still under warranty.  Call Apple Care. Make sure you get a case number as all repairs have an additional 90 days of warranty.
    #1 - You have 14 days from the date of purchase to return your computer with no questions asked.
    #2 - You have 90 days of FREE phone tech support.
    #3 - You have the standard one year Apple warranty.
    #4 - If you've purchased an AppleCare Protection Plan, your warranty last for 3 years.   You can obtain AppleCare anytime up to the first year of the purchase of your computer.
    Take FULL advantage of your warranty.  Posting on a message board should be done as a last resort and if you are out of warranty or Apple Care has expired.

  • Query takes too much time in fetching last records.

    Hi,
    I am using oracle 8.1 and trying to execute a SQL statement, it takes few minutes and display records.
    When trying to fetch all the records, it is fast up to some level and takes much time to fetch last record.
    Ex: If total records = 16336 , then it fetches records faster up to 16300 and takes app.500 sec to fetch last 36 records.
    Could you kindly let me know the reason.
    I have copied the explain plan below for your reference.Please let me know if anything is required.
    SELECT STATEMENT, GOAL = RULE               4046     8     4048
    NESTED LOOPS OUTER               4046     8     4048
      NESTED LOOPS OUTER               4030     8     2952
       FILTER                         
        NESTED LOOPS OUTER                         
         NESTED LOOPS OUTER               4014     8     1728
          NESTED LOOPS               3998     8     936
           TABLE ACCESS BY INDEX ROWID     IFSAPP     CUSTOMER_ORDER_TAB     3966     8     440
            INDEX RANGE SCAN     IFSAPP     CUSTOMER_ORDER_1_IX     108     8     
           TABLE ACCESS BY INDEX ROWID     IFSAPP     CUSTOMER_ORDER_LINE_TAB     4     30667     1901354
            INDEX RANGE SCAN     IFSAPP     CUSTOMER_ORDER_LINE_PK     3     30667     
          TABLE ACCESS BY INDEX ROWID     IFSAPP     PWR_CONS_PARCEL_CONTENT_TAB     2     2000     198000
           INDEX RANGE SCAN     IFSAPP     PWR_CONS_PARCEL_CONTENT_1_IDX     1     2000     
         TABLE ACCESS BY INDEX ROWID     IFSAPP     PWR_CONS_PARCEL_TAB     1     2000     222000
          INDEX UNIQUE SCAN     IFSAPP     PWR_CONS_PARCEL_PK          2000     
       TABLE ACCESS BY INDEX ROWID     IFSAPP     CONSIGNMENT_PARCEL_TAB     1     2000     84000
        INDEX UNIQUE SCAN     IFSAPP     CONSIGNMENT_PARCEL_PK          2000     
      TABLE ACCESS BY INDEX ROWID     IFSAPP     PWR_OBJECT_CONNECTION_TAB     2     20     2740
       INDEX RANGE SCAN     IFSAPP     PWR_OBJECT_CONNECTION_IX1     1     20     Thanks.

    We are using PL/SQL Developer tool. The time what we have mentioned in the post is approximated time.
    Apologies for not mentioning these details in previous thread.Let it be approximate time but how did you arrive at that time? When a query fetches records how did you derived that one portion is fetched in x and the remaining in y time limit?
    I would suggest this could be some issue with PL/SQL Developer (Never used this tool by myself) But for performance testing i would suggest you to use SQL Plus. Thats the best tool to test performance.

Maybe you are looking for

  • SSTP VPN fails with Error 0x80092013 when certificate is issued by an Enterprise CA

    I have spent several days trying to configure an SSTP VPN in an environment with a 2008R2 Enterprise CA server without much luck. I have been using the example found at   http://technet.microsoft.com/en-us/library/cc731352(v=ws.10).aspx which works v

  • Cannot start services

    Hi All, I want to update the SCVMM R2 to roolup 5, I've installed kb3023195_vmmserver_amd64 and kb3023914_AdminConsole_amd64 but no change and services SCVMM can not start. this is log event viewer :     <Task>0</Task>     <Keywords>0x80000000000000<

  • To pass file name and path as a parameter

    hi all, I am using forms6i. I am writing some records into the .txt file. Now i am writing as output := text_io.fopen('C:\users\filename.txt','w'); but i have pass this file name and path also to the parameter(user has to mention the file name and pa

  • Cellular connection to mini iPad in uk

    I have just bought a mini iPad cellular and want to know if I can run a dual sim from my iPhone? I am on Vodafone Thanks

  • Differences between commands

    Hi all, I need to know the differences between commands **insync -D "cn=Directory Manager" -w XXXX -s XX02:389** output ReplicaDn Consumer Supplier Delay dc=example,dc=cl XXXXds01:389 XXXX02:389 0 * Disabled Replication Agreement: no subsequent warni