Problem in updating a date in ResultSet

Can anybody tell how I can convert a String value to Date to use as
String fVal="03/10/2001";
rs.updateDate(Cnode.getNodeName(),java.sql.Date.valueOf(fVal));
If I try this...it gives me IllegalArgument...Pl suggest the right way

try the following:
rs.updateDate(Cnode.getNodeName(), new java.sql.Date(new java.text.SimpleDateFormat("dd/MM/yyyy").parse(fVal).getTime()));
Regards,
Pablo

Similar Messages

  • Problem while updating Delivery date uisng BAPI_PO_CHANGE

    Hi friends,
    Iam facing a problem while updating delivery date of a purchase order using the bapi BAPI_PO_CHANGE
    After the bapi is getting triggered iam geting sy-subrc = 0
    But in the return parameters iam getting 3 error messages so iam unable to update the  delivery date..
    Error meesage which iam getting are
    a) Purchase order still contains faulty items
    b) Enter Tax Code
    c) Instance 1000001 of object type PurchaseOrder could not be changed.
    How can i correct it..
    Please find my code below
    LOOP AT it_eket INTO wa_eket.
        wa_poschedule-po_item = wa_eket-ebelp.
        wa_poschedule-sched_line = wa_eket-etenr.
        wa_poschedule-delivery_date = wa_eket-eindt.
        APPEND wa_poschedule TO poschedule.
        wa_poschedulex-po_item = wa_eket-ebelp.
        wa_poschedulex-sched_line = wa_eket-etenr.
        wa_poschedulex-po_itemX = 'X'.
        wa_poschedulex-sched_lineX = 'X'.
        wa_poschedulex-delivery_date = 'X'.
        APPEND wa_poschedulex TO poschedulex.
    READ TABLE IT_EKPO INTO WA_EKPO WITH KEY EBELN  = WA_EKET-EBELN
                                             EBELP = WA_EKET-EBELP.
          IF SY-SUBRC = 0.
          WA_POITEM-PO_ITEM = WA_EKPO-EBELP.
          APPEND WA_POITEM TO POITEM.
          WA_POITEMX-PO_ITEM = WA_EKPO-EBELP.
          WA_POITEMX-PO_ITEMX = 'X'.
          APPEND WA_POITEMX TO POITEMX.
         ENDIF.
        CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            purchaseorder = wa_eket-ebeln
          TABLES
            return        = t_bapiret2
            POITEM        = POITEM
            POITEMX       = POITEMX
            poschedule    = poschedule
            poschedulex   = poschedulex.
        READ TABLE t_bapiret2 INTO wa_bapiret2 WITH KEY type = 'E'.
        IF sy-subrc NE 0.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =.
          IF sy-subrc = 0.
            WRITE :  'DELIVERY DATE UPDATED'.
          ENDIF.
        ENDIF.
    how can i correct it...
    Regards
    Kumar

    Hi,
    Pass the following values...
    POACCOUNT LIKE BAPIMEPOACCOUNT...
    poaccount-TAX_CODE = ? (value)....
    That should take care of the missing field.
    Regards,
    Madan..

  • Problem in updating delivery date in va02

    hi abapers,
    my requirement is to update the delivery date in va02 at header level. i have this code in sapmv45a, include is mv45afzz,
    written code in move_fields_to_vbak.
    when ever iam running the va02 tcode i am getting my updated delivery date , when iam saving again this exit triggering so that again delivery date is updatting.
    here x is the updated date getting from z function module. iam pasing this value to below statement
    vbak-vdatu = x.
    so that how to stop triggering the code  while saving.

    hi abapers i posted the code, here the problem iam facing is that, when ever iam opening the va02  tcode updated delivery date  is coming but when ia msaving again this is triggering so that first updated date is again updating .
    here x is the day no comes from function module  in below code , iwll compare x with following zroutern  function module .
    suppose .
    updated date is 17.12.2010 so that i will push to vbak-vdatu = 17.12.2010. but here again date_compute_day is again calcultaing day from 17.12.2010 so that again that day  which is stored is x again compared to zroutern function module .
    here i aim is when ever i get updated date then  it shuold come out of this application .
    plese suggest .
    READ TABLE XVBAP INDEX 1.
    READ TABLE XVBPA WITH KEY  VBELN = XVBAP-VBELN
                               "POSNR = XVBAP-POSNR
                               PARVW = 'WE'.
    IF SY-SUBRC = 0.
      L_KUNNR = XVBPA-KUNNR.
      ENDIF.
      IF SY-UZEIT+0(2) >= 15.
        E_RDD = SY-DATUM + 2.
        ELSE.
          E_RDD = SY-DATUM + 1.
          ENDIF.
          IF E_RDD > VBAK-VDATU.
            OP_RDD = E_RDD.
            ELSE.
              OP_RDD = VBAK-VDATU.
         endif.
              CALL FUNCTION 'DATE_COMPUTE_DAY'
                EXPORTING
                  DATE          = OP_RDD
               IMPORTING
                DAY           = X.
      CALL FUNCTION 'ZROUTESCHEDULE'
        EXPORTING
         KUNNR         = L_KUNNR
        VSBED         =
          VSTEL         = VBAP-VSTEL
          ROUTE         = VBAP-ROUTE
       IMPORTING
         ZRETURN       = IT_RETURN.
    READ TABLE IT_RETURN INTO WA_RETURN INDEX 1 .
            IF       WA_RETURN-MONDAY    = 'X'.
                     wa_days-num = '1'.
             append  wa_days to it_days.
            ENDIF.
           IF        WA_RETURN-TUESDAY   = 'X'.
                     wa_days-num = '2'.
            append   wa_days to it_days.
           ENDIF.
           IF        WA_RETURN-WEDNESDAY = 'X'.
                     wa_days-num = '3'.
            append   wa_days to it_days.
         ENDIF.
           IF        WA_RETURN-THURSDAY  = 'X'.
                     wa_days-num = '4'.
           append    wa_days to it_days.
             ENDIF.
            IF       WA_RETURN-FRIDAY    = 'X'.
                     wa_days-num = '5'.
            append  wa_days to it_days.
             ENDIF.
           IF     WA_RETURN-SATURDAY  = 'X'.
                  wa_days-num = '6'.
         append  wa_days to it_days.
         ENDIF.
           IF    WA_RETURN-SUNDAY    = 'X'.
                 wa_days-num = '7'.
         append  wa_days to it_days.
            ENDIF.
    SORT IT_DAYS BY NUM.
    CLEAR WA_DAYS.
    IF NOT IT_DAYS[] IS INITIAL.    "#1 CHECKING
    READ TABLE IT_DAYS INTO WA_DAYS WITH KEY NUM = X.
    IF SY-SUBRC <> 0.
    IF NOT IT_DAYS[] IS INITIAL.
    LOOP AT IT_DAYS INTO WA_DAYS.
    IF WA_DAYS-NUM GT X.
      Z  = ( WA_DAYS-NUM ) - X.
      UP_DATE  = OP_RDD + Z.
      EXIT.
    ENDIF.
    ENDLOOP.
    ENDIF.
    SORT IT_DAYS BY NUM DESCENDING.
    IF UP_DATE IS INITIAL.
      IF NOT IT_DAYS IS INITIAL.
      READ TABLE IT_DAYS INTO WA_DAYS INDEX 1.
      Y = X - WA_DAYS-NUM.
      UP_DATE = OP_RDD + 7 - Y.
    ENDIF.
        ENDIF.
       VBAK-VDATU  = UP_DATE.
    ENDIF.
    CLEAR: X,UP_DATE,Y.
    ENDIF.   "#1 CHECKING
    ENDIF.    "1 YVBAK
    ENDIF.

  • Problem with updating pricing date using BAPI_SALESORDER_CHANGE

    Hi,
    I need to update pricing date on sales order (but only on item level).
    I have been trying to use  BAPI_SALESORDER_CHANGE but nothing changes.Bapi returns no errors, ends with success.
    I hoped that bapi would change not only pricing date but also recalculate things the date affected.
    Here is my code:
    ls_head_inx-updateflag = 'U'.
    ls_bapisdls-pricing = 'C'.
    ls_item-itm_number = sales_order_posnr
    ls_item-price_date = new_price_date
    APPEND ls_item TO lt_item.
    ls_item_inx-itm_number = sales_order_posnr
    ls_item_inx-updateflag = 'U'.
    ls_item_inx-price_date = 'X'.
    APPEND ls_item_inx TO lt_item_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
              EXPORTING
                salesdocument     = sales_order
                order_header_inx = ls_head_inx
                logic_switch         = ls_bapisdls
              TABLES
                return                 = lt_return
                order_item_in     = lt_item
                order_item_inx   = lt_item_inx
    Thanks & Regards,
    Mario

    Mario,
    I run same code as yours and work for me fine, able to update ITEM pricing date.
    I suppose you are using BAPI_TRANSACTION_COMMIT after your BAPI call, then only it will work.
    Also note that VBKD table stores this date for header and item. In my system, there are generally only header rows in that table, but a new item row gets generated when I change the item date with the BAPI to some other date. Also, this BAPI sometimes issues a W message instead of ERROR for something like non-existing items, so carefully check your RETURN table too.
    'Item 000002 does not exist' as WARNING message, so might be considering it as a success.
    If nothing works, try to do the same thing for the same data using VA02 and check . If that works, BAPI will work surely.
    Regards,
    Diwakar

  • Problem in Updating CLOB data

    Hi,
    I am trying to update a table in oracle using a java application.
    The field i am trying to update is of CLOB type.
    I am calling the following function to updated the table.
    I am reading a data from the a file.
    But i am getting following error
    Exception :java.sql.SQLException: ORA-01002: fetch out of sequence
    Can anybody suggest some modification to make it work.
    Thank You
    public static void InsertClob(DBConnection dbcon,String gene_id){
    try{
    Statement stat = dbcon.con.createStatement();
    String query = "select aaseq,ntseq from gene where gene_id = '"+gene_id.trim()+"' for update ";
    ResultSet rs = stat.executeQuery(query);
    rs.next();
    Clob clob = rs.getClob(1);
    Writer clobWriter = ((CLOB)clob).getCharacterOutputStream();
    File seq = new File("seq.txt");
    FileReader fr = new FileReader(seq);
    char[] cbuffer = new char[10* 1024];
    int nread = 0 ;
    while((nread = fr.read(cbuffer)) != -1)
    clobWriter.write(cbuffer,0,nread);
    fr.close();
    clobWriter.close();
    rs.close();
    stat.close();
    }catch(Exception e){
    System.out.println("Exception :"+e);
    }//End of fucntion

    same problem. Did you solve that? If you leave off the FOR UPDATE, you get "row not locked" when do thhe clobWriter.write(...

  • Problem Updating BLOB Data in DB

    Hi, There,
    I have a problem when updating BLOB data in database table. I am
    using Oracle 8.1.6, JDK1.3.0., oracle thin driver.
    I have a Handle object handle (javax.ejb.Handle), and I need to
    save this object in DB. The table has 2 columns: column 1
    is "PK" Varchar2(30) Primary Key, column 2 is "HANDLE" BLOB.
    According to the documentation I found from Oracle, I first
    initialize the blob column, and then get the BLOB locator.
    However when I try to update the BLOB data by invoking
    executeUpdate() method on OraclePreparedStatement ops, I always
    get the returned int rowCount=0, which indicates that no rows
    have been updated. (This is verified by trying to retrieve the
    BLOB column value which results in SQLException: Exhausted
    Resultset.)
    Any suggestions what was wrong with the code? Thank you a lot in
    advance!
    Tom
    Part of the code is listed below:
    // If jSessionID is not found, create it
    HttpSession session = request.getSession(true);
    String jSessionID = session.getId();
    //get the Hanlde object for MemberInfo bean
    javax.ejb.Handle handle = memberValidate.validateMember(
    memberID, "" );
    oracle.sql.BLOB oracleBlob = null;
    /* Get DB connection */
    try
    Connection conn = getDBConnection(); // with oracle thin driver
    conn.setAutoCommit(false);
    catch (NamingException ne)
    System.out.println( "Failed to getDBConnection due to Naming
    Exception" + ne.toString() );
    return;
    catch (SQLException sqle)
    System.out.println( "Failed to getDBConnection due to SQL
    Exception"+ sqle.toString() );
    return;
    try
    pstmt=conn.prepareStatement("CREATE TABLE TOM1 (PK VARCHAR(30)
    PRIMARY KEY, HANDLE BLOB NOT NULL)");
    pstmt.execute();
    pstmt=conn.prepareStatement("INSERT INTO TOM1 VALUES('ROW1',
    EMPTY_BLOB())");
    pstmt.executeUpdate();
    pstmt=conn.prepareStatement("SELECT HANDLE FROM TOM1 WHERE
    PK=? FOR UPDATE");
    pstmt.setString(1, "ROW1");
    ResultSet rset = pstmt.executeQuery();
    if ( rset.next() )
    // Get the LOB locator from the ResultSet
    oracleBlob = ((OracleResultSet)rset).getBLOB("HANDLE");
    OraclePreparedStatement ops = null;
    ops = ( OraclePreparedStatement )
    (conn.prepareStatement("UPDATE TOM1 SET HANDLE = ?
    WHERE PK = ?"));
    ops.setString( 2, jSessionID );
    // using OutputStream to write object data
    OutputStream oStream = oracleBlob.getBinaryOutputStream();
    ObjectOutputStream outStream = new ObjectOutputStream
    (oStream);
    outStream.writeObject(handle); // handle is the Object to be
    saved
    outStream.close();
    conn.commit();
    conn.setAutoCommit(true);
    ops.setBLOB( 1, oracleBlob );
    int rowCount = ops.executeUpdate();
    System.out.println("\n**** Rows affected: ");
    System.out.println(ops.executeUpdate());
    if (rowCount != 0)
    // Commit the transaction:
    System.out.println("\n**** conn.commit() OK...");
    System.out.println("\n**** Handle saved in DB as Blob-type
    OK...");
    conn.commit();
    conn.close();
    else
    System.out.println("\n**** ops.executeUpdate() == 0, Failed
    to update DB");
    conn.close();
    return;
    catch ( SQLException se )
    se.printStackTrace();
    return;
    catch ( Exception e )
    System.out.println(e.toString());
    return;
    System.out.println("\n**** DB update OK...");
    null

    You cannot update Blob column in Adf testing tool as far i think
    check this blog might help you to store images in ADF http://baigsorcl.blogspot.com/2010/09/store-images-in-blob-in-oracle-adf.html

  • Updating array data in sql database

    HI,
    Im facing problems in updating array data in SQL database.
    As of now, i am able to write an "insert" query and insert array data in an image datatype field. Im using image datatype because the array size is very big(around 80,000 x and y values).
    Althoug inserting data is easy im unable to write a query to update this data.
    Referring to the help of SQL server and Labview database connectivity toolkit, i came across a method of accessing image datatype....using textpointers, which are 16 bit binary values and using the WRITETEXT function instead of the UPDATE function.
    but the problem im facing is that ive to pass the array as a 2d string array in the query as a result the updated array is retrieved in the form of a string a
    nd not as an array. how do I get over this problem?

    Hi Pavitra,
    I'm not very clear on how you have inserted the data into your application, but I do know that when you call the UPDATETEXT or WRITETEXT function you use the TEXTPOINTERS to point to the first location of a 1d array. So, depending on how you've stored the data, you may have problems updating your data if you're looking at it as a 1d array instead of how you originally formatted it. If you are able to successfully access the data as a 1d array, you can use the database variant to data type vi and pass in a string array constant for the data type. This will convert the variant datatype into whatever you specify. You may have to index the row and column of the variant (you receive a 2d array of variant) first before you convert. If possible, can yo
    u provide some more detail and maybe some example code of how you perform the insert and plan to do the update? I can probably give you a better solution if I know how you are formatting the data. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • How to  update Education Data in ABAP HR.

    I'm new to ABAP HR Module and have problem to update Education Data in ABAP HR.
    Helpful Advice will be appreciated.

    Hi Suniel  ,
    Education data in HR is held in infotype 22.
    Go to PA30, enter the employee number & maintain 22 infotype (with respective subtype i.e. high school, university, etc..)
    Regards,
    Dilek

  • Problem with updating oracle DB with java date thru resultset.updateDate()

    URGENT Please
    I am facing problem in updating oracle database with java date through resultset.updateDate() method. Can anybody help me please
    following code is saving wrong date value (dec 4, 2006 instead of java date jul 4, 2007) in database:
    ResultSet rs = stmt.executeQuery("SELECT myDate FROM myTable");
    rs.first();
    SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-mm-dd");
    java.util.Date myDate = new Date();
    rs.updateDate("myDate", java.sql.Date.valueOf(sqlFormat.format(myDate)));
    rs.updateRow();

    I believe you should use yyyy-MM-dd instead of yyyy-mm-dd. I think MM stands for month while mm stands for minute as per
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    (If this works, after spending so much of your time trying to solve it, don't hit yourself in the head too hard. I find running out of the room laughing hysterically feels better).
    Here is a more standard(?) way of updating:
    String sqlStatement=
    "update myTable set myDate=? where personID=?"
    PreparedStatement p1= connection.prepareStatement(sqlStatement);
    p1.setDate(1,new java.sqlDate());
    p1.setInt(2, personID);
    p1.executeUpdate();

  • Problems with updating data in excel spreadsheet using ODI

    That's my first post on this forum, therefore I'd like to say Hello to everybody reading it before I present my problem.
    First I configured the ODBC connection to the xls file which conteins my data - the file isn't defined as read-only in the ODBC connection. The next step was setting up a Microsoft Excel Data Server in the topology manager in which I inserted the physical model and of course a logical one referencing the physical one. These steps allowed me to insert a model with my table in the Designer - I can view data throug the option 'view data' appearing after the right-click on the datastore. One of the columns was defined as primary key in constraints. I can use this xls file datastore as a source in an interface - loading the target finishes with a success. But I can't update the data in the xls file using the 'data' option appearing after right-click on the datastore correspondig to it in the designer. The new window with data from file appears without any problem, but when I try to update any of the fields I recieve an error:
    *"See com.borland.dx.dataset.DataSetException error code: BASE+37*
    *com.borland.dx.dataset.DataSetException: DataSet has no unique row identifiers.*
    *Note: For QueryDataSets you need to disable metaDataUpdate.ROWID in the MetaDataUpdate property, in addition to setting the RowId property on a column.* - don't know where to configure it
    at com.borland.dx.dataset.DataSetException.c(Unknown Source)
    at com.borland.dx.dataset.DataSetException.kb(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.fb(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.a(Unknown Source)
    at com.borland.dx.dataset.DataSet.startEditCheck(Unknown Source)
    at com.borland.dx.dataset.DataSet.startEdit(Unknown Source)
    at com.borland.dbswing.TableMaskCellEditor.textModified(TableMaskCellEditor.java:340)
    at com.borland.dbswing.TableMaskCellEditor.insertUpdate(TableMaskCellEditor.java:319)
    at javax.swing.text.AbstractDocument.fireInsertUpdate(Unknown Source)
    at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
    at javax.swing.text.AbstractDocument.insertString(Unknown Source)
    at javax.swing.text.PlainDocument.insertString(Unknown Source)
    at com.borland.dbswing.DBPlainDocument.insertString(DBPlainDocument.java:77)
    at javax.swing.text.AbstractDocument.replace(Unknown Source)
    at javax.swing.text.JTextComponent.replaceSelection(Unknown Source)
    at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(Unknown Source)
    at javax.swing.SwingUtilities.notifyAction(Unknown Source)
    at javax.swing.JComponent.processKeyBinding(Unknown Source)
    at javax.swing.JComponent.processKeyBindings(Unknown Source)
    at javax.swing.JComponent.processKeyEvent(Unknown Source)
    at com.borland.dbswing.TableMaskCellEditor.processKeyEvent(TableMaskCellEditor.java:627)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)"
    What should I do to be able to modify data from the xls file that way (is it possible in any way)?

    It is not possible to update the data directly from ODI on some technologies, mainly due to some driver limitations.
    I would suggest to edit the spreadsheet in Excel.
    Thanks,
    Julien

  • When trying to install ios5 on my iphone, I get error message that there is a problem with backup, if I continue with update all data on my phone will deleted. I cancelled the update and phone is fine. Anyone know the cause?

    When trying to install io5 on my iphone4 I get an error message during the updtae that there is a problem with backup and if I continue with the update, all the data will be deleted from my phone. I cancelled the update and my phone is fne. Has anyone else experience this? What is the cause/solution?
    Yhanks!

    DON'T DO IT! Read the threads ... there is a MAJOR problem with updating iPhones 3GS/4 to iOS 5.
    Take it to the Apple store and ask them to do it.
    I repeat: DON'T DO IT YOURSELF.
    (Voice of experience.)

  • Problem In Update Statement In Multiple Record Data Block

    Hi Friends,
    I have problem in update Statement for updating the record in multiple record data Block.
    I have two data Block the master block is single Record block and the 2nd data block is Multiple Record data Block.
    I am inserting the fields like category,and post_no for partiular job in single data block
    Now in second Multiple Record Data Block,i am inserting the multiple record for above fileds like no. of employees work in the position
    There is no problem in INSERT Statement as it is inerting all record But whenever i want to update particular Record (in Multiple Block) of employee for that category and Post_no
    then its updating all the record.
    my code is Bellow,
    IF v_count <> 0 THEN
    LOOP
    IF :SYSTEM.last_record <> 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
    VALUES(g_post_no, g_roster_no, g_category, :POST_HISTORY_MULTIPLE.idcode, :POST_HISTORY_MULTIPLE.joining_post_dt,
    :POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    next_record;
    ELSIF :SYSTEM.last_record = 'TRUE' THEN
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    IF SQL%NOTFOUND THEN
    INSERT INTO post_history(post_no,roster_no,category,idcode,joining_post_dt,leaving_post_dt,entry_gp_stage)
         VALUES (g_post_no,g_roster_no,g_category,:POST_HISTORY_MULTIPLE.idcode,
              :POST_HISTORY_MULTIPLE.joining_post_dt,:POST_HISTORY_MULTIPLE.leaving_post_dt,:POST_HISTORY_MULTIPLE.entry_gp_stage);
    END IF;
    EXIT;
    END IF;
    END LOOP;
    SET_ALERT_PROPERTY('user_alert',ALERT_MESSAGE_TEXT, 'Record Updated successfuly' );
    v_button_no := SHOW_ALERT('user_alert');
    FORMS_DDL('COMMIT');
    CLEAR_FORM(no_validate);
    Please Guide me
    Thanks in advence

    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;
    UPDATE post_history
    SET idcode = :POST_HISTORY_MULTIPLE.idcode,
    joining_post_dt = :POST_HISTORY_MULTIPLE.joining_post_dt,
    leaving_post_dt = :POST_HISTORY_MULTIPLE.leaving_post_dt,
    entry_gp_stage = :POST_HISTORY_MULTIPLE.entry_gp_stage
    WHERE post_no = :POST_HISTORY_SINGLE.post_no
    AND category = :POST_HISTORY_SINGLE.category
    AND roster_no = :POST_HISTORY_SINGLE.roster_no;
    AND idcode = :POST_HISTORY_MULTIPLE.idcode;These update statements are without where clause, so it will update all records.
    If it is specific to oracle forms then u may get better help at Forms section.

  • Problem while update and insert data in table

    Hi All,
    I have problem while save line data....
    I have an advance table.I take remove and duplicate line in message choice of advance table action layout.
    Also there is one temp table to save Po number data which is populated in advance table according to PO Number search.And In Temp table record number is column which use
    to insert and update data in temp table which mention in procedure
    Problem is that : When i Searched PO Number and duplicate line and save that record it insert a new line always and it insert record according to duplicate line no .It not update previous line,insert new line always according to duplicate line no.
    Please tell me what is solution?
    Thanks,
    Neil

    Hi,
    I am not cleared with your requirement.
    If possible send me the screenshots for the same.
    --Sushant
    [email protected]

  • Problem with updating Time component of an Oracle Date field in ALBPM

    Hi.
    I'm new to ALBPM and am experiencing the following problem I hope someone can take the time to help out with.
    I'm using a Date and Time Picker element in a Form to enter the date and time information. Within ALBPM the date and time representation appears correct as it prints out what I've entered. The logMessage displays this information in the form "YYYY-MM-DD HH24:mm:ss+TimezoneOffset". The BPM Object that stores this value is referencing an Oracle table that has an equivalent Date field. My problem is that it appears to only update the Date component.
    I've also tried using the native Time variable type within ALBPM be adding an variable of type Time to the BPM Object and setting the result Database object equal to this Time variable with the same result. The Time variable was declared with Timestamp precision (take this to mean both Date and Time components).
    Has anyone come across this problem? I'm using ALBPM Studio 6.0 M3 as my release.
    Thanks.

    I must have deselected the "Use Timestamp for Date columns" in the Advanced tab within the External Resource definition for my database at some point in time. Enabling this option fixed my problem - silly me.

  • Problem in updating the partners data for sales order

    hi all..
    am using bapi_salesorder_createfromdat2 to create salesorder..
    in the bapi am passing the partners data as follows..
    partner-partn_role = 'ZD'.
    partner-partn_numb  = <cust.no.>
    partner-itm_number = <item no.>
    after that..,the sales order is created succesfully .but now the problem is the partner data as shown above is not updated successfully in the item level details of sales order..
    is there any way to fix it ?
    please help me with the possible alternatives.
    thanks in advance
    suresh

    Hi Suresh,
    *Fill partner
    wa_order_partnr-partn_role = 'AH'.
    wa_order_partnr-partn_numb = '0000100001'.
    "wa_order_partnr-itm_number  = '000010'.
    INSERT wa_order_partnr INTO TABLE tab_order_partnr.
    wa_order_partnr-partn_role = 'WE'.
    wa_order_partnr-partn_numb = '0000100001'.
    "wa_order_partnr-itm_number  = '000010'.
    INSERT wa_order_partnr INTO TABLE tab_order_partnr.
    Is it a standard partner function or custom one.Check with german key words llike AH,WE.
    Regards,
    Madhu.

Maybe you are looking for