Do I need close a Cursor Variable after FETCH the value?

I have this following code and I don't have OPEN or For LOOP before fetch
All I need is to get the value from ref cursor (if it exist and it should only have one value in it) ; if there is no record, then send to error.
What I'm not sure is if I need the closing statement at the end of FETCH.
-- x_cursor is a ref cursor
oracle_form.lov(p_lov_rec => v_lov_rec, x_cursor => x_cursor);
FETCH x_cursor INTO MyValue_hold;
IF x_cursor%NOTFOUND THEN
x_return_status := 'INVALID';
ELSE
x_return_status := 'VALID';
END IF;
CLOSE x_cursor; --- Do I need this close statement ??
Thank you

It is good practice to always explicitly close cursors that have been explicitly opened.
Whilst oracle does implicitly close cursors, this is not necessarily done immediately i.e. there may be a delay in oracle sorting out the garbage. Leaving cursors open can result in the "TOO MANY OPEN CURSORS" error if you're not careful.

Similar Messages

  • My daughter's ipod nano shows up in "devices" when I plug it in...but it disappears.  Right away it says it needs to update, but then after extracting the files it comes back and says that it can't be updated because it can't be unmounted.  help?!

    My daughter's ipod nano shows up in "devices" when I plug it in...but it disappears.  Right away it says it needs to update, but then after extracting the files it comes back and says that it can't be updated because it can't be unmounted.  help?!

    When in DFU mode and connected to the computer iTunes does not say anything but iTunes will see the iPod and you can restore the iPod via iTunes. When in recovery mode and you connect, iTunes will say it found an iPod in recovery mode.

  • Is there a way to reference a variable name by the value of a String?

    I realize my title may not be expressing the question accurately so...
    In perl I can do this:
    $varname = "nIterations";
    ${$varname} = 27;
    which is the same thing as
    $nIterations = 27;
    Is there a way to do this in Java?
    eg I want something like
    String varname = new String( "nIterations" );
    How can I refer to a variable programmatically from the value of the varname string, or is there not a way to do this?
    Thanks!
    -Andy

    Thank you, I'm very new to java and am not sure I am seeing the big picture. I searched the forums and found this example:
    Map textFieldMap = new HashMap();
    textFieldMap.put("1", new JTextField());
    textFieldMap.put("2", new JTextField());
    JTextField textField = (JTextField)textFieldMap.get("1");
    textField.setText("some value"); // text field associated with "1"
    What I am confused with is how those textfields correspond to the 48+ textfields I have already placed on my applet canvas. I understand the example above as far as using the map to access specific textfields, but I am not sure how those textfields will match up to the ones I have ( which are named right now S11 , S12, ..., S116, ..., S31, S32, .., S316
    I am sure I am missing something.
    Thank you
    -Andy

  • After selecting the value from the list box, want to disable checkbox

    hi guru,
    After selecting the value from the list box, want to disable checkbox and custom control textbox(container) in module pool.
    so please help me on this.
    thanx,
    man

    in PBO,
    loop at screen.
      if screen-name = your textbox's name.
        screen-input = 0.
        modify screen.
      endif.
    endloop.

  • Plz ans this:after refreshing the values should not change

    hi,
    In my applcation iam using jsp as view.
    After entering the values if we refresh the page the values are
    invissible.Plese any body tell me is there any way to protect this one.

    use <jsp:usebean...
    suppose usebean id = beanid
    eg. for input type text use
    <input type="text" name=address value=<%=beanid.getAddress()%>
    like wise you proceeed..
    the above syntaxes maybe not properly. take care..

  • Need badi which triggers immediately after saving the vendor master data

    Hi all.
        I need a badi which triggers after vendor master (xk02) is changed . The badi should trigger after the data base commit ( i.e after all the changes have been stored in data base tables). Pls let me know
    Thans in advance.

    try these:
    EXIT_SAPLV45T_001       V45T0001     Customer exits text determination
    EXIT_SAPMF02D_001     SAPMF02D     User exits: Customer master data
    EXIT_SAPMF02K_001     SAPMF02K     User exits: Vendor master data
    EXIT_SAPMV45A_002     V45A0002     Predefine sold-to party in sales document
    EXIT_SAPMV45A_003     V45A0003     Collector for customer function modulpool MV45A
    EXIT_SAPMV45A_004     V45A0003     Collector for customer function modulpool MV45A
    BADI's:
    CUSTOMER_ADD_DATA     CUSTOMER_ADD_DATA     Additional Data at Customers
    CUSTOMER_ADD_DATA_CS     CUSTOMER_ADD_DATA_CS     Additional Data at Customers (Subscreen Container 4000)
    VENDOR_ADD_DATA     VENDOR_ADD_DATA     Additional Vendor Data
    VENDOR_ADD_DATA_CS     VENDOR_ADD_DATA_CS     Additional Data for Vendors (Subscreen 4000)

  • Customer Exit Variable to fetch the data from the cube..

    Hello Gurus,
    I am having a requirement to select the latest changed record from the cube while executing the query.  where we are having the Calday as the date with a variable .
    I suggested my client we can filter it at the DSO leve or Data loading level but my client dont want to distrurb the existing design so he want to perfrom the changes at the Query level only.
    For Example we are having below records in the cube.
    PO             Material     Calday       Qty         Price
    101            ABC          1/12           100         10
    101            ABC          2/12            100         10
    101            ABC          3/12            100         11
    I am having Calday in the selection screen as the variable.
    Now from the above example i need to show the record which has been changed on 3/12.
    For this i am planning to write the customer exit variable on the calday , when the user enter the range of Calday then i will fetch the whole records which fall in between the range and i will sort each PO with respect to the date and i will pick those which are the latest records.
    My Concerns:
    !. Kindly let me know if it is possible and what are the other things that i need to consider.
    2. Did it will impact the performance.
    Waiting for your quick replies
    Thanks & Regards
    KK

    Hi Mate,
    Sorry for late reply.
    By d way in your word.
    initially when the user enter the date range as the vairable input. suppose 1/12 to 31/12 then i will pick all those records which fall in this range.
    suppose the records are
    PO Date
    P1 01/12
    P1 02/12
    P2 02/12
    P2 03/12
    P3 03/12
    P3 04/12
    In the customer exit variable Now for each PO i will sort the date in ascending order and i will pick the last record to display it in the Report.
    The ouput will be
    PO Date
    P1 02/12
    P2 03/12
    P3 04/12
    Now hope you are aware about exit variable concept.
    so what value will pass in the calday filter.
    here after sorting on each PO , you will get 3 different dates, 02/12 for P1
    03/12 for P2
    and 04/12 for P3
    Now if you are aware about exit variable concept, then you will pass this three date to CALDAY(I_t_VAR_Range-low = ...)
    but how query will understand that for P1 calday filter value is 02/12, for P2 calday filter value is 03/12.... and so on...
    actually i have also experienced this kind of issue 1-2 years before, i have tried same thing at that time without thinking and stuck with this problem..
    By d way you can also learn from your mistake.. so just try ur logic and then you will understand what is the problem?
    By d way this will not work, parallel you can work on other solution.

  • Need help parsing a long and passing the value.

    I'm doing Cattle Drve 4b on javaranch.com (http://www.javaranch.com/say.jsp) and I need a bit of help.
    I want to pass the reference of my num value to several small methods to work out the value printed. Here's the original code I did from 4a:
    public class Say{
    public static void main(String[]args){
    int num = Integer.parseInt(args[0]);  // parse argument from command line
    String array[] ={"Zero", "One", "Two", "Three", "four", "five", "six","seven","eight",
               "nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen",
               "seventeen","eighteen","nineteen","twenty","thirty","fourty","fifty",
               "sixty","seventy","eighty","ninety"};     //initialize the array
    //start check for value
    if(num<21)
    System.out.println("\n" + array[num]);
                                            //  \n is added before
    else if(num<30)                                   //  each result for a
    System.out.println("\n" + array[20]+ "-" + array[(num-20)]);     //  cleaner output
    else if(num<40)
    System.out.println("\n" + array[21]+ "-" + array[(num-30)]);
    else if(num<50)
    System.out.println("\n" + array[22]+ "-" + array[(num-40)]);
    else if(num<60)
    System.out.println("\n" + array[23]+ "-" + array[(num-50)]);
    else if(num<70)
    System.out.println("\n" + array[24]+ "-" + array[(num-60)]);
    else if(num<80)
    System.out.println("\n" + array[25]+ "-" + array[(num-70)]);
    else if(num<90)
    System.out.println("\n" + array[26]+ "-" + array[(num-80)]);
    else if(num<100)
    System.out.println("\n" + array[27]+ "-" + array[(num-90)]);
    //endFor 4b I need to be able to print out values in the billions, so I was going to create a few methods to keep it clean like so:
    public class billion (long (int num)
    { if( num<9 billion)
         num-= 8 billion
    System.out.print("eight billion ");
    else if(num<8 billion){
    num-= 7 billion
    System.out.print("seven billion ");
    ....etc
    return num;
    public class million...
    public class thousand...
    etc.And the current main section will be moved into a new "tens" class.
    I'm running into two problems though.
    1. How do you parse a long? I know integers are like so:
    int num = Integer.parseInt(args[0]); are longs the same?
    like:
    long num = Long.parseLong(args[0L])if not, how can I do it?
    2. how do I properly pass num to all the methods? I'm going to make num a public int and make the methods public because that seems simplest, but can I pass num to the method and then return the new value of num back to main?
    BTW, I'll be removing the carriage return from the beginning of the "tens" class when all is said and done so the results don't end up printing on multiple lines.
    Thanks in advance everyone.

    The L suffix is used to identify a Long literal.
    The index of the args[] array does not need to be specified as a Long.
    Solong num = Long.parseLong(args[0]);will suffice. You might want to put that in a try/catch block to catch the NumberFormatException that will be thrown if args[0] cannot be parsed to a long value.
    Various ways to update the value of num in the methods of the same class:
    Simplest of all: declare num as an instance variable. The methods simply access and assign its value.
    Other ways:
    -- pass num as a parameter to the method.
    -- return the value of num from the method (provided the method doesn't have to return any other value)
    -- Have a getNum() method return the value of num
    -- Have setNum() method to update the value of num
    db
    What's that line? public class billion (long (int num)edit Typos, typos...
    Also, the set/get approach with public access is the preferred method when used in the methods of another class.
    Don't forget that the other class has to know whose set/get methods to call.
    Message was edited by:
    Darryl.Burke

  • Update the data in hGrid After fetching the data in Search Page

    Hi All,
    i have a search page,when we click on search button,we got the data and here we have update button to update the data,
    here, i am going to show and updatae the data through hGrid functionality. i don't know how can we update through hGrid.
    could you please tell me how we update the data through hGrid. Any examples are there in OAF ToolBox.
    could you please any one explain this one.
    Regards,

    Hi,
    ---In HGRID page try to create update button.
    ---In button set propertoes action , pass parameters in SPEL and set event:Update.
    ---In CO get the action of the event navigate to the next page.
    ---In update (3rd page) co process request get the value of po header id.
    ---Create eo based vo adn pass po header as bind param and execute the query.
    ---Here u can edit the fields
    ---after editing on click on save button call OADBTrancation.commit().
    Regards
    Meher Irk

  • Variable not  transfer the value to planning function

    Hi,
    I am facing a problem while executing the planning sequence.
    In my workbook I have a button, behind that button one planning sequence is attached ( it copy the quantity from one scenario to other scenario) along with two varaible. Value for variable is pass behind the button.
    Both variable are multiple single value type.
    CMD                                                1         EXECUTE_PLANNING_SEQUENCE (copy)
    PLANNING_SEQUENCE_NAME        1        YNDPP59_A_SQ046
    VAR_NAME_1                                1        YQUXN_YN_SCENAR_007(from scenario)
    VAR_VALUE_EXT_1                        1         F25
    VAR_NAME_2                                1        YQUXO_YN_SCENAR_001(to scenario)
    VAR_VALUE_EXT_2                        1         F50
    Now, I have other buttons in my workbook. They used to  copy from one scenario to other but variable for scenario use is same for all.
    Example Scenario :-
    Button 1:- copy demand to photo demand
    Button 2:- copy confirmed demand to demand
    Before Image
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         100 To                 0 To                       200 To
    First time:
    When I used button 1(copy demand to photo demand) it's works fine.
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         100 To                 100 To                       200 To
    I do the manual changes in Key figure(demand)
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         150 To                 100 To                       200 To
    then use button2 (copy confirmed demand to demand) it works fine
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         200 To                 100 To                       200 To
    Second time:
    When I used button 1(copy demand to photo demand) it's works fine.
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         200 To                 200 To                       200 To
    I do the manual changes in Key figure(demand)
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         150 To                 200 To                       200 To
    then use button2 (copy confirmed demand to demand )it didn't work fine
    Basin   Subfamily  Quarter    KF1(Demand)   KF2(Photo Demand)  KF3(Confirmend Demand)
    100           70        20083         150 To                 150 To                       200 To
    it executed the planning sequence running behind button 1
    So, problem is my variable keep the last values. Please, help me to solve this problem.
    Thanks and regards,
    Deepak Singh

    Hi,
    Your post is little bit confusing ;
    What i understood is that your planning function is not running with proper value of variables ;
    Two things can be the reasons :
    1. the data set that you are running for second time may be improper which can be when the data is not saved in cube
    2. The variable value is wrong ; please check in debug what value of variable it is taking; if for the first time the value of variable is proper than there shouldn't be any error for second time;
    Post your questions in little simpler way that will be easy to understand;
    Thanks
    Pratyush

  • Need help for report Variable to restrict the key figure value...

    Hai gurus,
    Now i have data in the cube as follows...
    Reuisition     HR INTW date     LM INTW DATE     TEL INTW DATE     HR Count     LM Count     TEL Count
    a1              01.01.2010     02.01.2010             01.04.2010                 1                1                 1
    a2              02.02.2010     03.02.2010             02.02.2010                 1                1               1
    a3              03.03.2010     04.03.2010             03.03.2010                 1                1               1
    when i execute the report it shd ask the prompts with Date interval as in the below...
    HR INTW date
    LM INTW DATE
    TEL INTW DATE
    if i dont give any interval in the variable prompt it should display all the recors as follows
    Reuisition     HR Count     LM Count     TEL Count
    a1               1                  1               1
    a2               1                  1                     1
    a3               1                   1             1
    If i give LM INTW DATE interval as    01.01.2010 to 31.02.2010
    then it should display all the other counts as in the output_1 , but for LM count for a3 it should show 0.
    Reuisition     HR Count     LM Count     TEL Count
    a1               1                  1               1
    a2               1                  1                     1
    a3               1                 0                  1
    that means wherever i restrict the data depending on the variable that only that interval key figure value shd be in the report..
    for this scenario, which variable i need to use... and how i need to restict the KFig value in the report...
    Right now i am getting like this but it is restricting the records,,, where it should not restrict the records...in the report..
    Please guide me for the same...
    If any concerns about the scenario please let me know...
    Regards,
    VJ

    hi chowdary ,
    could you tell me the var. creation in detail and  with which reference object i need to create ...
    whether i need to take LM_DATE / 0DATE while creating variable...
    and i kept this variables it in filter section, based on the LM_DATE Object.
    i have tried both.. y'day when i take 0DATE it giving me some results...
    But at the same time it is restricting the records..
    i think it could be a problem with var.. properties?
    need more inputs pls.
    Regards,
    VJ

  • Do i need to re-set bootblk after replaced the second SCSI hdd in sun box?

    I have a sun box with 2 SCSI hdd inside. The second hdd faulty..
    then i follow the instruction to detach and metaclear..and metainit again...
    but i am not sure that do i need to set bootblk again in the new hdd (2nd)?
    after metainit, i have attach to the 1st-way mirror. and it is doing syncronization.......
    can anybody answer this?
    Question 1) Do i need to install bootblk in new SCSI hdd?
    Question 2) If the hdd is FC-AL hdd, do i need to reinstall bootblk?
    Raymond

    Hi,
    Yes, i need to replaced a new hardisk.. And i also need to copy the VTOC from the good hardisk to the new 1...
    but if like wat u said - copy VTOC from good hardisk to new hdd, then no need copy bootblk.
    Then why when we create a 2 way mirror from scratch.... we need to create bootblk to the second hardisk? becoz when create from scratch, we also need copy VTOC from 1st hdd to 2nd hdd..
    am i right?
    raymond

  • Need to find a document after emptying the trash.

    Not too long ago I looked through the list of things I had put in the Trash.  Some how I over looked a document I should have removed from the Trash and Empetyed Trash.  There is some way to locate what has been empteyed from the Trash and get it onto the Desktop.  How do I do that?
    I have not Secured Empty Trash... so my document should still be able to be found and removed from the Emptey Trash.

    As Michael says, it's touch and go as to whether you can retrieve the file.
    Most used applications for data recovery are;
    Data Rescue 3;
    http://www.prosofteng.com/products/data_rescue.php
    Stellar Phœnix;
    http://www.macintosh-data-recovery.com/
    Both programmes will give you a free download to scan your HD and see if the files are recoverable, but you'll have to pay for the full application to actually recover them. I've personally used DR3 with reasonable results on a bad drive, though it fails on more obscure file formats (I lost all my Audacity .aup files).
    You'll need to be able to run the rescue application from another drive (a bootable clone is best).
    Or you could just restore from your TM backup…

  • Need to reset prefences settings after recharging the battery

    Hello,
    For some reason, everytime I recharge the battery after it is completely drained, I have to reset the language, date, time, etc on my Ipod.
    It dosent ever happen when I charge the battery after being only partially drained, only when it's is totally drained and recharged...
    Anyone have any ideas?
    Thanks!
    jcop

    Hi groundflight5150,
    I'm attaching a link below to the user manual for the 8150B series of controllers.  I don't believe that the BIOS is password protected by default, so you may want to contact the person you purchased this from to find out what the password is.  However, there is information in the manual regarding how to clear out the CMOS contents, so this might help.
    PXI-8150B Series User Manual
    http://www.ni.com/pdf/manuals/322321a.pdf
    Josh B
    Applications Engineer
    National Instruments

  • Lenovo 3000 n200 close lid goes dark after upgrade the BIOS. Please HELP!!!

    The lid is set to do nothing but the screen turns off and i cant get it back on by using the keyboard or mouse.
    Only way is to use function keys to standby and bring it back.
    My notebook configs as below:
    CHI XP Pro
    Bios version: LENOVO 66ET42WW (1.16 ) 04/03/2008
    Display Driver version: 6.14.10.4977, 8-11-2008

    I found this prolem on 3000 v2000 (0764-a46) too.
    - os : windows xp sp3 (also in windows xp sp2)  but this problem doesn't found in windows vista
    - cause : i found that after i'm install vga driver this problem is occur (but uninstall vga driver this problem isn't occur) 
    I think lcd is turn off but system doesn't hang because i try to press windows + U + U (shut down windows) then system is turning off.
    if i press windows + U + R (restart ) system is restarting but lcd isn't turn on
    i search this problem on internet and found similar problem on other product they says: windows try to swap primary display and secondary display

Maybe you are looking for

  • Photos blurry when upload to MobileMe

    When I upload certain photos from Aperture to MobileMe, a lot of them come out blurry! I notice that all of the blurry ones are ones I originally photographed in RAW format. Am I not saving these files correctly in Aperture?? Are the masters being up

  • SGOS_URL_CREATE_DIALOG

    Good morning, does anybody knows how can I use this function module to include a URL in a Material. This function is used to upload hyperlinks as a services for object but I don't know how can I use it? Regards

  • DTP Dump: Exception- CX_SY_DYNAMIC_OSQL_SEMANTICS - Any Insights?

    Hi Experts, While excuting DTP for PSA to DSO, it is going into short dump. ST22 indicates that an exception of type CX_SY_DYNAMIC_OSQL_SEMANTICS occured, and the cause of exception was "The database column 'LAEDA' is unknown ". I have gone through t

  • Call LabVIEW VIs from MATLAB

    Does anybody know of a simple way to call LabVIEW VIs from within a MATLAB m-file?  I would like to be able to write VIs in LabVIEW and then script them (for stochastic analysis, etc.), and think MATLAB would be an awfully convenient way to do this (

  • Routing operation split

    hi all, I have defined 2 splits in the work center. Operation split is ticked in routing. When I create an order for 10 units , it is getting split as 7.5 and 2.5. i would like to know where this proportion is defined if it can be ? Regards, Yogesh