Problem in updating entity sevice record

i am doing a POC for update through Web Dynpro
I have made an entity sergvice with a field as fname-short text- i create a record in it as  below and save its guid in a context varialbe
AFirstOne one = FirstOneServiceProxy.create();
one.setFname("hello");
one.getAspect().sendChanges();
wdContext.currentContextElement().setKey(one.getGuid());
Now i am trying to update the same record --
AFirstOne first = FirstOneServiceProxy.read
(wdContext.currentContextElement().getKey());
if (first ==null)
{  wdComponentAPI.getMessageManager().reportSuccess("null");
else
{  wdComponentAPI.getMessageManager().reportSuccess("not null");
wdComponentAPI.getMessageManager().reportSuccess(first.getGuid());
first.setFname("bye");
first.getAspect().sendChanges();
The not null and guid  is printed but the record is not updated  inn the table
Can anyone plaes suggest me the reason  for this?
What am i doing wrong ?

Hi
Data is Saved to database in two Steps.
Step 1 : call sendChanges() method on <entity>.getAspect()
Step 2 : call save method on ServiceFacade.
IServiceFacade  serviceFacade =
CAFServiceFactory.getServiceFacade(
<class Name>);
serviceFacade.save();
This will save the entty .
The Call to the "Save" Method  is missing in your Code.
regards
Rajendra

Similar Messages

  • Problem in creating entity service record

    Hello!!!
    I am creating new record in service
        AEs_Employee emp;
        emp = es_EmployeeServiceProxy.create();
        emp.setPernr("12345123");
        emp.getAspect().sendChanges();
    Some mistakes occur during application launch:
    The initial exception that caused the request to fail, was:
       java.lang.NoClassDefFoundError: com/sap/tc/col/client/generic/api/IAspectRow
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for view com.sap.ogk2.caf.training.V_GeneralRequestTraining. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.<init>(DelegatingView.java:41)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.createUninitializedView(ViewManager.java:657)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:694)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.init(ViewManager.java:155)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doOpen(WebDynproWindow.java:295)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.show(ApplicationWindow.java:183)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.open(ApplicationWindow.java:178)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:364)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:756)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:291)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
         ... 33 more
    Caused by: java.lang.NoClassDefFoundError: com/sap/tc/col/client/generic/api/IAspectRow
         at com.sap.ogk2.caf.training.wdp.InternalV_GeneralRequestTraining.<init>(InternalV_GeneralRequestTraining.java:267)
         ... 38 more
    Edited by: Vadim Sotnikov on Jul 31, 2008 7:30 AM

    Hi,
    Generally, "No class Definition found" Exception comes in these cases.
    1. If we dont add the corrosponding jar file in the "lib" folder.
    2. If the class is not accessible(private or protected).
    3. Place where you are accessing the class and where the class is defined are in two different packages...
    Check for the above,
    Regards,
    Srinivas.

  • Problem in UPDATE statement In Multiple Record 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

    As you do a loop over all the records in the block, of course every record is updated.
    Also, what you do is not the way is intended to be used. In general, you base a block on a table,then there is no need at all for writing INSERT's or UPDATE's. Forms also know's then, which records to be updated and which not.

  • 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.

  • SOS problem using one Entity bean for editing records. please help me

    Hello
    I have one great problem using one entity bean 2.1 and i am working with this problem several days and i dont solve it.
    i am using this jb 2.1 for add new records to one oracle database and for editing records.
    I have one great problem for editing records
    I have one objets that is as one of my database table. (PersonaObj.java)
         //personaObj.java
         public class PersonaObj implements Serializable{
              private Integer id_persona; //this ishte database table autonumeric
              private java.lang.String nombre;
              now the set/get methods.
         One field of this objets (bean) is the primary key of the table, and this field is one part of the pk from the entity bean.
         From one session bean i call the entity bena passing the objet
         into the entity bean (interface) i have one methods:
              public getPersona getT56aaat04();
         public void setPersona(PersonaObj obj);
         into the entitybean bean i have:
         public PersonaEntityPK ejbCreate(PersonaObj obj) throws CreateException {
              this.setT56aaat04(obj);
              public abstract Integer getId_persona();
         public abstract void setId_persona(Integer Id_persona);
         public abstract java.lang.String getNombre();
         public abstract void setNombre(java.lang.String Nombre);
         public PersonaObj getPersona() {
              PersonaObj obj = new PersonaObj();
              obj.setId_persona(getId_persona());
              obj.setNombre(getNombre());
              return obj;
         public void setPersona(PersonaObj obj) {
              setId_persona(obj.getId_persona());
              setNombre(obj.getNombre());
    But i have one graet problem.
    adding new record to the database i runs well but if i want to edit one recor appears this error:
    => Error <=
    java.rmi.RemoteException: EJB Exception: ; nested exception is: javax.ejb.EJBException: EJB Exception: : java.lang.IllegalStateException:[EJB:010144]The setXXX method for a primary key field may only be called during ejbCreate.
    at PersonasEJB_a43o8n__WebLogic_CMP_RDBMS.setId_persona(PersonasEntityEJB_a43o8n__WebLogic_CMP_RDBMS.java:328)
    at PersonasEntityBean.setPersona(PersonasEntityBean.java:114)
    at PersonasEntityEJB_a43o8n_ELOImpl.setPersona(PersonasEntityEJB_a43o8n_ELOImpl.java:45)
    at PersonasSessionBean.editarPersona(PersonasSessionBean.java:849)
    at PersonasSessionBean_bszo9t_EOImpl.editarPersona(PersonasSessionBean_bszo9t_EOImpl.java:208)
    at PersonasSessionBean_bszo9t_EOImpl_WLSkel.invoke(Unknown Source)
    into the session bean i make this (the session recibes one PersonaObj obj):
    T56aContactosEntityLocal personaLocal ;
                   try {
                        personaLocal = personaHome.findByPrimaryKey(new T56aContactosEntityPK(obj.getId_a04()));
                        T56aaat04Obj objTmp = new T56aaat04Obj();
                        objTmp.setAp1_a04(obj.getAp1_a04());
                        objTmp.setEstado_a04("false");
                        personaLocal.setT56aaat04(obj);
    Please can you help me to solve this problem?

    Hello Werner,
    The mappings seem to be alright at a first glance.
    Have you tried out un- and redeploying your application? Sometimes values appear to be cached in the server. So if you have deployed the application before you entered DB_BANK as alias this might solve the problem...
    BR
    Daniel

  • Problem with updating records in database

    Hello everyone,
    I have a question, i have a database and in the database I want to update some records.
    Now, in my database I have refnr, vnr, etc� it is possible that I have 3 the same refnr (example)
    98765A     001     
    98765A     002
    98765B     003
    Now, the program must compare the records between 2 databases and than update al the records flag (example) after comparing
    98765A     001     A
    98765A     002     A
    98765B     003     A
    Now my question is, in the first code 1 example I search all the records and after a IF statement the program send the refnr and the vnr object to updateRecordsFlag(String refnr, String vnr) now In the example above you see I have for example 3 records and these 3 must updated with a A
    Sow, I have made a FOR statement that gets the highest vnr and count to 1 (Teller--), how can I make a FOR statement that send each time an object to updateRecordsFlag(String refnr, String vnr). Now it�s just the highest record that updates.
    I use preparedstatement. For read, etc�
    code 1
    try {
    rowBeheerRefvolgnrs = datasender.readBeheerRefvolgnrs();
    } catch (Exception ex) {
    ex.printStackTrace();
    String refnr = "";
    String vnr = "";
    String code = "";
    int i = 0;
    while (i < rowBeheerRefvolgnrs.length) {
    refnr = rowBeheerRefvolgnrs.substring(0,27);
    vnr = rowBeheerRefvolgnrs[i].substring(27,30);
    code = rowBeheerRefvolgnrs[i].substring(14,15);
    if (code.compareTo("A") == 0) {
         int Teller = Integer.parseInt(vnr);
         updateRecordPersonA(refnr, vnr);
              for (int j = 1; Teller >= j; Teller--) {
              updateRecordsFlag(refnr, vnr);
              vnr = new Integer(Teller).toString();
    if (code.compareTo("B") == 0) {
    //updateRecordPersonB(refnr, vnr);
    i++;
    logger.debug("update end ");
    private void updateRecordsFlag(String refnr, String vnr) {
    Here i have my code to update the flag

    declare @table nvarchar(128)
    declare @idcol nvarchar(128)
    declare @sql nvarchar(max)
    --initialize those two values
    set @table = 'Table_name'
    set @idcol = 'some id to recognize the row'
    set @sql = 'select ' + @idcol +' , (0'
    select @sql = @sql + ' + isnull(datalength(' + name + '), 1)'
    from sys.columns where object_id = object_id(@table)
    set @sql = @sql + ') as rowsize from ' + @table + ' order by rowsize desc'
    PRINT @sql
    exec (@sql)
    You can try this query. Too many varchar columns of big sizes can cause the row size to be bigger than what a row can hold, but its weird that it just went off in retry.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Info record not updated from PO , PO updated from Info record

    Dear Gurus,
    I want to restrict Base price in PO will be copied from Valid info record. User does not permitted to change the Base price once info record not maintained.
    Kindly tell me the configuration steps to adopt the process ?
    I don't want to update infor record from PO also.
    I know while making PO i can untick infor record not update, but that is user specific.
    Thanks in advance
    With regards
    SD

    Dear Sidi,
    Thanks . Problem solved.
    When info record is maintained the price condition will get from there. for this change in condition type P001 , set "D" in  manual entries column.
    When info record is not maintained, then the system will try to get the price from last PO, if not present, it  will throw an error u201CNet price must be greater than 0u201D and sets price condition PBXX (manual entry) to manually enter the price you want.
    What you can do:
    Is make the condition type P000 as automatic only (option D as below) and also same for condition type PBXX.
    Regards
    Soumen

  • Update a record is updating the first record in the DB...HELP!

    I am going over and over this again and cant find the problem.
    i have a form that sends email to emails that are on a php mysql db however when i update certain records it always is updating the first record in the DB...i have looked over this so many times and cant see what is going wrong
    the userid is not auto_increment but is based on the username (these are all unique)
    i have uncluded the code to see if i am missing something
    <?php require_once('../Connections/hostprop.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
      $updateSQL = sprintf("UPDATE plus_signup SET email=%s, emailerSubject=%s, emailerContent=%s WHERE userid=%s",
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['emailerSubject'], "text"),
                           GetSQLValueString($_POST['emailerContent'], "text"),
                           GetSQLValueString($_POST['userid'], "text"));
      mysql_select_db($database_hostprop, $hostprop);
      $Result1 = mysql_query($updateSQL, $hostprop) or die(mysql_error());
          // Email Guarantor
              $to = $_POST['email'];
              $subject = "Email From Host Student Property";
              $message = "
              <html>
                        <head>
                                  <title>Dear ".GetSQLValueString($_POST['userid'], "text")."</title>
                        </head>
                        <body>
                                  <img src=\"http://www.hoststudent.co.uk/beta/images/hostlogo.gif\" alt=\"www.HostStudent.co.uk\" />
                                  <h2>An Email From Host Students</h2>
                                  <br /><br />
                                  <table>
                                            <tr>
                                                      <td>Email Subject:</td>
                                            </tr>
                                            <tr>
                                                      <td>".GetSQLValueString($_POST['emailerSubject'], "text")."</td>
                                            </tr>
                                            <tr>
                                                      <td>Email Content</td>
                                            </tr>
                                            <tr>
                                                      <td>".GetSQLValueString($_POST['emailerContent'], "text")."</td>
                                            </tr>
                                  </table>
                        </body>
              </html>
              // Always set content-type when sending HTML email
              $headers = "MIME-Version: 1.0" . "\r\n";
              $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
              $headers .= 'From: HostStudent.co.uk <[email protected]>' . "\r\n";
              $send = mail($to,$subject,$message,$headers);
      $updateGoTo = "TenantEmailSent.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    mysql_select_db($database_hostprop, $hostprop);
    $query_Recordset1 = "SELECT userid, email, emailerSubject, emailerContent FROM plus_signup";
    $Recordset1 = mysql_query($query_Recordset1, $hostprop) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <?
              session_start();
              if(!$_SESSION['loggedIn']) // If the user IS NOT logged in, forward them back to the login page
                        header("location:Login.html");
    ?>
       <script type="text/javascript">
    function loadFields(Value) {
             var Guarantor = Value.split("|");
              var userid1 = Guarantor[0] ;
                          var GuName = Guarantor[1];
              var GuPhoneEmail = Guarantor[2] ;
              document.getElementById('userid1').value=userid1;
                          document.getElementById('GuName').value=GuName;
              document.getElementById('GuPhoneEmail').value=GuPhoneEmail;
    </script>
    <form action="<?php echo $editFormAction; ?>" method="post" name="form2" id="form2">
                  <table align="center">
          <tr valign="baseline">
            <td nowrap="nowrap" align="right"> </td>
            <td><select name="userid" id="userid" onchange="loadFields(this.value)">
              <option value="Select Guarantor">Select Guarantor</option>
              <?php
    do {
    ?>
    <option value="<?php echo $row_Recordset1['userid'] . '|' . $row_Recordset1['GuName'] . '|' . $row_Recordset1['GuPhoneEmail'];?>"><?php echo $row_Recordset1['userid'] . " , " . $row_Recordset1['GuName'] . " , " . $row_Recordset1['GuPhoneEmail']; ?></option>
              <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
                $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
            </select></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">Tenant Name</td>
            <td><input type="text" name="userid1" id="userid1" readonly="readonly" value="<?php echo htmlentities($row_Recordset1['userid'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuName:</td>
            <td><input type="text" name="GuName" id="GuName" readonly="readonly" value="<?php echo htmlentities($row_Recordset1['GuName'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuPhoneEmail:</td>
            <td><input type="text" name="GuPhoneEmail" id="GuPhoneEmail" readonly="readonly" value="<?php echo htmlentities($row_Recordset1['GuPhoneEmail'], ENT_COMPAT, 'utf-8'); ?>" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuEmailerSubject:</td>
            <td><input type="text" name="GuEmailerSubject" value="" size="32" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right">GuEmailerContent:</td>
            <td><textarea name="GuEmailerContent" cols="45" rows="5"> </textarea></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right"> </td>
            <td><input type="submit" value="Send email" /></td>
          </tr>
          <tr valign="baseline">
            <td nowrap="nowrap" align="right"></td>
            <td> </td>
          </tr>
                  </table>
        <input type="hidden" name="MM_update" value="form2" />
        <input type="hidden" name="userid" value="<?php echo $row_Recordset1['userid']; ?>" />
    </form>

    i have found the problem, there were two forms with the same name..
    thanks

  • Problem in updation of 2011 infotype(TEVEN)

    Hi Gurus,
    I had an issue in updating the record in TEVEN table,the approach what im following now is  using function module HR_TMW_DB_UPDATE_TEVENT  to delete the record (it's not deleting the record in table it just setting the flag of STOKZ to 'X') and after that im inserting the record with 'HR_INFOTYPE_OPERATION'.Here im successfully deleteing the old one and inserting the new record.The problem is  PDSNR field is incrementing
    when i try to insert the record  with 'HR_INFOTYPE_OPERATION' but i just want to update the old record instead deleting the old one and updating the new one.I dont want to unnecessarily  increase records in TEVEN whenever im updating records in TEVEN.
    Please help me with this issue
    Thanks,
    Hemz

    hi volker,
    Manually am able to update that field UNPSI.
    I have checked the table pa0584 manually updated value is found in the table.
    But the value which i have inserted using the FM created an empty record with the field UNSPI having 0 value.
    I have given all the fields into the record as same as when it is update dmanually.
    I dnt knw why the value is not updating.
      p0584_2-pernr = wd_comp_controller->gv_pernr.
      p0584_2-infty = '0584'.
      p0584_2-subty = '0002'.
      p0584_2-begda = '20100401'.
      p0584_2-endda = '20110331'.
       p0584_2-OBJPS = '01'.
       p0584_2-SPRPS = 'X'.
      p0584_2-seqnr = '01'.
      p0584_2-UNSPI = ls_actual_details-other_income.
      p0584_2-INTYP = '0002'.
      p0584_2-WAEHI = 'INR'.
      p0584_2-AEDTM = sy-datum.
      p0584_2-UNAME = sy-uname.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = '0584'
        number                 = wd_comp_controller->gv_pernr
       SUBTYPE                = '0002'
      OBJECTID               =  p0584_2-OBJPS
      LOCKINDICATOR          =  p0584_2-SPRPS
       VALIDITYEND            = p0584_2-endda
       VALIDITYBEGIN          = p0584_2-begda
       RECORDNUMBER           = '01'
        record                 = p0584_2
        operation              = 'INS' "lv_op_type
       TCLAS                  = 'A'
       DIALOG_MODE            = '0'
      NOCOMMIT               =
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = return_584_2
       KEY                    = key.
    Pls give some solutions
    Thanks
    Nalla B

  • Updating and deleting records in access DB

    i'm trying to make multiple updates and deletes in a access DB and it doesn't work.
    my program executes lot's of updates and delete statements when saving, but I only commit in the end when I know all the statements finished ok.
    I can't make it a batch update since I need to retrieve the auto-number that access issues me on some of my tables.
    I know it's kinda fuzzy, but my program is SO big already, and I can't really put the code in here - it wouldn't do much good.
    what I will do is write what my log shows (i issue a log output whenever there's a executeQuery/Update and before commit/rollback
    DBG : 29/04/03 : UPDATE CASES_T SET CASE_office_case_id = 1 ,CASE_year = 2 ,CASE_total_debt = 10009 ,CASE_is_limited = true ,CASE_monthly_payment = 400 ,CASE_hotzlap_case_id = ' - - - ' ,CASE_status = 26 WHERE CASE_tech_id = 5
    DBG : 29/04/03 : SELECT count(*) from CASES_OWEES_T where CAOW_Tech_Id = 23
    DBG : 29/04/03 : UPDATE CASES_OWEES_T SET CAOW_case_tech_id = 5 ,CAOW_id_number = '046259990' ,CAOW_first_name = '���' ,CAOW_last_name = '������' ,CAOW_work_place = 'jjjjjjjjjjjjj' ,CAOW_address = '1jjjjjjjjjjjj' ,CAOW_telephone = '09-8099999' ,CAOW_pelephone = '000-000000' ,CAOW_hotzlap_case_id = ' - - - ' ,CAOW_is_valid_address = false WHERE CAOW_TECH_ID = 23
    DBG : 29/04/03 : SELECT count(*) from CASES_OWEES_T where CAOW_Tech_Id = 24
    DBG : 29/04/03 : UPDATE CASES_OWEES_T SET CAOW_case_tech_id = 5 ,CAOW_id_number = ' ' ,CAOW_first_name = '�����' ,CAOW_last_name = '���' ,CAOW_work_place = '����' ,CAOW_address = '��?' ,CAOW_telephone = ' - ' ,CAOW_pelephone = ' - ' ,CAOW_hotzlap_case_id = ' - - - ' ,CAOW_is_valid_address = true WHERE CAOW_TECH_ID = 24
    DBG : 29/04/03 : SELECT count(*) from CASES_INNER_CASES_T where CICA_Tech_Id = 10
    DBG : 29/04/03 : UPDATE CASES_INNER_CASES_T SET CICA_case_tech_id = 5 ,CICA_debt = 5000897 ,CICA_winner_name = '���' ,CICA_lawyer_tech_id = '6' ,CICA_hotzlap_case_id= '02-22122-22-2' WHERE CICA_tech_id= 10
    DBG : 29/04/03 : SELECT count(*) from CASES_INNER_CASES_T where CICA_Tech_Id = 11
    DBG : 29/04/03 : UPDATE CASES_INNER_CASES_T SET CICA_case_tech_id = 5 ,CICA_debt = 20008 ,CICA_winner_name = '������' ,CICA_lawyer_tech_id = '2' ,CICA_hotzlap_case_id= '02-22222-22-2' WHERE CICA_tech_id= 11
    DBG : 29/04/03 : SELECT count(*) from CASES_INNER_CASES_T where CICA_Tech_Id = 14
    DBG : 29/04/03 : UPDATE CASES_INNER_CASES_T SET CICA_case_tech_id = 5 ,CICA_debt = 129 ,CICA_winner_name = '' ,CICA_lawyer_tech_id = '4' ,CICA_hotzlap_case_id= '02-22222-22-2' WHERE CICA_tech_id= 14
    DBG : 29/04/03 : SELECT count(*) from CASES_CUSTOMER_CARDS_T where CUCA_Tech_Id = 23
    DBG : 29/04/03 : UPDATE CASES_CUSTOMER_CARDS_T SET CUCA_case_tech_id = 5 , CUCA_sum = 324 , CUCA_fee_plus_maam = -38.0 , CUCA_for_division = 285.0 , CUCA_voucher = '3222 ' , CUCA_date = '2003-04-24' , CUCA_in_or_out = true WHERE CUCA_tech_id = 23
    DBG : 29/04/03 : SELECT count(*) from CASES_CUSTOMER_CARDS_T where CUCA_Tech_Id = 22
    DBG : 29/04/03 : UPDATE CASES_CUSTOMER_CARDS_T SET CUCA_case_tech_id = 5 , CUCA_sum = 324 , CUCA_fee_plus_maam = -38.0 , CUCA_for_division = 285.0 , CUCA_voucher = '2222 ' , CUCA_date = '2003-04-23' , CUCA_in_or_out = true WHERE CUCA_tech_id = 22
    DBG : 29/04/03 : SELECT count(*) from CASES_CUSTOMER_CARDS_T where CUCA_Tech_Id = 21
    DBG : 29/04/03 : UPDATE CASES_CUSTOMER_CARDS_T SET CUCA_case_tech_id = 5 , CUCA_sum = 100 , CUCA_fee_plus_maam = -11.0 , CUCA_for_division = 0.0 , CUCA_voucher = '2222 ' , CUCA_date = '2003-04-23' , CUCA_in_or_out = true WHERE CUCA_tech_id = 21
    DBG : 29/04/03 : SELECT count(*) from CASES_CUSTOMER_CARDS_T where CUCA_Tech_Id = 20
    DBG : 29/04/03 : UPDATE CASES_CUSTOMER_CARDS_T SET CUCA_case_tech_id = 5 , CUCA_sum = 1000 , CUCA_fee_plus_maam = -118.0 , CUCA_for_division = 882.0 , CUCA_voucher = '1111 ' , CUCA_date = '2003-04-23' , CUCA_in_or_out = true WHERE CUCA_tech_id = 20
    DBG : 29/04/03 : SELECT count(*) from CASES_INVESTIGATIONS_T where CAIN_Tech_Id = 16
    DBG : 29/04/03 : UPDATE CASES_INVESTIGATIONS_T SET CAIN_case_tech_id = 5 ,CAIN_text = '' ,CAIN_was_declared_limited = false ,CAIN_date = '2003-03-01' ,CAIN_rulling_effective_date = '2003-02-01' ,CAIN_payment_amount = 400 WHERE CAIN_TECH_ID = 16
    DBG : 29/04/03 : SELECT count(*) from CASES_INVESTIGATIONS_T where CAIN_Tech_Id = 12
    DBG : 29/04/03 : UPDATE CASES_INVESTIGATIONS_T SET CAIN_case_tech_id = 5 ,CAIN_text = '' ,CAIN_was_declared_limited = true ,CAIN_date = '1970-01-01' ,CAIN_rulling_effective_date = '1905-03-06' ,CAIN_payment_amount = 90 WHERE CAIN_TECH_ID = 12
    DBG : 29/04/03 : SELECT count(*) from CASES_INVESTIGATIONS_T where CAIN_Tech_Id = 10
    DBG : 29/04/03 : UPDATE CASES_INVESTIGATIONS_T SET CAIN_case_tech_id = 5 ,CAIN_text = '' ,CAIN_was_declared_limited = false ,CAIN_date = '1970-01-01' ,CAIN_rulling_effective_date = '1990-01-30' ,CAIN_payment_amount = 89 WHERE CAIN_TECH_ID = 10
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 9
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 9
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 14
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 14
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 13
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 13
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 11
    DBG : 29/04/03 : DELETE FROM CASES_INVESTIGATIONS_T where CAIN_tech_id = 11
    DBG : 29/04/03 : SELECT count(*) from CASES_PAYMENTS_T where CAPY_Tech_Id = 71
    DBG : 29/04/03 : UPDATE CASES_PAYMENTS_T SET CAPY_case_tech_id = 5 ,CAPY_sum = 400 ,CAPY_exception_text = '' ,CAPY_is_exception = true ,CAPY_voucher = '' ,CAPY_date = '2003-04-01' ,CAPY_is_paid_in_hotzlap = false WHERE CAPY_TECH_ID = 71
    DBG : 29/04/03 : SELECT count(*) from CASES_PAYMENTS_T where CAPY_Tech_Id = 70
    DBG : 29/04/03 : UPDATE CASES_PAYMENTS_T SET CAPY_case_tech_id = 5 ,CAPY_sum = 400 ,CAPY_exception_text = '' ,CAPY_is_exception = true ,CAPY_voucher = '' ,CAPY_date = '2003-03-01' ,CAPY_is_paid_in_hotzlap = false WHERE CAPY_TECH_ID = 70
    DBG : 29/04/03 : SELECT count(*) from CASES_PAYMENTS_T where CAPY_Tech_Id = 69
    DBG : 29/04/03 : UPDATE CASES_PAYMENTS_T SET CAPY_case_tech_id = 5 ,CAPY_sum = 400 ,CAPY_exception_text = '' ,CAPY_is_exception = true ,CAPY_voucher = '' ,CAPY_date = '2003-03-01' ,CAPY_is_paid_in_hotzlap = false WHERE CAPY_TECH_ID = 69
    DEV : 29/04/03 : commit

    sure - I don't get any exception. the data just
    doesn't show in the DB. (no updating/deletion of
    records)
    as I wrote before - when the the programm commits the
    changes and does the next select command it seems as
    if the data was changed/deleted but if I check the DB
    with access or if I restart the prgoram then I see
    that the data didn't change.
    Access/jdbc-odbc has a problem where modifications are not 'commited' when the statement completes. Instead one must do one of the following:
    1. Explicit commit.
    2. Simple select after statement.
    3. Close the connection.
    Presumably you are doing 1.
    Since other than this it does work, it suggests one of the following.
    1. Something is wrong with your environment. For instance you are looking at the wrong database. Or not refreshing. Or something else like that.
    2. You are using something besides a simple connection - like opening it with 'scroll insensitive'.
    3. The complexity is causing it to lose an error message. This can be tested by doing each statement individually and verify that none produce an error.
    4. Maybe you found a bug. You can turn on ODBC tracing via the applet panel and see if digging through all of the detail provides any clues (you can also do this with 3 above.)

  • Unable to update and delete record in table

    Hello All,
    Kindly help me regarding the below mentioned issue plz
    When I want to update or delete record in table from form developed in 6i give no error message but no action and when I run same form on other system updation and deletion are successfully done.
    Any suggestion

    Hello
    More explanation is as under:
    1. I am working on only one table say A
    2. Wants to update only one row of Table A at one time in single user envoirment.
    3. My form is successfully update some rows as well but not on all rows on one PC while same form able to update all rows on other PC.
    4. I drop the table and re-create the table again but problem persist.
    Any advice plz.

  • Problem to update UDO-recordsets using a matrix with DBDataSource

    Hello,
    I've got a problem with updating recordsets in an UDO-Table using DBDataSource.SetValue().
    Special szenario: I use a matrix bounded with DBDataSources. Adding new records and loading them via DBDataSource.Query() with conditions works fine. The UDO object type is "Document" without lines.
    In the simple way now I load just one record and after this I was trying to set an "message" to an simple, editable edittext-column via calling:
    oDBDataSource.SetValue("U_Message", 0, "Hello world");
    oMatrix.LoadFromDataSource();
    Now it's visible in the matrix.
    But when I call update via clicking the update-button, B1 do say, everything was ok (green status-message). Reloading this recordset you can see: it was not stored in the database
    Even not after:
    oMatrix.FlushToDataSource();
    As a workaround I do write the "message" via using Cell.Specific.
    Can anybody help me?
    I'am using SBO 2005 A SP 01 PL 39
    Edited by: Christian Bührig on Mar 18, 2008 4:48 PM

    look at
    New Row in Matrix is a Duplicate and Cannot update Object with new Row
    the next way is do it with recordset and directly insert to table.
    hope it helps
    Petr

  • Update Multiple DB records in one table with one form

    I am developing an onine proofing system that will display a
    number of images, and then allow the customer to approve each
    image, as well as provide comments.
    I currently have a table setup with the various elements (an
    image that dynamically gets its name, details about the image, and
    the neccessary form fields).
    See This
    Image for the layout
    I would then apply a repeat region (the number of signs would
    vary), and like to update all the records with the customer's
    comments and approval with one form. How is this done? I have
    downloaded a trial of the developers toolkit, but the documentation
    is horrible. I would be willing to buy an extension that will allow
    this, if one exists.

    I found an extension that did this in about two minutes:
    http://www.webassist.com/professional/products/productdetails.asp?PID=117
    Excellent software, highly recommended. Easy to figure out,
    and got this "problem" resolved fast.

  • Update the change record in z table

    Hi,
    I am doing a  module pool programming.If i change the particular record only changed record shd be updated in the z table.
    How can i update only changed record in the database table in module pool.
    Regards

    Hi Rasheed,
    Use this code to update ztable from the module pool table control, its working.
    At screen flow logic
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_8001.
      LOOP WITH CONTROL TAB.
        MODULE PASS_DATA. "module to pass data into table control
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE USER_COMMAND_8001.
      LOOP WITH CONTROL TAB. "tab is the table control on the screen
        MODULE MODIFY_DATA. "module to modify data in internal table
      ENDLOOP.
      MODULE SAVE_DATA. "module to save the modified data into database table
    Design a PF-Status with a SAVE button with function code 'SAVE'.
    In PBO
    MODULE STATUS_8001 OUTPUT.
      SET PF-STATUS 'Z_TABCT'. "pf-status with appropiate buttons
    *  SET TITLEBAR 'xxx'.
      DATA : LINE_COUNT TYPE I.
      DESCRIBE TABLE ITAB
      LINES LINE_COUNT.
      TAB-LINES = LINE_COUNT + 3. "increment the line of table control dynamically so that table control becomes scrollable
    ENDMODULE.                 " STATUS_8001  OUTPUT
    MODULE PASS_DATA OUTPUT.
      SORT ITAB.
      READ TABLE ITAB INDEX TAB-CURRENT_LINE.
    ENDMODULE.                 " PASS_DATA  OUTPUT
    In PAI
    MODULE USER_COMMAND_8001 INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'BACK'.
          LEAVE TO SCREEN 8000.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_8001  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY ITAB INDEX TAB-CURRENT_LINE.
    ENDMODULE.                 " MODIFY_DATA  INPUT
    MODULE SAVE_DATA INPUT.
      OK_CODE = SY-UCOMM.
      CASE OK_CODE.
        WHEN 'SAVE'.
          MODIFY ITAB INDEX TAB-CURRENT_LINE. "update modifed records
          UPDATE ZTABLE FROM TABLE ITAB. "update database table from internal table
      ENDCASE.
    ENDMODULE.                 " SAVE_DATA  INPUT
    Hope this solves your problem.
    Thanks & Regards
    Tarun Gambhir

  • Update 1 million records in batches of 1000

    Hello,
    I have to update 1 million records in groups of 1000. This is the best code I've got but it takes about 1hr and 15 minutes. (I'm also doing a commit every 5k for rollback purposes.) Does anybody have any better ideas?
    thanks,
    -Kevin
    set time on
    spool c:\testrowbatch.log
    declare
    vrow_id varchar2(15);
    pcount number:=0;
    icount number:=0;
    vbnum number:=1;
    CURSOR cs_01 is
    select row_id from eim_activity where if_row_batch_num = '10';
    BEGIN
    OPEN cs_01;
    LOOP
    FETCH cs_01 INTO vrow_id;
    IF cs_01%NOTFOUND THEN
    dbms_output.put_line('End of Data');
    CLOSE cs_01;
    END IF;
    Update eim_activity set if_row_batch_num = vbnum where row_id = vrow_id;
    icount:=icount + 1;
    pcount:=pcount + 1;
    IF icount = 5000 THEN
    commit;
    icount:=0;
    CLOSE cs_01;
    OPEN cs_01;
    END IF;
    IF pcount = 1000 THEN
    vbnum := vbnum +1;
    pcount:=0;
    end if;
    END LOOP;
    commit;
    end;

    There are three problems with commiting inside the loop, particularly when you are updating the table that you have created the cursor on.
    First, as everyone pointed out, it makes it slower.
    Second, you run a serious risk of getting an ora 1555 Snapshot too old error. In which case you may not be able to reliably restart the procedure.
    Third, it actually takes more rollback doing it that way than doing it in a single transaction.
    The problem with Todd's approach is that you will update some records multiple times, whether you commit or not. You will set if_row_batch_num = 10 for 1000 records during the 10th iteration of the loop. These records will then be found in a subsequent iteration.
    If you are doing this in PL/SQL just to increment the variable for every 1000 records, then this single update will solve that problem. It will be faster than your procedure, it will only update each row once per run, and it will always be an all or nothing update. You will still set if_row_batch_num = 10 for 1000 existing records.
    UPDATE eim_activity
    SET if_row_batch_num = FLOOR(rownum/1001) +1
    WHERE if_row_batch_num = 10;TTFN
    John

Maybe you are looking for