Update ztable records

Hi,
I am trying to move Internal table contents to Z TABLE.
I am having data issue. In debugging I see ITAB enteries say for example 100
all are not getting in to ZTABLE.
I am not filtering anywhere
I have 100 records in itab with fld1 = 'ZBC'.
  LOOP AT t_data WHERE  fld1= 'ABC'.
     ZTAB-FLD1 = t_data-FLD1.
     ZTAB-FLD2 = t_data-FLD2.
     ZTAB-FLD3 = t_data-FLD3.
     ZTAB-FLD4 = t_data-FLD4.
     modify ZTAB .
     commit work.
  endloop.
Anything wrong in my code?
Rgds
Praveen

Hi, First try using the INSERT statement and then check sy-subrc. If sy-subrc <> 0, then go for the MODIFY statement.
Eg:
ztable-fld 1 = t_itab-fld1.
ztable-fld 2 = t_itab-fld2.
ztable-fld 3 = t_itab-fld3.
ztable-fld 4 = t_itab-fld4.
insert ztable.
if sy-subrc <> 0.
modify ztable.
endif.
Try this code, it should work.

Similar Messages

  • Update ztable from database table directly

    hi all,
    can u tell me the possible ways to update a ztable from database table directly.
    i mean is there anyway to update ztable whenever entry is created in database table .
    i dont want to update using insert,modify statements.
    points will be rewarded to all hlpful answers.

    A slightly dirty solution:
    Use SAP functions for reading from CDHEADER and CDPOS tables [with enough filters such that you extract minimum records possible] to read changes to MARA table fields since last run of your program. Use this information to update your ZTABLE. I would recommend having a table maintainance generator on ZTABLE. The actual update should be by a BDC by calling transaction SM30 for ZTABLE maintainance. Now the program may be set up as a batch job running 1ce an hour. You get updates to the extent of 1 hour latency.
    Alternatively, you may look if an opportunistic BADI / user Exit is there alongside MM01/02 transactions - assuming the latter are the only ones updating MARA. In this BADI you may write the code to update ZTABLE- again, look to do it by BDC call transaction sm30 to maintain ZTable. To lighten up the code -load on BADI you may simply raise a custom event and move on. You will configure a job that runs your program when that particular event is raised. This will need the 'burden' of figuring out the changes, though.
    An elegant way would be to fire a MATMAS fIDOC for every change to Material, capture that and turn back the changes to ZTABLE. This will facilitate the delta load.

  • Update Ztable report

    Hi Experts,
    I want to update some FI documents into my ztable report day wise as a background, So pls help me with some example reports how to update/append records into Ztable from main table like bseg or bkpf(for example) and how to modify the same table and append the existing records,if any user changes the same document for any fields after posted.
    For ex: If an LC document get posted as new document, then my report will update the records into Ztable from BSEG. If the user agains going and changing the same document ,say for example amounts, then simultaneously it has to be updated into my same document number of my Ztable.
    hope its very clear.
    Pls post ur examples and advises.
    thanks & regards
    sankar.

    Example:
    *Lock Table ZHPA_CON_INF
      PERFORM sub_lock_db.
    *Update the table with this work area having current date and time
      MODIFY zhpa_con_inf FROM wa_zhpa_con_inf.
      IF sy-subrc = 0.
        COMMIT WORK.
      ENDIF.
    *Unloak Table ZHPA_CON_INF
      PERFORM sub_unlock_db.
    *&      Form  sub_lock_db
          Lock Database
          No Parameters
    FORM sub_lock_db.
    Declare the local variable for varkey
      DATA  : l_varkey   TYPE vim_enqkey.   "Varkey
    Move the value of client to local variable
      CONCATENATE sy-mandt c_intid INTO l_varkey.
    Lock the table before update
      CALL FUNCTION 'ENQUEUE_E_TABLEE'
        EXPORTING
          tabname        = c_tabname "ZHPA_CON_INF
          varkey         = l_varkey
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH 'Error while locking table:'(002) c_tabname.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " sub_lock_db
    *&      Form  sub_unlock_db
          Unlock Database
          No Parameters
    FORM sub_unlock_db .
    Declare the local variable for varkey
      DATA  : l_varkey   TYPE vim_enqkey.   "Varkey
    Move the value of client to local variable
      CONCATENATE sy-mandt c_intid INTO l_varkey.
    *Unlock the table
      CALL FUNCTION 'DEQUEUE_E_TABLEE'
        EXPORTING
          tabname      = c_tabname  "ZHPA_CON_INF
          varkey       = l_varkey.
    ENDFORM.                    " sub_unlock_db

  • Updating Ztable

    Hi,
    Iam trying to insert records into a Ztable from an internal table.
    Iam using the below piece of code to update Ztable.
      data: it_finalvals TYPE STANDARD TABLE OF zfirst_invoice.
    IF not it_finalvals[] is INITIAL.
        modify zfirst_invoice FROM table it_finalvals.
        commit work.
      ENDIF.
    But the Ztable is not getting updated.Pls help me to solve this problem.
    Thanks in advance.
    -Sravanthi.

    Hi !
    IF not it_finalvals[] is INITIAL.
    modify zfirst_invoice FROM table it_finalvals.
    IF sy-subrc = 0.
    commit work.
    ENDIF.
    ENDIF.
    What is the value of sy-dbcnt and sy-subrc ?
    Probably there is no new data in your it_finalvals and thats why u dont see a chnage..
    Confirm if there is atleast 1 line with changed data or a completely new line.
    Revert with results.

  • Update new records and delete old record? Urgent

    Iam updating some records from internal table to Data base table.
    Please suggest me
    INSERT DBTable FROM TABLE itab.     
    UPDATE DBTable FROM  itab.
    Delete existing records.
      DELETE  DBTable FROM TABLE itab_old.
    Please suggest me

    Got you..
    Iam colecting some records to internal table from Data base table
    based on year and month.
    Then changing the date and months in interenla table
    then inserrting this modified records of internal table into datta base table.
    Finaly delete the old records with old dates.
    Here is the suggestion..This is a logic and not the exact code..
    DATA: ITAB TYPE STANDARD TABLE OF ZTABLE WITH HEADER LINE.
    DATA: ITAB_OLD TYPE STANDARD TABLE OF ZTABLE WITH HEADER LINE.
    SELECT * FROM ZTABLE
           INTO TABLE ITAB.
    ITAB_OLD = ITAB.
    ITAB-NEW_DATE = SY-DATUM.
    MODIFY ITAB TRANPORTING NEW_DATE WHERE KEY_FIELD = 'DS'.
    Deletion part.
    DELETE ZTABLE FROM TABLE ITAB_OLD.
    Insertion part
    INSERT ZTABLE FROM TABLE ITAB.
    Thanks,
    Naren

  • Need to update Ztable from final internal table

    Hi,
    ITAB   = Final internal table has 9 fields : 1 2 3 4 5 6 7 8 9
    Ztable = Ztable has 6 fields ex : 1 3 4 6 7 8
    Structure of both Itab and Ztable are different.
    I have data in the Final Internal table and needs to update data into a ztable.
    If condition is true...
      Modify ztable from itab
    endif.
    Any suggestions how I can update Ztable from the INternal table
    Regards,
    Kittu

    Hello,
    First keep the loop to the final internal table then move all the records to the work area after moving to workarea then create another workarea for the Ztable then move only the field values which are there in Ztable then use modify keyword.
    example
    move:
    y_wa_final_itab-kdauf to y_wa_zhr_item-vbeln,
    y_wa_final_itab-kdpos to y_wa_zhr_item-posnr,
    y_wa_final_itab-receiptno to y_wa_zhr_item-receiptno
    modify zhr_item from y_wa_zhr_item

  • Error while updating a record in MS Access

    Im new to coldfusion and am running into a problem while
    trying to update a record in a MS Access table.
    I have a MS Access table where the primary key is a
    auto-number long integer field named jobid.
    I have an edit form where info can be changed then saved. A
    hidden form field named jobid holds the records primary key field
    value for the record being edited. When submitted this is what
    happens:
    I use a basic SQL UPDATE statement but I get the error "Data
    type mismatch in criteria expression"
    Some code:
    <cfset nJobId=Int(Val(FORM.jobid))>
    *dont know if i need the above line but using #FORM.jobid#
    in the WHERE clause below didnt work either
    <cfquery datasource="lrs">
    UPDATE jobs SET
    status='#FORM.status#',
    offer='#FORM.offer#',
    postdate="#CreateODBCDate(FORM.postdate)#",
    jobtype=#FORM.jobtype#,
    jobtitle='#FORM.jobtitle#',
    ..etc...
    WHERE jobid=#nJobId#
    The WHERE clause is where the error occurs with "Data type
    mismatch in criteria expression"
    After a few times with that i changed the where clause to
    simply "WHERE jobid=1" as this record id does exist, but it has the
    same error.
    I then tried changing the where clause to
    WHERE jobid=<cfqueryparam cfsqltype="cf_sql_bigint"
    value="#FORM.jobid#">
    and there it "appears" to work, but the record is not
    actually updated. No changes are made to the table though no error
    is thrown.
    Im missing something here... why wont the record update
    ?

    The data type mismatch isn't necessarily in your where
    clause. I'm guessing that it's the quotes around the create
    odbcdate function.
    use of cfqueryparam will solve a lot of these problems for
    you.

  • Getting timeout error while updating a record from c#

    Hi,
    I have around 30k records in a tables. When I update that record inside the Transaction (Enterprise Data Library, c#) , it takes long time and throws timeout error.
    But I am able to update the same record via Toad.
    In the morning I tried same updating the record, it works without any change in the code or script.+
    is it due table lock or db related issue? please adivse, how to resolve if occurs again.
    anand

    Code:
    private static void Save()
    using (DBTransactionManager dbTransactionManager = new DBTransactionManager())
    try
    DataTableDAL.Instance.ExecuteDML("Update Voyage SET BallastBonus = 30000 WHERE ID = 'AE53B610BEA743EC8AFBAED0C8349BF8';");
    //commit database
    dbTransactionManager.Commit();
    catch
    dbTransactionManager.RollBack();
    throw;
    Table
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram     Encryption Alg     Salt
    ID     1     1     N     NVARCHAR2 (32)          None          
    CALCNUMBER     2          N     NUMBER (10)          None          
    CURRENCYID     3          N     NVARCHAR2 (32)          Frequency          
    CALCTYPE     4          N     NUMBER (5)          Frequency          
    ESTIMATEDESCRIPTION     5          Y     NVARCHAR2 (200)          None          
    ESTIMATEGROUPDESCRIPTION     6          Y     NVARCHAR2 (200)          None          
    BALLASTBONUS     7          Y     NUMBER (12,2)          None          
    BALLASTBONUSCOMMPCT     8          Y     NUMBER (6,3)          None          
    ISESTIMATE     9          N     NUMBER (1)          None          
    ADDITIONALSTEAMVALUE     10          Y     NUMBER (8,4)          None          
    ISADDITIONALSTEAMPCT     11          Y     NUMBER (1)          None          
    ADDITIONALPORTVALUE     12          Y     NUMBER (8,4)          None          
    ISADDITIONALPORTPCT     13          Y     NUMBER (1)          None          
    CREATEDBY     14          N     NVARCHAR2 (32)          Frequency          
    CREATEDDATE     15          N     DATE          None          
    UPDATEDBY     16          Y     NVARCHAR2 (32)          None          
    UPDATEDDATE     17          Y     DATE          None          
    LUMPSUMCARGOCOST     18          Y     NUMBER (1)          None          
    BUNKERPRICEMETHOD     19          Y     VARCHAR2 (30 Byte)          None          
    INCCONTCALCRESULT     20          Y     NUMBER (1)          None          
    FINAL_EST     21          Y     NUMBER          None          
    SPOT_VOYAGE     22          Y     NUMBER (1)          None          
    ISRUNCOSTEDIT     23          Y     NUMBER (1)          None          
    Index
    Table doesnt have any index, except primary key index.
    Total Records
    35,000
    Hope this input might sufficient to help me.

  • Error in updating BO record

    Hi all,
           I am trying to update one of the attribute of BO record by calling update function of BO in an application service. But i am getting an error message " Entity is locked by user guest".
    I have written following code.
    // getting service instance
                       OrderStatusServiceLocal orderstatusBOinstance = getOrderStatusService();
    //getting a specific record
            OrderStatus orderrecord = orderstatusBOinstance.readByCustomKeys(orderid);
    //changing one of attribute
            orderrecord.setApprovalstatus(newstatus);
    //updating the record
            orderstatusBOinstance.update(orderrecord);
    Can anybody guide me in removing this error.
    thanks in advance
    Reena

    I have checked the code. There is no problem in the current portion of the code, you have provided (I was wrongly thinking it should be insert into....!! mistake)
    I have tested with Oracle Database and classes12.zip in classpath. It ran smoothly.

  • Can't update mysql records from a web page

    Hi everybody,
    I am beginning with Dreamweaver CS5.
    I followed a video tutorial on how to visually design a data entry/update web page for a mysql database using server behaviors.
    My problem is that I was able to insert records and see inserted records but when I try to update a record it doesn't work.
    I don't get any error message, it just redirects me to the listing page as it's supposed to but doesn't take into account the changes I made.
    Below are 2 printscreens along with the corresponding code.
    Can someone help me please?
    Records list web page :
    Records list code :
    <?php require_once('Connections/dw_nouvellenaissance.php'); ?>
    <?php
    // *** Display of registered users
    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;
    mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
    $query_users_videostream = "SELECT * FROM videostream_users";
    $users_videostream = mysql_query($query_users_videostream, $dw_nouvellenaissance) or die(mysql_error());
    $row_users_videostream = mysql_fetch_assoc($users_videostream);
    $totalRows_users_videostream = mysql_num_rows($users_videostream);mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
    $query_users_videostream = "SELECT * FROM videostream_users";
    $users_videostream = mysql_query($query_users_videostream, $dw_nouvellenaissance) or die(mysql_error());
    $row_users_videostream = mysql_fetch_assoc($users_videostream);
    $totalRows_users_videostream = mysql_num_rows($users_videostream);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Videostream Users List</title>
    </head>
    <body>
    <h3 align="center">Videostream Users List </h3>
    <table  align="center" width="75%" border="1" cellspacing="0" cellpadding="0">
    <tr align="center" BGCOLOR="#99CCFF">
          <th>Surname</th>
          <th>Name</th>
          <th>City</th>
          <th>UserID</th>
          <th>Password</th>
          <th>Edit</th>
          <th>Delete</th>
        </tr>
    <?php do { ?>
        <tr align="center">
          <td><?php echo $row_users_videostream['Nom'];?></td>
          <td><?php echo $row_users_videostream['Prenom'];?></td>
          <td><?php echo $row_users_videostream['Ville'];?></td>
          <td><?php echo $row_users_videostream['user_name'];?></td>
          <td><?php echo $row_users_videostream['user_password'];?></td>
          <td><a href="modifyuser.php?User_id=<?php echo $row_users_videostream['User_id']; ?>"><img src="images/edit.png" alt="modifier" width="15" height="15" hspace="5" /></a>
          <td><a href="deleteuser.php?User_id=<?php echo $row_users_videostream['User_id']; ?>"><img src="images/delete.png" alt="supprimer" width="15" height="15" hspace="5" /></a></td>
        </tr>
    <?php } while ($row_users_videostream = mysql_fetch_assoc($users_videostream)); ?>
    </table>
    <p> </p>
    <p align="center"><a href="formlogoutadmin.php">Deconnexion</a></p>
    </body>
    </html>
    </body>
    </html>
    <?php
    mysql_free_result($users_videostream);
    ?>
    Udate records web page:
    Update records code:
    <?php require_once('Connections/dw_nouvellenaissance.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;
    //*** Update User
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "usersform")) {
      $updateSQL = sprintf("UPDATE videostream_users SET Nom=%s, Prenom=%s, Ville=%s, user_name=%s, user_password=%s WHERE User_id=%s",
                           GetSQLValueString($_POST['Nom'], "text"),
                           GetSQLValueString($_POST['Prenom'], "text"),
                           GetSQLValueString($_POST['Ville'], "text"),
                           GetSQLValueString($_POST['user_name'], "text"),
                           GetSQLValueString($_POST['user_password'], "text"),
                           GetSQLValueString($_POST['User_id'], "int"));
      mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
      $Result1 = mysql_query($updateSQL, $dw_nouvellenaissance) or die(mysql_error());
      $updateGoTo = "showusers.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
        $updateGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $updateGoTo));
    $colname_users = "-1";
    if (isset($_GET['User_id'])) {
      $colname_users = $_GET['User_id'];
    mysql_select_db($database_dw_nouvellenaissance, $dw_nouvellenaissance);
    $query_users = sprintf("SELECT * FROM videostream_users WHERE User_id = %s", GetSQLValueString($colname_users, "int"));
    $users = mysql_query($query_users, $dw_nouvellenaissance) or die(mysql_error());
    $row_users = mysql_fetch_assoc($users);
    $totalRows_users = mysql_num_rows($users);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=charset=iso-8859-15" />
    <title>Modify User</title>
    </head>
    <body>
    <h1>Welcome Daniel</h1>
    <h3 align="left">Please modify user fields then click OK</h3>
    <form action="<?php echo $editFormAction; ?>" method="POST" name="usersform" id="usersform">
    <input name="User_id" type="hidden" value="" />
    <table align="left" width="50%">
      <tr align="left">
      <th>Surname: </th><td><input name="Nom" type="text" id="Nom" value="<?php echo $row_users['Nom']; ?>" /></td>
    </tr>
    <tr align="left">
      <th>Name :</th><td><input name="Prenom" type="text" id="Prenom" value="<?php echo $row_users['Prenom']; ?>" /></td>
    </tr>
    <tr align="left">
       <th>City: </th><td><input name="Ville" type="text" id="Ville" value="<?php echo $row_users['Ville']; ?>" /></td>
    </tr>
    <tr align="left">
      <th>User ID:</th><td><input name="user_name" type="text" id="user_name" value="<?php echo $row_users['user_name']; ?>" /></td>
    </tr>
    <tr align="left">
    <th>Password:</th><td><input name="user_password" type="text" id="user_password" value="<?php echo $row_users['user_password']; ?>" /></td>
    </tr>
    <tr align="left">
    <td> </td><td align="left"><input type="submit" name="valider" value="Update" /></td>
    </tr>
    </table>
    <input type="hidden" name="MM_update" value="usersform" />
    </form>
    </body>
    </html>
    <?php
    mysql_free_result($users);
    ?>

    Daniel Cronin,
    This link has information on preparing movies for viewing online by an iPhone:
    https://developer.apple.com/iphone/devcenter/designingcontent.html
    Click on the drop down menu for "Ensure a Great Audio and Video Experience".
    You may need to register for Apple Developer Connection in order to view that information.
    Hope this helps,
    Nathan C.

  • How to update multiple records in a table created in view (web dynpro)

    Here is my coding......
    *coding to get the district value
    DATA lo_nd_district TYPE REF TO if_wd_context_node.
        DATA lo_el_district TYPE REF TO if_wd_context_element.
        DATA ls_district TYPE wd_this->element_district.
        DATA lv_district_txt LIKE ls_district-district_txt.
      navigate from <CONTEXT> to <DISTRICT> via lead selection
        lo_nd_district = wd_context->get_child_node( name = wd_this->wdctx_district ).
      get element via lead selection
        lo_el_district = lo_nd_district->get_element(  ).
      get single attribute
        lo_el_district->get_attribute(
          EXPORTING
            name =  `DISTRICT_TXT`
          IMPORTING
            value = lv_district_txt ).
    *coding to diplay records when clicking a button(Submit)
    DATA lo_nd_table TYPE REF TO if_wd_context_node.
    DATA lo_el_table TYPE REF TO if_wd_context_element.
    DATA ls_table TYPE wd_this->element_table.
      DATA lv_district LIKE ls_table-district.
    navigate from <CONTEXT> to <TABLE> via lead selection
      lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
    get element via lead selection
      lo_el_table = lo_nd_table->get_element(  ).
    get single attribute
      lo_el_table->set_attribute(
        EXPORTING
          name =  `DISTRICT`
       " IMPORTING
          value = lv_district_txt ).
    The above coding updates only one record to that
    table created in view.
    If i enter 2nd district value means then the first record
    in the table is overwritten.
    So my need is the record should not be overwritten.
    it(2nd record ) should be displayed after the 1st record.
    Any one can help me and send the coding plz....

    instead of using set attribute you should use bind table method to display/update the records in table view.
    step1 ) collect all the data in a local table
    step2 ) and the bind that lacal table with your node
    search1 = wd_context->get_child_node( name = `TABLE1` ).
    search1->bind_table( lt_detail)
    here lt_detail is your local table and TABLE1 is node which is bound with table ui element.

  • Subsequent update of record, long time to appear in Journalized View

    Hi,
    I'm running some integration tests that do an insert into a source table, commits the insert, updates that record, commits the update. The cscn numbers are widely spaced, for example, the insert is 69997742 and the update is 70000579. I have a scheduled scenario running every few minutes that as a first step, extends window and locks subscriber.
    What I'm seeing is the Insert will get propagated to the target immediately, but then the cscn number doesn't change for a long time, and at some random time in the future it will be updated and the update record will make it throguh to the target. I'm seeing time differences of 7 - 11 minutes between the arrival of the insert to the target and the arrival of the update.
    Does anyone know how to decrease this "latency", is there a way of speeding up the time it takes for the cscn number to increment?
    I found the following two tuning commands and have tried them, but I'm still seeing a long period of time between the insert and update,
    begin dbms_capture_adm.alter_capture(capture_name=>'CDC$C_SAMS_INTEG', checkpoint_retention_time => 7); end;
    begin dbms_capture_adm.set_parameter('CDC$C_SAMS_INTEG', 'parallelism','4'); end;
    Any ideas would be appreciated!
    Cheers
    Damian

    We temporarily solved the problem by switching to synchronous CDC. When we ran a performance analyzer over the database while data capture was taking place we found logmnr was taking around 6 minutes to query the data dictionary which looked like this bug: https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=458214.1 which is apparently fixed. So the either the bug isnt fixed or we haven't configured the database correctly. Anyone know a good tutorial for getting the right configuration for archive logging, number of redo logs and their size, and retention policies etc?

  • Windows Server 2008: Sysprep Error: Error [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 32[gle=0x00000020]

    I have a base template (which has never been sysprep'd) from which I create linked clones.  After the linked clone comes up, I run the following command:
    c:\windows\system32\sysprep\sysprep.exe /generalize /oobe /reboot /unattend:c:\windows\panther\unattend.xml
    This works fine for the first few linked clones, but after about 3-4 linked clones are running, I start to hit "A fatal error occurred while trying to sysprep the machine."
    ****c:\windows\panther\setuperr.log****
    2013-03-29 16:40:07, Error      [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 32[gle=0x00000020]
    2013-03-29 16:40:07, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]
    ****c:\windows\panther\unattend.xml****
    <?xml version='1.0' encoding='utf-8'?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <InputLocale>en-US</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UILanguageFallback>en-US</UILanguageFallback>
                <UserLocale>en-US</UserLocale>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <Username>Administrator</Username>
                    <Password>
                        <Value>ca$hc0w</Value>
                        <PlainText>true</PlainText>
                    </Password>
                </AutoLogon>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <NetworkLocation>Work</NetworkLocation>
                    <ProtectYourPC>3</ProtectYourPC>
                </OOBE>
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>ca$hc0w</Value>
                        <PlainText>true</PlainText>
                    </AdministratorPassword>
                </UserAccounts>
                <TimeZone>Pacific Standard Time</TimeZone>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <ProductKey>7M67G-PC374-GR742-YH8V4-TCBY3</ProductKey>
                <ComputerName>*</ComputerName>
            </component>
        </settings>
    </unattend>
    ****c:\windows\panther\setupact.log****
    2013-03-29 16:40:07, Info       [0x0f004d] SYSPRP The time is now 2013-03-29 16:40:07
    2013-03-29 16:40:07, Info       [0x0f004e] SYSPRP Initialized SysPrep log at c:\windows\system32\sysprep\Panther
    2013-03-29 16:40:07, Info       [0x0f0054] SYSPRP ValidateUser:User has required privileges to sysprep machine
    2013-03-29 16:40:07, Info       [0x0f0056] SYSPRP ValidateVersion:OS version is okay
    2013-03-29 16:40:07, Info       [0x0f005e] SYSPRP ScreenSaver:Screen saver was already disabled, no need to disable it for sysprep
    2013-03-29 16:40:07, Info       [0x0f007e] SYSPRP FCreateTagFile:Tag file c:\windows\system32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
    2013-03-29 16:40:07, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'
    2013-03-29 16:40:07, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'
    2013-03-29 16:40:07, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'REBOOT'
    2013-03-29 16:40:07, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'
    2013-03-29 16:40:07, Info       [0x0f004a] SYSPRP WaitThread:Entering spawned waiting thread
    2013-03-29 16:40:07, Info                         [sysprep.exe] UnattendFindAnswerFile: Looking at explicitly provided unattend file [c:\windows\panther\unattend.xml]...
    2013-03-29 16:40:07, Info                         [sysprep.exe] UnattendFindAnswerFile: [c:\windows\panther\unattend.xml] meets criteria
    for an explicitly provided unattend file.
    2013-03-29 16:40:07, Info                  SYSPRP SysprepSearchForUnattend: Using unattend file at [c:\windows\panther\unattend.xml].
    2013-03-29 16:40:07, Info                  SYSPRP SysprepSearchForUnattend: [generalize] pass in unattend file [c:\windows\panther\unattend.xml] either doesn't exist or passed
    validation
    2013-03-29 16:40:07, Info                  SYSPRP WinMain:Found unattend file at [c:\windows\panther\unattend.xml]; caching...
    2013-03-29 16:40:07, Info                  SYSPRP WinMain:Processing unattend file's 'generalize' pass...
    2013-03-29 16:40:07, Info                  SYSPRP Sysprep is running a generalize pass with the following unattend file: [%windir%\panther\unattend.xml]
    2013-03-29 16:40:07, Info                  SYSPRP RunUnattendGeneralizePass: Sysprep unattend generalize pass exits; hr = 0x0, hrResult = 0x0, bRebootRequired = 0x0
    2013-03-29 16:40:07, Info       [0x0f003f] SYSPRP WinMain:Processing 'cleanup' request.
    2013-03-29 16:40:07, Error      [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 32[gle=0x00000020]
    2013-03-29 16:40:07, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070020[gle=0x00000020]
    2013-03-29 16:48:52, Info       [0x0f004c] SYSPRP WaitThread:Exiting spawned waiting thread
    2013-03-29 16:48:52, Info       [0x0f0059] SYSPRP ScreenSaver:Screen saver was originally disabled, leaving it disabled
    2013-03-29 16:48:52, Info       [0x0f0052] SYSPRP Shutting down SysPrep log
    2013-03-29 16:48:52, Info       [0x0f004d] SYSPRP The time is now 2013-03-29 16:48:52

    Hi,
    This is typical of an OEM license issue.
    To avoid this in the future you should look at site/volume licensing.
    Anyway.
    so, first check if you can re-arm by runing the
    slmgr.vbs /dlv and check the re-arm counter, if it set to zero.. you need to do the following :
    http://support.microsoft.com/kb/929828 (set the <SkipRearm>1</SkipRearm> like in the example, note: this option will make the product key window to appear in the setup process).
    you can also try running : slmgr.vbs -rearm, to rearm Windows.
    after that, let's come back to the sysprep process.. for syspreping already syspreped machine we have to change few keys in the registry :
    HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\
    CleanupState:2
    HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\
    GeneralizationState:7
    After done with the registry, do the following :
    Start -> Run : msdtc -uninstall (wait few seconds)
    Start -> Run : msdtc -install (wait few seconds)
    Restart the machine
    Check the registry for the right registry keys values
    sysprep with the new XML answerfile.
    Source: Olegm
    If you find my information useful, please rate it. :-)

  • Updating a record using variables

    I want to use a variable(s) to update my record. I get a Java excpetion when using this code:
    <%@ page import="java.sql.*"%>
    <%@ include file = "/html/common/init.jsp" %>
    <% String ticketid = request.getParameter("ticketid"); %>
    <% String comment = request.getParameter("comment"); %>
    <% String userid = user.getUserId(); %>
    <% String comment_body = "comment_body" %>
    <%
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/helpdesk", "root", "password");
    Statement updStmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    ResultSet updRs = updStmt.executeQuery("SELECT * FROM HISTORY WHERE (ticketid) = ('"+ticketid+"')");
    updRs.next();
    updRs.updateString "('"+comment_body+"', '"+comment+"')";
    updRs.updateRow();
    con.close();
    %>
    Here is the exception;
    An error occurred at line: 7 in the jsp file: /Projects/Help Desk/PostComments.jsp
    Generated servlet error:
    C:\Program Files\Liferay\server\default\work\jboss.web\localhost\_\org\apache\jsp\Projects\Help_0020Desk\PostComments_jsp.java:546: ';' expected
    String comment_body = "comment_body"
    ^
    An error occurred at line: 10 in the jsp file: /Projects/Help Desk/PostComments.jsp
    Generated servlet error:
    C:\Program Files\Liferay\server\default\work\jboss.web\localhost\_\org\apache\jsp\Projects\Help_0020Desk\PostComments_jsp.java:558: not a statement
    updRs.updateString "('"+comment_body+"', '"+comment+"')";
    ^
    An error occurred at line: 10 in the jsp file: /Projects/Help Desk/PostComments.jsp
    Generated servlet error:
    C:\Program Files\Liferay\server\default\work\jboss.web\localhost\_\org\apache\jsp\Projects\Help_0020Desk\PostComments_jsp.java:558: ';' expected
    updRs.updateString "('"+comment_body+"', '"+comment+"')";
    ^
    3 errors

    Thanks for the insult.<rant>
    Your problem was that you were missing a semi-colon at the end of line, which every Java statement requires. The error messages that you posted would tell most people who have more than casual experience with compiling Java that you have a trivial syntax problem.
    The people who take the time to answer the questions in this forum are mostly experienced professionals who answer questions on a volunteer basis out of the goodness of their heart. It takes time, it takes work, and we get the gratification of helping people, learning about new problems, and learning the tricks that the other pros know that we don't. Therefore it is frustrating to see a problem that ought to be solvable by anyone who's gotten past their first program harder than "hello world".
    However, I don't see anything insulting in our responses so far, or about saying that the impression I have from this and all your other posts is that you don't have the first idea about how to do what you're trying to do and you want this forum to design your application for you. While design questions are certainly appropriate in the forum, both the basic level and the number of your questions suggest that you really need to spend some time getting educated, by reading books, all the Java "how to" articles on the web, or examining the code of all the open source projects that happen to do similar things. Or you should go to school, hire a tutor, or a mentor within your development environment. You're acting like you expect the forum to do your work for you, and be polite and happy about it.
    I appreciate that trying to learn all these areas of Java at once is very hard and can be frustrating; it's taken me about 5 years to get to "above average" in some areas and I still have an enourmous amount to learn about other areas, even though I started as a senior programmer who has been working in non-Java, non-web areas for 25 years. Learning new technologies takes an enormous amount of work; your posting of an issue that many college freshman solve in their first "hands-on" project suggests to me that you are utterly unwilling to do your own work or take the time to think about your problems before posting. I write that not to insult you - it's truly how I feel - but to help you understand why you might not be getting the answers you seek in this forum; for many of us, you're just asking too much and whining about "insults" doesn't help your cause.
    Sorry if we hurt your feelings. After that rant, I'm going to attempt to restrict my responses to the technical issues at hand.
    </rant>

  • Server java trace error while updating bulk records from AIX to Oracle 10g

    Hi
    I am getting an error in TCL (Tool Command language) script that updates the records in a database table i.e around 2500 records are to be updated. I am using update statement with bind variables to insert the data.
    SQL "insert into netuser.visit_temp (FP_FROM,FP_TO,HOPS,FP_FROM_ID) values (:SN,:EN,:HP,:FPID)" [list SN $startnode EN $endnode HP $hops FPID $fpId]
    However, after processing 900 or so records (takes around 8 hours) I get the following error:
    environment variable "SERVER_JAVA_TRACE" undefined
    while executing
    "getenv SERVER_JAVA_TRACE"
    invoked from within
    "dotransaction {
         logm "Processing $fp"
         set value [SQL $query3 [list FP $fp]]
         logm "Found value $value"
         set fpid [Koplingspunkt quer..."
        ("foreach" body line 3)
        invoked from within
    "foreach fp $cmd2 {
         UtilityObject cleanCache
         dotransaction {
             logm "Processing $fp"
             set value [SQL $query3 [list FP $fp]]
         logm "Found v..."
    Could anyone please suggest the possible cause of error?

    Not a Java question. Locking.

Maybe you are looking for

  • Error on deploying web dynpro application

    Hi, When I deploy the application , the following error is seen. did not accept login request as admin on port its a simple hellp world application I check the link http://help.sap.com/saphelp_nw04/helpdata/en/76/fb72ec091f4bf8a2d8ba321bb7e8d9/conten

  • How to dipsplay value of multi select prompt in Answers

    I have a request in Answers that has a multi select column prompt. I can display the value selected in the prompt in the Narative view as long as only one value is selected. When more than one value is selected, how can I display the multiple values

  • ESB Reprocessing Issue with client API

    All, We are currently working on reprocessing the failed ESB instances using the client API. The instances are getting reprocessed but on a random basis are are getting the below exception. The reprocessing code is also provided. oracle.tip.esb.clien

  • Each exception class in its own file????

    Hi, I am still quite new to java, and I don't fully understand exceptions. Could you please tell me if for each exception class you require do you have to have a a seperate file. e.g. I'm creating my own array exceptions classes. The following is the

  • Third Party File Recovery

    I was currently working on a video project, using FCP with a few friends. When I woke up the next morning the project file was in the trash. I removed the project file from the trash and put it back on the computers HD and an external that I am using