How to find previous and next value of a cursor?

Im trying to do an update to a table.
I have a set of rows fetched in a cursor. Now i loop through the cursor and update a field in the table.
for certain condition alone i need to fetch the previous value in the cursor and update the table with that.
can anyone let me know if i can fetch the previous and next value of a cursor for this DML operation?
Thanks in advance.

You can do it via PL/SQL routine.

Similar Messages

  • How to find index and minimium value in ArrayList?

    Hi,
    I got an ArrayList numbers that contains the following....
    [4,5,4,3,3,4,4,3,6,5]
    How do I go through the ArrayList numbers, such that I can get the
    minimum value and it's index number in the arrayList?
    For example, the above arrayList got three min number of 3, I will
    get either one of the 3 and also get it's index of 3, 4 or 7.
    The ArrayList number can have another number of records inside it.
    Please advice.
    Thank you.

    Please do not cross post:
    http://forum.java.sun.com/thread.jsp?thread=471261&forum=31&message=2177088
    Besides, I would not forcibly qualify this topic as an advanced one.

  • The find box (previous and next) has just stopped functioning while I was reviewing a pdf file. How can I resurrect it?

    The find box (previous and next) has just stopped functioning while I was reviewing a pdf file. How can I resurrect it?

    [discussion moved to Creating, Editing & Exporting PDFs forum]

  • HT2470 The Finder toolbar, by default, has Previous and Next buttons that let you navigate back and forth in folders. I somewhat change that setting and can't go back and foreward. How do I change this setting to the original one? I tried everything!

    The Finder toolbar, by default, has Previous and Next buttons that let you navigate back and forth in folders. I somewhat change that setting and can't go back and foreward. How do I change this setting to the original one? I tried everything! Help!

    Select a Finder window, Finder->View->Customize Toolbar…, and add it back.

  • Firefox can't find the file at (a location is specified) when either "Navigate previous" (and next) buttons are pressed in an HTML5 skin (but OK in IE/Chrome).

    I create HTML5 help projects from a package called MadCap Flare. It uses what they call an HTML5 'skin' that sets the style/layout of the page and also includes 'Navigate previous' and 'Navigate next' buttons. When viewing the help and pressing these navigate buttons in IE8 or Chrome 32 there is no problem, but in Firefox 27 I get the following: (typical error for pressing a button on any page)
    "File not found"
    "Firefox can't find the file at /C:/SVN/FlareEnglishOnLineHelp/Output/HTML5_Help_Modeller_Reference/4attrib/idh_jointinterface_element_meshes.htm?TocPath=Modeller Reference Manual|Chapter 5 : Model Attributes|Meshing|_____2."
    " Check the file name for capitalisation or other typing errors."
    " Check to see if the file was moved, renamed or deleted."
    - Because the files and buttons work in other browsers I'm wondering just what is going on here with Firefox>>>>

    I should correct that last entry and state that the | charactacters are generated automatically in the Toc-Path for each 'book' name in the online help, and are not something manually created, whereas the : characters have come from the TOC book topic names (which were manually entered names and are what we would ideally require). But, because 'previous' and 'next' topics within nested TOC books without colon (:) characters CAN be browsed successfully when just | characters are present in the Toc-Path, the limitation would appear to be solely due to the : characters.

  • Webhelp: how to add a Previous and Next button

    I'm using Robohelp 8 and generating Webhelp on a Windows XP machine. The output displays on IE by default.
    My problem is simple: In my Webhelp output, I want a Previous and Next button to appear at the top of each topic. That's all. But I don't see how to set this.
    I don't want to create browse sequences; if select topic B, and I've already opened topic D and Z, I should be able to click the Previous button to go from topic D -> topic B, or the Next button to go from topic Z to topic B.
    Also, how do I open my Webhelp output so that the TOC is open (i.e., all topics are displayed so you don't have to click books to open. Thanks for any help.
    Len

    Hi!
    I found this topic as a search I did for also including Back and Forward buttons into a pop-up help page and have found it very helpful and useful, thanks.
    I am currently using RH 10, do you know of anything withine RH 10 that can be used to do this for us?
    I was also wondering if you might be able to help with a further query I have regarding these buttons:
    Currently, when a user clicks the help button within the web based software, the topic associated to that page will be displayed in a pop-up screen. The Help Menu is not displayed and there is no URL field displayed with a Back and Forward button. If the user clicks a link from this help page to another help page, there is no way of getting them back to the previous page without closing the page and then clicking the help button again.
    The requirement is to have Back and Forward buttons added to the help pages that remembers the history of where the user has been rather than moving them up and down the contents. (This part of the requirement I have now fixed with the help of your response to this initial query.) -  The buttons need to be hidden or inactive if there is no history associated, then becoming active or seen if the user has clicked a link. See the following:
    Click a help button on a required software page – help detects that there is no history and therefore the Back and Forward buttons are not required and are not displayed/enabled (not active).
    IF the user clicks a link on the displayed help, then on the new page of help the Back button will display/enable but not the Forward button as there is no more help been opened from this page (yet).
    If the user then clicks the Back button, the user is taken back to the previous page that was displayed. However, it notices that there is no more history beyond this page and the Back button either disappears or disables (becomes inactive).
    IF the user clicks another link from the second page, this would be the third page of help displayed. The Back button would be displayed/enabled but the Forward button would not be displayed or set as inactive.
    IF the user clicks the Back button from the third page, page 2 would have both Back and Forward buttons active/displayed.
    This would continue with each link to new pages, i.e. the history would recognise the first opened page of help and recognise that there is not anything in front of the new page that has been opened.
    This logic should also work if the user has opened the full help, selected a topic from the menu and then clicked a link from that opened page. The Back button would be displayed/enabled so that the user would be able to go back to the previous page they were on. Same with the Forward button.
    I hope this all makes sense. I wonder if you might be able to point me in the right direction or if this is something that I should talk to our web developer about?
    Many thanks,
    Nicola

  • How to: Horizontal slideshow with parts of previous and next images

    I want to make a slideshow with 6 images in it. The centre image is fully visible, the previous and next images, you can only see parts of it. When you click on the button for previous and next the image swipes tot the centre. Is this possible in Muse, and how???
    I dont want to show the slideshow in the full background( yellow area in the screenshot) but only in the main container.(see image below)

    "Previous" and "Next" buttons are for selecting the next or previous menu in a series of submenus for multiple chapter selection. Look at the options for indexing that creates multiple submenus for the chapters in a timeline.

  • Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    Something was hidden in a download and now these double green underlined hyperlinks show up everywhere, and pop ups too whenever I click on ANYTHING. I can't figure out how to find it and get rid of it.

    You installed the "DownLite" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
    Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "VSearch" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    This trojan is distributed on illegal websites that traffic in pirated movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that the DownLite developer has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight is inexcusable and has compromised the value of Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Date Picker with Previous and Next Year Options

    Hi All,
    I am implementing a date picker in my application which is tied to an attribute of type PA0001-BEGDA. Date Picker as such works fine but navigating to previous year and Next year options are not available. User has to go month by month to different years if they have to navigate.
    Is this the normal behavior of the Date Picker or am I missing something else to get the previous and Next year icons in the Date Picker.
    Thanks,
    Nagarajan.

    hmm..I tried using the select options and it did give the same date picker with the previous and Next navigation icons...The only problem with the select options is that its a single field which has the range and can accept multiple values too...
    I tried to figure out how the date picker that we use in the custom application and the one in Select Options differ but no luck...Does this ring any bell?
    Thanks,
    Nagarajan.

  • Finding x and y values of a Line Chart

    Hi,
    For instance, I had a line chart with x and y axis. When I move mouse to the line chart how can I determine x and y axis values? With mouseMoved metod i can find the coordinates but coordinates doesn't help me to find x and y values of the line chart.
    How can I find x and y values of a Line Chart?
    Thanks in advance

    Translate from model to view and back. Another way to do this is to create an
    AffineTransform for the modelToView and use it to transform the points. Create an inverse
    transform to use in the viewToModel method. Add a ComponentListener and reset the transforms
    in the componentResized method to keep them updated.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    public class Translation extends JPanel {
        JLabel xLabel;
        JLabel yLabel;
        NumberFormat nf;
        double[] data = { 16.0, 32.9, 7.4, 18.9, 12.3 };
        final int Y_GRADS = 5;
        final int PAD = 35;
        final int SPAD = 3;
        final int TICK = 2;
        double maxVal;
        public Translation() {
            nf = NumberFormat.getInstance();
            nf.setMinimumFractionDigits(1);
            nf.setMaximumFractionDigits(1);
            maxVal = getMaxValue();
            addMouseMotionListener(sweep);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            drawAxes(g2);
            plotData(g2);
        private void plotData(Graphics2D g2) {
            for(int j = 0; j < data.length; j++) {
                Point2D.Double p = modelToView(j, data[j]);
                if(j < data.length-1) {
                    Point2D.Double next = modelToView(j+1, data[j+1]);
                    g2.setPaint(Color.blue);
                    g2.draw(new Line2D.Double(p, next));
                g2.setPaint(Color.red);
                g2.fill(new Ellipse2D.Double(p.x-2, p.y-2, 4, 4));
        private Point2D.Double modelToView(double x, double y) {
            double h = getHeight();
            Point2D.Double p = new Point2D.Double();
            p.x = PAD + x*(getWidth() - 2*PAD)/(data.length-1);
            p.y = h-PAD - y*(h - 2*PAD)/maxVal;
            return p;
        public Point2D.Double viewToModel(double x, double y) {
            double h = getHeight();
            Point2D.Double p = new Point2D.Double();
            p.x = (x - PAD) * (data.length-1) / (getWidth() - 2*PAD);
            p.y = (h - PAD - y) * maxVal / (h - 2*PAD);
            return p;
        private void drawAxes(Graphics2D g2) {
            int w = getWidth();
            int h = getHeight();
            double xInc = (double)(w - 2*PAD)/(data.length-1);
            double yInc = (double)(h - 2*PAD)/Y_GRADS;
            // Abcissa
            g2.draw(new Line2D.Double(PAD, h-PAD, w-PAD, h-PAD));
            // Tick marks
            double y1 = h-PAD, y2 = y1+TICK;
            for(int j = 0; j <= data.length; j++) {
                double x = PAD + j*xInc;
                g2.draw(new Line2D.Double(x, y1, x, y2));
            // Labels
            Font font = g2.getFont().deriveFont(14f);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            LineMetrics lm = font.getLineMetrics("0", frc);
            float sx, sy = h - PAD + SPAD + lm.getAscent();
            for(int j = 0; j < data.length; j++) {
                String s = String.valueOf(j);
                float width = (float)font.getStringBounds(s, frc).getWidth();
                sx = (float)(PAD + j*xInc - width/2);
                g2.drawString(s, sx, sy);
            // Ordinate
            g2.draw(new Line2D.Double(PAD, PAD, PAD, h-PAD));
            // Tick marks
            double x1 = PAD, x2 = PAD-TICK;
            for(int j = 0; j <= Y_GRADS; j++) {
                double y = PAD + j*yInc;
                g2.draw(new Line2D.Double(x1, y, x2, y));
            // Labels
            for(int j = 0; j <= data.length; j++) {
                String s = nf.format(maxVal*(1.0 - (double)j/data.length));
                float width = (float)font.getStringBounds(s, frc).getWidth();
                sx = (float)(PAD - SPAD - width);
                sy = (float)(PAD + j*yInc + lm.getAscent()/3);
                g2.drawString(s, sx, sy);
        private double getMaxValue() {
            double max = -Double.MAX_VALUE;
            for(int j = 0; j < data.length; j++) {
                if(data[j] > max) {
                    max = data[j];
            return max;
        MouseMotionListener sweep = new MouseMotionAdapter() {
            public void mouseMoved(MouseEvent e) {
                Point2D.Double p = viewToModel(e.getX(), e.getY());
                xLabel.setText(nf.format(p.x));
                yLabel.setText(nf.format(p.y));
        private JPanel getLast() {
            xLabel = new JLabel();
            yLabel = new JLabel();
            Dimension d = new Dimension(45, 25);
            JPanel panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(2,2,2,2);
            addComponents(new JLabel("x ="), xLabel, panel, gbc, d, true);
            addComponents(new JLabel("y ="), yLabel, panel, gbc, d, false);
            return panel;
        private void addComponents(JComponent c1, JComponent c2, Container c,
                                   GridBagConstraints gbc, Dimension d, boolean b) {
            gbc.weightx = b ? 1.0 : 0;
            gbc.anchor = GridBagConstraints.EAST;
            c.add(c1, gbc);
            c2.setPreferredSize(d);
            gbc.weightx = b ? 0 : 1.0;
            gbc.anchor = GridBagConstraints.WEST;
            c.add(c2, gbc);
        public static void main(String[] args) {
            Translation test = new Translation();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.getContentPane().add(test.getLast(), "Last");
            f.setSize(500,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • How to find classtype and class for a material.

    Hi,
    How to find classtype and class for a material.
    which table contains this data.
    Thanks
    Kiran

    Hi Kiran,
    Check below sample code. Use this BAPI which will give all info about the class for the material.
      DATA:      l_objectkey_imp    TYPE bapi1003_key-object
                                         VALUE IS INITIAL.
      CONSTANTS: lc_objecttable_imp TYPE bapi1003_key-objecttable
                                         VALUE 'MARA',
                 lc_classtype_imp   TYPE bapi1003_key-classtype
                                         VALUE '001',
                 lc_freight_class   TYPE bapi1003_alloc_list-classnum
                                         VALUE 'FREIGHT_CLASS',
                 lc_e               TYPE bapiret2-type VALUE 'E',
                 lc_p(1)            TYPE c             VALUE 'P',
                 lc_m(1)            TYPE c             VALUE 'M'.
      SORT i_deliverydata BY vbeln posnr matnr.
      CLEAR wa_deliverydata.
      LOOP AT i_deliverydata INTO wa_deliverydata.
        REFRESH: i_alloclist[],
                 i_return[].
        CLEAR:   l_objectkey_imp.
        l_objectkey_imp = wa_deliverydata-matnr.
    *Get classes and characteristics
        CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'
          EXPORTING
            objectkey_imp         = l_objectkey_imp
            objecttable_imp       = lc_objecttable_imp
            classtype_imp         = lc_classtype_imp
    *   READ_VALUATIONS       =
            keydate               = sy-datum
            language              = sy-langu
          TABLES
            alloclist             = i_alloclist
    *   ALLOCVALUESCHAR       =
    *   ALLOCVALUESCURR       =
    *   ALLOCVALUESNUM        =
            return                = i_return
    Thanks,
    Vinod.

  • How to find min and max of a field from sorted internal table

    Hi,
    I have sorted Internal Table by field f1.
    How do I find max and min value of f1.
    For min value of f1 I am using,
    READ TABLE IT1 INDEX 1.
    IT1-F1 = MIN.
    Is this correct? And how do I find the max value of f1 from this table.
    Thanks,
    CD

    Yes, that is right, and you can get the max like this.
    data: lv_lines type i.
    * get min
    READ TABLE IT1 INDEX 1.
    MIN  = IT1-F1.
    * get max
    lv_lines = lines( it1 ).
    read table it1 index lv_lines.
    MAX  = IT1-F1.
    Regards,
    Rich Heilman

  • Previous and Next Record

    Is there any additional code needed to replicate the functionality of the previous and next record buttons in the standard toolbar other than the built-ins that are provided? I'm getting some weird results by just using the built-ins. Thanks!

    Well, to give you and example, when I query the first record and then press the button that uses the previous_record built-in I get the message: at first record (same as the toolbar button). However, when I press the next record button, I'll eventually get the message: field must be entered (whereas, the toolbar button will bring up the message: record must be entered or deleted first). I was wondering why the next_record built-in would bring up a different message, and how to get my button to function the same way as the one in the toolbar.

  • Can't figure out the AC to use for my "Previous" and "Next" buttons

    Hi guys,
    I have a slidshow that stretches over 280 frames which can be
    seen here:
    http://www.paragon-nj.com/newslideshow.html
    or the fla:
    http://www.paragon-nj.com/newslideshow.fla
    There are fade ins and outs and I made buttons numbered 1-5
    where you can skip to each new slide. At present I am trying to
    create the "previous" and "next" buttons but I'm hitting a snag of
    how you make something like this work. The entire AC I have is
    this:
    a.onRelease=function(){
    gotoAndPlay(1);
    b.onRelease=function(){
    gotoAndPlay(55);
    c.onRelease=function(){
    gotoAndPlay(110);
    d.onRelease=function(){
    gotoAndPlay(165);
    e.onRelease=function(){
    gotoAndPlay(220);
    next_btn.onRelease = function () {
    (not sure what to put here) ;
    previous_btn.onRelease = function () {
    (not sure what to put here) ;
    Thanks in advance for all the input
    Wil

    use the _currentframe+55 for your next button and
    _currentframe-55 for your previous button unless the current frame
    is 1 or 55 when you were inconsistant used 54 frames between slide
    transitions.

  • How to find if COLUMN DEFAULT VALUE is stored as metadata?

    Hello,
    I'm using Oracle 11g enhanced ADD COLUMN Functionality. Adding new columns with DEFAULT values and NOT NULL constraint no longer requires the default value to be stored in all existing records.
    Sometimes we change DB columns from NOT NULL with DEFAULT to NULL with DEFAULT. This operation "materialize" column default.
    Is there an easy way (Dictionary view) how to find, that COLUMN default value is stored as metadata or is "materialized" ?
    Thanks. Filip
    Oracle RDBMS version : Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    Thanks for your suggestion, but it is not what i'm looking for :-(
    I don't need to find the default value, i need to know how is default value stored. It could be stored in 2 ways.
    1. "materialized" - prior to 11G (value is physicaly stored for every column)
    2. "as a metadata" - new 11G functionality (default is not physicaly stored and if you query the column DB transalte NULL value to defaut value)
    Now I would like to now if my column is type 1) or 2). How can I do it?
    Thank you.Filip

Maybe you are looking for

  • How do I check if I need SAP GUI 7.10 Patch-Level 7?

    Hi, I have installed SAP GUI 7.10 client. After restarting the PC, I tried to install the Patch-Level 7 but I got the message: This SAP Front End Patch cannot be applied. Either this patch is already installed or the components to be patched are not

  • Satellite A350 - White Screen Of Death

    Hi I recently broke my screen in a temper tantrum and sent it in to Toshiba repair. They replaced my screen. That was about a month ago. I installed windows 7 3-4 days ago and it worked fine. I opened my laptop one night to discover a blank white scr

  • License keys are not saved

    Hi there, i´ve got a problem. In some applications (billings, some plugins in Photoshop) are the licence keys not saved. I have to enter them again and again when starting them. It would be great if someone could help. Thanks

  • Call Of Duty Advanced warfare Belgische clan zoekt leden PS4

    Dag beste gamers... K'zal eerst eens beginnen met men eige voor te stellen. Ik ben 24 jaar al actief op COD van MW1, zotgoe in Quickscope ...  mijn K/D is momenteel rond 1.5 op AW. ik ben op zoek achter gemotiveerde Belgische gamers leeftijd 15+ geen

  • Report Painter GRR2

    Hi All, I have added a row to the existing report pension account with GL Account 52540. saved the report and executed. but the row does not appear in the report when I run the report in GR55. I have checked all the settings. it appears okay to me. I