Only first row of a mysql table is updated

Hi,
I'm using Netbeans 5.5 with Visual Web Pack and trying to update data, stored in a mysql table.
I use a dropdown list to select a row and show the data in various textfields. This works fine. The problem, that it's not possible to save changes, I enter in the textfields. Everytime only the first row of the table will be (over)written. This happens also with the derby database. I checked the tutorial about inserting, updatting and deleting, it works fine. But they use a table to make changes to the data, so the case is different from mine.
Can anybody give me a hint? I'm going crazy ...
Thanx in advance
Markus

yes this sounds crazy. i encountered similar problem with textfields. if they are numerous type, don't forget to add integerConverter to the textfield. it helped me out in my case. hope this helps
dElay

Similar Messages

  • How can I modify this script to return only certain rows of my mySQL table?

    Hi there,
    I have a php script that accesses a mySQL database and it was generated out of the Flex Builder wizard automatically. The script works great and there are no problems with it. It allows me to perform CRUD on a table by calling it from my Flex app. and it retrieves all the data and puts it into a nice MXML format.
    My question, currently when I call "findAll" to retrieve all the data in the table, well, it retrieves ALL the rows in the table. That's fine, but my table is starting to grow really large with thousands of rows.
    I want to modify this script so that I can pass a variable into it from Flex so that it only retrieves the rows that match the "$subscriber_id" variable that I pass. In this way the results are not the entire table's data, only the rows that match 'subscriber_id'.
    I know how to pass a variable from Flex into php and the code on the php side to pick it up would look like this:
    $subscriberID = $_POST['subscriberID'];
    Can anyone shed light as to the proper code modification in "findAll" which will take my $subscriberID variable and compare it to the 'subscriber_id' field and then only return those rows that match? I think it has something to do with lines 98 to 101.
    Any help is appreciated.
    <?php
    require_once(dirname(__FILE__) . "/2257safeDBconn.php");
    require_once(dirname(__FILE__) . "/functions.inc.php");
    require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
    * This is the main PHP file that process the HTTP parameters,
    * performs the basic db operations (FIND, INSERT, UPDATE, DELETE)
    * and then serialize the response in an XML format.
    * XmlSerializer uses a PEAR xml parser to generate an xml response.
    * this takes a php array and generates an xml according to the following rules:
    * - the root tag name is called "response"
    * - if the current value is a hash, generate a tagname with the key value, recurse inside
    * - if the current value is an array, generated tags with the default value "row"
    * for example, we have the following array:
    * $arr = array(
    *      "data" => array(
    *           array("id_pol" => 1, "name_pol" => "name 1"),
    *           array("id_pol" => 2, "name_pol" => "name 2")
    *      "metadata" => array(
    *           "pageNum" => 1,
    *           "totalRows" => 345
    * we will get an xml of the following form
    * <?xml version="1.0" encoding="ISO-8859-1"?>
    * <response>
    *   <data>
    *     <row>
    *       <id_pol>1</id_pol>
    *       <name_pol>name 1</name_pol>
    *     </row>
    *     <row>
    *       <id_pol>2</id_pol>
    *       <name_pol>name 2</name_pol>
    *     </row>
    *   </data>
    *   <metadata>
    *     <totalRows>345</totalRows>
    *     <pageNum>1</pageNum>
    *   </metadata>
    * </response>
    * Please notice that the generated server side code does not have any
    * specific authentication mechanism in place.
    * The filter field. This is the only field that we will do filtering after.
    $filter_field = "subscriber_id";
    * we need to escape the value, so we need to know what it is
    * possible values: text, long, int, double, date, defined
    $filter_type = "text";
    * constructs and executes a sql select query against the selected database
    * can take the following parameters:
    * $_REQUEST["orderField"] - the field by which we do the ordering. MUST appear inside $fields.
    * $_REQUEST["orderValue"] - ASC or DESC. If neither, the default value is ASC
    * $_REQUEST["filter"] - the filter value
    * $_REQUEST["pageNum"] - the page index
    * $_REQUEST["pageSize"] - the page size (number of rows to return)
    * if neither pageNum and pageSize appear, we do a full select, no limit
    * returns : an array of the form
    * array (
    *           data => array(
    *                array('field1' => "value1", "field2" => "value2")
    *           metadata => array(
    *                "pageNum" => page_index,
    *                "totalRows" => number_of_rows
    function findAll() {
         global $conn, $filter_field, $filter_type;
          * the list of fields in the table. We need this to check that the sent value for the ordering is indeed correct.
         $fields = array('id','subscriber_id','lastName','firstName','birthdate','gender');
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         $order = "";
         if (@$_REQUEST["orderField"] != "" && in_array(@$_REQUEST["orderField"], $fields)) {
              $order = "ORDER BY " . @$_REQUEST["orderField"] . " " . (in_array(@$_REQUEST["orderDirection"], array("ASC", "DESC")) ? @$_REQUEST["orderDirection"] : "ASC");
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //get the page number, and the page size
         $pageNum = (int)@$_REQUEST["pageNum"];
         $pageSize = (int)@$_REQUEST["pageSize"];
         //calculate the start row for the limit clause
         $start = $pageNum * $pageSize;
         //construct the query, using the where and order condition
         $query_recordset = "SELECT id,subscriber_id,lastName,firstName,birthdate,gender FROM `modelName` $where $order";
         //if we use pagination, add the limit clause
         if ($pageNum >= 0 && $pageSize > 0) {     
              $query_recordset = sprintf("%s LIMIT %d, %d", $query_recordset, $start, $pageSize);
         $recordset = mysql_query($query_recordset, $conn);
         //if we have rows in the table, loop through them and fill the array
         $toret = array();
         while ($row_recordset = mysql_fetch_assoc($recordset)) {
              array_push($toret, $row_recordset);
         //create the standard response structure
         $toret = array(
              "data" => $toret,
              "metadata" => array (
                   "totalRows" => $totalrows,
                   "pageNum" => $pageNum
         return $toret;
    * constructs and executes a sql count query against the selected database
    * can take the following parameters:
    * $_REQUEST["filter"] - the filter value
    * returns : an array of the form
    * array (
    *           data => number_of_rows,
    *           metadata => array()
    function rowCount() {
         global $conn, $filter_field, $filter_type;
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //create the standard response structure
         $toret = array(
              "data" => $totalrows,
              "metadata" => array()
         return $toret;

    Hi there,
    I have a php script that accesses a mySQL database and it was generated out of the Flex Builder wizard automatically. The script works great and there are no problems with it. It allows me to perform CRUD on a table by calling it from my Flex app. and it retrieves all the data and puts it into a nice MXML format.
    My question, currently when I call "findAll" to retrieve all the data in the table, well, it retrieves ALL the rows in the table. That's fine, but my table is starting to grow really large with thousands of rows.
    I want to modify this script so that I can pass a variable into it from Flex so that it only retrieves the rows that match the "$subscriber_id" variable that I pass. In this way the results are not the entire table's data, only the rows that match 'subscriber_id'.
    I know how to pass a variable from Flex into php and the code on the php side to pick it up would look like this:
    $subscriberID = $_POST['subscriberID'];
    Can anyone shed light as to the proper code modification in "findAll" which will take my $subscriberID variable and compare it to the 'subscriber_id' field and then only return those rows that match? I think it has something to do with lines 98 to 101.
    Any help is appreciated.
    <?php
    require_once(dirname(__FILE__) . "/2257safeDBconn.php");
    require_once(dirname(__FILE__) . "/functions.inc.php");
    require_once(dirname(__FILE__) . "/XmlSerializer.class.php");
    * This is the main PHP file that process the HTTP parameters,
    * performs the basic db operations (FIND, INSERT, UPDATE, DELETE)
    * and then serialize the response in an XML format.
    * XmlSerializer uses a PEAR xml parser to generate an xml response.
    * this takes a php array and generates an xml according to the following rules:
    * - the root tag name is called "response"
    * - if the current value is a hash, generate a tagname with the key value, recurse inside
    * - if the current value is an array, generated tags with the default value "row"
    * for example, we have the following array:
    * $arr = array(
    *      "data" => array(
    *           array("id_pol" => 1, "name_pol" => "name 1"),
    *           array("id_pol" => 2, "name_pol" => "name 2")
    *      "metadata" => array(
    *           "pageNum" => 1,
    *           "totalRows" => 345
    * we will get an xml of the following form
    * <?xml version="1.0" encoding="ISO-8859-1"?>
    * <response>
    *   <data>
    *     <row>
    *       <id_pol>1</id_pol>
    *       <name_pol>name 1</name_pol>
    *     </row>
    *     <row>
    *       <id_pol>2</id_pol>
    *       <name_pol>name 2</name_pol>
    *     </row>
    *   </data>
    *   <metadata>
    *     <totalRows>345</totalRows>
    *     <pageNum>1</pageNum>
    *   </metadata>
    * </response>
    * Please notice that the generated server side code does not have any
    * specific authentication mechanism in place.
    * The filter field. This is the only field that we will do filtering after.
    $filter_field = "subscriber_id";
    * we need to escape the value, so we need to know what it is
    * possible values: text, long, int, double, date, defined
    $filter_type = "text";
    * constructs and executes a sql select query against the selected database
    * can take the following parameters:
    * $_REQUEST["orderField"] - the field by which we do the ordering. MUST appear inside $fields.
    * $_REQUEST["orderValue"] - ASC or DESC. If neither, the default value is ASC
    * $_REQUEST["filter"] - the filter value
    * $_REQUEST["pageNum"] - the page index
    * $_REQUEST["pageSize"] - the page size (number of rows to return)
    * if neither pageNum and pageSize appear, we do a full select, no limit
    * returns : an array of the form
    * array (
    *           data => array(
    *                array('field1' => "value1", "field2" => "value2")
    *           metadata => array(
    *                "pageNum" => page_index,
    *                "totalRows" => number_of_rows
    function findAll() {
         global $conn, $filter_field, $filter_type;
          * the list of fields in the table. We need this to check that the sent value for the ordering is indeed correct.
         $fields = array('id','subscriber_id','lastName','firstName','birthdate','gender');
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         $order = "";
         if (@$_REQUEST["orderField"] != "" && in_array(@$_REQUEST["orderField"], $fields)) {
              $order = "ORDER BY " . @$_REQUEST["orderField"] . " " . (in_array(@$_REQUEST["orderDirection"], array("ASC", "DESC")) ? @$_REQUEST["orderDirection"] : "ASC");
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //get the page number, and the page size
         $pageNum = (int)@$_REQUEST["pageNum"];
         $pageSize = (int)@$_REQUEST["pageSize"];
         //calculate the start row for the limit clause
         $start = $pageNum * $pageSize;
         //construct the query, using the where and order condition
         $query_recordset = "SELECT id,subscriber_id,lastName,firstName,birthdate,gender FROM `modelName` $where $order";
         //if we use pagination, add the limit clause
         if ($pageNum >= 0 && $pageSize > 0) {     
              $query_recordset = sprintf("%s LIMIT %d, %d", $query_recordset, $start, $pageSize);
         $recordset = mysql_query($query_recordset, $conn);
         //if we have rows in the table, loop through them and fill the array
         $toret = array();
         while ($row_recordset = mysql_fetch_assoc($recordset)) {
              array_push($toret, $row_recordset);
         //create the standard response structure
         $toret = array(
              "data" => $toret,
              "metadata" => array (
                   "totalRows" => $totalrows,
                   "pageNum" => $pageNum
         return $toret;
    * constructs and executes a sql count query against the selected database
    * can take the following parameters:
    * $_REQUEST["filter"] - the filter value
    * returns : an array of the form
    * array (
    *           data => number_of_rows,
    *           metadata => array()
    function rowCount() {
         global $conn, $filter_field, $filter_type;
         $where = "";
         if (@$_REQUEST['filter'] != "") {
              $where = "WHERE " . $filter_field . " LIKE " . GetSQLValueStringForSelect(@$_REQUEST["filter"], $filter_type);     
         //calculate the number of rows in this table
         $rscount = mysql_query("SELECT count(*) AS cnt FROM `modelName` $where");
         $row_rscount = mysql_fetch_assoc($rscount);
         $totalrows = (int) $row_rscount["cnt"];
         //create the standard response structure
         $toret = array(
              "data" => $totalrows,
              "metadata" => array()
         return $toret;

  • Dynamic Table in PDF - only first row passed to the WD Java

    Hi Experts,
    I'm working with Web Dynpro for Java on WAS 2004s SP13, ADS for SP13 and LiveCycle Designer 7.1
    I am facing a problem related to PDF-dynamic table generation.
    I am creating the PDF form with a dynamic table, an empty row will be added, when ADD button is clicked, the row will be deleted when DELETE button is clicked. After form submit, only first row of the table is passed to the Web Dynpro. I'v tried to use different dataSource Context node structure without results. The structure diescribed in the thread [Dynamic Table -  same data repeating in all rows;  doesnt works for me. The same happend if i try to folow the advise from Wiki https://wiki.sdn.sap.com/wiki/display/WDJava/Creating%20Table%20in%20Interacting%20form%20using%20Web%20Dynpro.
    Beside this,  my DropDown list in the table column is not populated. I know how to populate the DropDown list outside of table. That's working fine. But the DropDown in the table just not respond on the click (is not going open). I'm pretty sure that this is a result of a Context node structure/binding issue. 
    Please suggest me how can i implement dynamic table and populate the data in table dropdown column.
    Edited by: A. Mustacevic on Sep 7, 2009 12:18 AM

    Hi Prabhakar,
    You describe exactly my situation. The node which is bound to the table row has cardinality 1..n. Exactly Context structure is:
    node dataSource (cardinality 1..1/ Singleton true) ======> dataSource of the Interactive Form
    subnode TableList (cardinality 1..1/ Singleton true) ======> bound to the table in the Interactive Form
    subnode TableWrapper (cardinality 1..n/ Singleton true) ======> bound to the table row in the Interactive Form
    subnode TableData (cardinality 0..1/ Singleton false) ======> table data
    attribute 1  ====>     Context nodeattribute bound to the table row field   
    attribute 2
    This structure is recommanded in the post that I found on the Forum (see the firs hyperlink in my firs post).
    Is this structure correct? Why is not working?
    Your link is not working. Can you post the correct one.
    Thanks in advance.
    Regards
    Adnan
    Edited by: A. Mustacevic on Sep 8, 2009 1:56 PM
    Edited by: A. Mustacevic on Sep 8, 2009 1:57 PM
    Edited by: A. Mustacevic on Sep 8, 2009 2:00 PM
    Edited by: A. Mustacevic on Sep 8, 2009 2:01 PM
    Edited by: A. Mustacevic on Sep 8, 2009 2:02 PM

  • How to disable first row selection in a table

    Hi,
    I have three tables which have master child relationship. I need to enable a button for each table based on row selection of corresponding table.But first row is being selected automatically and the buttons are enabled.
    what should i do in order to avoid first row selection in a table.I tried by removing selected Row Keys.But still i am getting the same problem.can anyone suggest on this.
    Thank You,
    Sukumar

    I know a hack but I don't recommend it, anyway here it goes:
    Remove selected Row Keys
    Change selectionListener from the default and create a custom action listener (You can call the default one inside of it) (Tip: use makeCurrent function in this PDF
    This will make sure that there is no selected row highlighted for the first time, but it actually means that the first row is selected, it's just not shown.
    This method is tested with 11.1.1.7

  • Read first row of the internal table

    Dear All,
    Please let me know how to read the first row of the internal table?
    I used following read statement but it is not working
    READ TABLE t_cdhdr INDEX 1.

    Hi,
    i think you are not reading an internal table
    according to your code i think you are reading a type
    which may be declared as types...
    types are declared just for reference
    eg
    types: begin of t_cdhdr .
    include strucuture  cdhdr .
    types: end of t_cdhdr .
    types: t_it_cdhdr type standard table of t_cdhdr.
    data: git_t_cdhdr  type t_it_cdhdr.
    data: gwa_t_cdhdr type t_cdhdr.
    now have to fill the iternal table
    and
    read table git_t_cdhdr into gwa_t_cdhdr index 1.
    reward points if helpful
    thanks & regards,
    venkatesh

  • Infopath submit button only works for the first row in a repeating table‏

    Hi, I have a InfoPath Email submit button issue I could not figure out. I have a master/detail repeating table in my form, and one of fields is "EmailAddress" which shows customer's email address. I created a submit button and put the "EmailAddress"
    field to "TO" object. When I tested it, the submit button only would return the first row of emailaddress from the repeating table, but not the rest of it..
    What I want is when I highlighted a customer, and click the submit button, the current customer's email address would show up in "TO" list. I did some research and saw some suggestions about using current() function. So I put current() in the front,
    like this:
    current()/dfs:dataFields/d:vw_HZLeadLists/@EmailAddress
    Still not working..Just return the first record of emailaddress from master repeating table... Does anyone know what's going on here? Thanks a lot!

    Hello,
    Use double eval to get all rows values. See my reply for more information in below thread:
    eval(eval(EmailAddress, 'concat(ToField, ";")'), "..")
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/cc22aeb7-351f-45a7-8a4c-94132c3e0db2/eval-semicolon-function-issue?forum=sharepointcustomizationprevious
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Only first row of dynamic table saves to pdf

    Please help me with this.  I have a dynamic table in an xdp that can grow by adding rows (called details).  This appears to work in the browser, when I edit.  However, when I save to pdf, only the top row saves.  Any idea why the entire table is not saving to the PDF?  Thanks in advance.

    Yes, I experienced this problem just today. I have a dynamic form created in Live Cycle Designer that has one table with a control that permits the user to expand rows in the table through the Instance Manager. I am assuming that is where my problem is. The table adds/deletes rows effectively, but when I distribute the form, the corresponding response file is created with only fields for one row in this table.
    When you begin collecting responses, if a user submits a completed form with more than one row in the dynamic table, an error message will be generated that the form data doesn't match the response file structure. If you ignore the error and save the reponse, all rows beyond Row 1 will not be saved.
    I have not solved the design/coding issue yet, but I did develop a workaround. I opened the form_distributed.pdf and filled-out a bogus response, filling in as many rows in the dynamic table as I thought the universe of users would create. I then submitted the form. I then opened the submitted response and was prompted by Adobe to save the pdf to the response file. I checked save it to another file, then merely replaced the existing form_responses.pdf that only had 1 set of fields for Row 1. With the save, it now has fields to accept up to the number of rows I added in the bogus submission. I export to a cvs file then edit the field names to avoid duplicate field name issues in subsequent data analysis.
    There clearly must be a better and more eloquent solution.

  • Af:tableselectmany always selects first row and ONLY first row

    My table in jsp:
    <af:table value="#{bindings.AluNoExpeAluM1.collectionModel}" var="row"
    rows="#{bindings.AluNoExpeAluM1.rangeSize}"
    first="#{bindings.AluNoExpeAluM1.rangeStart}"
    emptyText="#{bindings.AluNoExpeAluM1.viewable ? \'No rows yet.\' : \'Access Denied.\'}"
    binding="#{cient20uSeleccionAluBean.tablaMultiple}">
    <af:column sortProperty="Vnumdocu" sortable="false"
    headerText="#{bindings.AluNoExpeAluM1.labels.Vnumdocu}">
    <af:outputText value="#{row.Vnumdocu}"/>
    </af:column>
    <af:column sortProperty="Vapeynombre" sortable="false"
    headerText="#{bindings.AluNoExpeAluM1.labels.Vapeynombre}">
    <af:outputText value="#{row.Vapeynombre}"/>
    </af:column>
    <f:facet name="selection">
    <af:tableSelectMany text="Select items and ..." autoSubmit="true">
    <af:commandButton text="commandButton 1"
    action="#{cient20uSeleccionAluBean.elegirAlumnoAction}"
    partialSubmit="true" immediate="true"/>
    </af:tableSelectMany>
    </f:facet>
    </af:table>
    Table don't have SelectionListener and SelectionState, but the method only select the first row from iterator.
    This method "elegirAlumnoAction":
    public String elegirAlumnoAction() {
    Iterator itRs = this.getTablaMultiple().getSelectionState().getKeySet().iterator();
    while(itRs.hasNext()){
    Key k = (Key) itRs.next();
    System.out.println(k.toString());
    Row r = IteratorUtil.obtenerIteradorPorDefecto(this.ITERADOR_RESULTADO).getRow(k);
    System.out.println(r.getAttribute("Vnumdocu"));
    IteratorUtil.obtenerIteradorPorDefecto(this.ITERADOR_RESULTADO).setCurrentRow(r);
    return null;
    Message was edited by:
    jortri
    Message was edited by:
    jortri

    Maybe the following can help you:
    http://andrejusb.blogspot.com/2007_02_01_archive.html
    http://andrejusb-samples.blogspot.com/2007/02/jdevadf-sample-multi-selection-feature.html

  • Lock the first row in an ordered table

    Hi,
    I have a table (TD_EVENTOS). I want to lock the row with te minimun value of a column (a timestamp called hora_evento) and some requirements of other columns. Then i build a cursor like this:
    CURSOR c is select * from td_eventos where (...) order by hora_evento for update skip locked;
    And then I make a fetch into this cursor and I get the row (locked) that I want. But i need the speedest way, and making that cursor it orders all rown in the table (when I only want the first row without lock) and when that table has 6000 or 7000 rows it wastes around 130 ms. My solution is to add to the WHERE a AND rownum < 50, and it only orders 50 rows (in 10 ms), but it orders 50 aleatory rows, and that`s not what I want.
    Any solution faster?
    Thanks!

    Sorry that wasn't clear of me and could be misleading. I didn't mean Oracle would have to do a full table scan, another access path such as an appropriate index scan would do. I was trying to get across that to do any kind of order or min or max, all records have to be investigated. Since the fact that you don't know a row is locked until you try to lock it, you clearly can't filter on it (it's not a data attribute).
    Apologies for any confusion my earlier post might have caused.
    The suggestion about using a sorted hash cluster still stands though, they are designed for FIFO queues.
    Which reminds me - SKIP LOCKED is in fact undocumented but everybody knows that Oracle use it internally for doing AQ. Since it's undocumented, you don't know how it works, when it will work, when it won't and of course Oracle can turn around and say "we don't support this".

  • Getting the index to the first row of an Internal table

    Hi,
            Assume that i have inserted five rows(fiiling contents for some fields) in an ITAB using Append statement.. Now if i want to fill the content for the remaining field from the first row , then how will i get it back to first row, If i still use Append it starts inserting from the 6th row, Instead of 6th row i want it from first row... Plss Help!!!!!!
    Thanks In Advance,
    Sanu

    lets say itab contains fields as f1,f2,f3,f4.
    one method is :
    LOOP AT itab into is.
      if sy-tabix = 1.
        is-f2 = 'asdasd'.
        is-f3 = 'gggg'.
        is-f4 = 'kjhjk'.
        modify itab from is.
        exit. " to come out of loop.
      endif.   
    ENDLOOP.
    another method is:
    clear is.
    read table itab into is INDEX 1.
    IF sy-subrc = 0.
      is-f2 = 'asdasd'.
        is-f3 = 'gggg'.
        is-f4 = 'kjhjk'.
      MODIFY itab from is INDEX 1. 
    ENDIF.

  • UPDATE of column in parent only UPDATEs first row in DENORMALIZED child table

    In the Repositiry in Designer 6i, I denormalized DESC1 column to
    pull the value of DESC1 in the parent table. The child table has
    four (4) records with matching foreign keys. When I go into my
    Form and update DESC1 in the parent, only the first of the four
    child DESC1's are updated. Any ideas?
    Thanks,
    Dan

    Dan,
    Sorry, known bug, but should be fixed in next release.
    Have a look via metalink at article <Note:156833.1> this
    explains in detail the problem and a fix.
    The bug no was <1974122>
    regards
    David

  • XMLTABLE returns only first row

    I have follwoing XML inserted into the column named as TEXT in the table MASTERTB.
    *<?xml version="1.0" encoding="utf-8" ?>*
    *<Rowsets DateCreated="2010-11-30T11:12:10" EndDate="2010-06-05T16:52:23" StartDate="2010-06-05T16:52:23" Version="12.0.10 Build(18)">*
    *<Rowset>*
    *<Columns>*
    *<Column Description="Material Number" MaxRange="1" MinRange="0" Name="MATERIAL" SQLDataType="1" SourceColumn="MATERIAL"/>*
    *<Column Description="" MaxRange="1" MinRange="0" Name="TANK" SQLDataType="1" SourceColumn="TANK"/>*
    *</Columns>*
    *<Row>*
    *<MATERIAL>1000000144</MATERIAL>*
    *<TANK>T1000</TANK>*
    *</Row>*
    *<Row>*
    *<MATERIAL>2000000008</MATERIAL>*
    *<TANK>T1000</TANK>*
    *</Row>*
    *<Row>*
    *<MATERIAL>2000000009</MATERIAL>*
    *<TANK>T1000</TANK>*
    *</Row>*
    *<Row>*
    *<MATERIAL>2000000016</MATERIAL>*
    *<TANK>T1000</TANK>*
    *</Row>*
    *<Row>*
    *<MATERIAL>3000000036</MATERIAL>*
    *<TANK>T1000</TANK>*
    *</Row>*
    *</Rowset>*
    *</Rowsets>*
    Now, when my requirement is to get all the Material values so when I run follwoing query in Oracle,
    SELECT RW.MATERIAL
    FROM MASTERTB TM,
    XMLTable('//Row' PASSING TM.TEXT
    COLUMNS  "MATERIAL"    CHAR(30) PATH 'MATERIAL') AS RW
    it return only 1000000144 (First MATERIAL). How can I read all the MATERIAL? Also, how can I read the entire XML in Text format if I want to check what has been inserted?
    ANy help will be appreciated !
    Edited by: 967327 on Oct 27, 2012 12:28 AM

    >
    <Rowsets DateCreated="2010-11-30T11:12:10" EndDate="2010-06-05T16:52:23" StartDate="2010-06-05T16:52:23" Version="12.0.10 Build(18)">
    <Rowset>
    </Rowset>
    >
    so where is </Rowsets> ?
    your query works for me
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    SQL>
    SQL> with MASTERTB as
      2  (select
      3  xmltype('<?xml version="1.0" encoding="utf-8" ?>
      4  <Rowsets DateCreated="2010-11-30T11:12:10" EndDate="2010-06-05T16:52:23" StartDate="2010-06-05T16:52:23" Version="12.0.10 Build(18)">
      5  <Rowset>
      6  <Columns>
      7  <Column Description="Material Number" MaxRange="1" MinRange="0" Name="MATERIAL" SQLDataType="1" SourceColumn="MATERIAL"/>
      8  <Column Description="" MaxRange="1" MinRange="0" Name="TANK" SQLDataType="1" SourceColumn="TANK"/>
      9  </Columns>
    10  <Row>
    11  <MATERIAL>1000000144</MATERIAL>
    12  <TANK>T1000</TANK>
    13  </Row>
    14  <Row>
    15  <MATERIAL>2000000008</MATERIAL>
    16  <TANK>T1000</TANK>
    17  </Row>
    18  <Row>
    19  <MATERIAL>2000000009</MATERIAL>
    20  <TANK>T1000</TANK>
    21  </Row>
    22  <Row>
    23  <MATERIAL>2000000016</MATERIAL>
    24  <TANK>T1000</TANK>
    25  </Row>
    26  <Row>
    27  <MATERIAL>3000000036</MATERIAL>
    28  <TANK>T1000</TANK>
    29  </Row>
    30  </Rowset></Rowsets>') TEXT from dual)
    31  SELECT RW.MATERIAL
    32  FROM MASTERTB TM,
    33  XMLTable('//Row' PASSING TM.TEXT
    34  COLUMNS "MATERIAL" CHAR(30) PATH 'MATERIAL') AS RW
    35  /
    MATERIAL
    1000000144
    2000000008
    2000000009
    2000000016
    3000000036
    SQL>
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    SQL>
    SQL> with MASTERTB as
      2  (select
      3  xmltype('<?xml version="1.0" encoding="utf-8" ?>
      4  <Rowsets DateCreated="2010-11-30T11:12:10" EndDate="2010-06-05T16:52:23" StartDate="2010-06-05T16:52:23" Version="12.0.10 Build(18)">
      5  <Rowset>
      6  <Columns>
      7  <Column Description="Material Number" MaxRange="1" MinRange="0" Name="MATERIAL" SQLDataType="1" SourceColumn="MATERIAL"/>
      8  <Column Description="" MaxRange="1" MinRange="0" Name="TANK" SQLDataType="1" SourceColumn="TANK"/>
      9  </Columns>
    10  <Row>
    11  <MATERIAL>1000000144</MATERIAL>
    12  <TANK>T1000</TANK>
    13  </Row>
    14  <Row>
    15  <MATERIAL>2000000008</MATERIAL>
    16  <TANK>T1000</TANK>
    17  </Row>
    18  <Row>
    19  <MATERIAL>2000000009</MATERIAL>
    20  <TANK>T1000</TANK>
    21  </Row>
    22  <Row>
    23  <MATERIAL>2000000016</MATERIAL>
    24  <TANK>T1000</TANK>
    25  </Row>
    26  <Row>
    27  <MATERIAL>3000000036</MATERIAL>
    28  <TANK>T1000</TANK>
    29  </Row>
    30  </Rowset></Rowsets>') TEXT from dual)
    31  SELECT RW.MATERIAL
    32  FROM MASTERTB TM,
    33  XMLTable('//Row' PASSING TM.TEXT
    34  COLUMNS "MATERIAL" CHAR(30) PATH 'MATERIAL') AS RW
    35  /
    MATERIAL
    1000000144
    2000000008
    2000000009
    2000000016
    3000000036
    SQL> try
    31  SELECT RW.MATERIAL
    32  FROM MASTERTB TM,
    33  XMLTable('Rowsets/Rowset/Row' PASSING TM.TEXT
    34  COLUMNS "MATERIAL" varchar2(30) PATH 'MATERIAL') AS RW
    35  /
    MATERIAL
    1000000144
    2000000008
    2000000009
    2000000016
    3000000036
    SQL>

  • First row selected automatically in table

    Hi Experts,
    I have a table displayed in my view, but I found the first line of the table is always selected automatically, how can I change this?
    I don't want any line of the table be selected automatically....
    Please help me on this.
    Thanks for your time!
    Anna

    Hi,
    Check this.
    The node to which u have bind ur table, click on th node.
    go to property part(Bottom of screen)
    Initialization Lead Selection : Uncheck this check box.
    Regards,
    Arvind

  • Problem in GUI_Upload only first field is appending into table

    Hi all,
      I m using code :-
    DATA : BEGIN OF RAWDATA OCCURS 0,
            RECORD type string,
           END OF RAWDATA.
      CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            FILENAME                      = g_file
            FILETYPE                      = 'DAT'
            HAS_FIELD_SEPARATOR           = 'X'
          TABLES
            DATA_TAB                      = RAWDATA
         EXCEPTIONS
           FILE_OPEN_ERROR               = 1
           FILE_READ_ERROR               = 2
           NO_BATCH                      = 3
           GUI_REFUSE_FILETRANSFER       = 4
           INVALID_TYPE                  = 5
           NO_AUTHORITY                  = 6
           UNKNOWN_ERROR                 = 7
           BAD_DATA_FORMAT               = 8
           HEADER_NOT_ALLOWED            = 9
           SEPARATOR_NOT_ALLOWED         = 10
           HEADER_TOO_LONG               = 11
    structure of g_file is like ---
    TEST1     MAT1     2     EA     15.00     1
    TEST2     MAT2     2     EA     20.00     1
    TEST3     MAT1     2     EA     15.00     1
    TEST4     MAT2     2     EA     25.00     1
    TEST5     MAT2     2     EA     30.00     1
    now my problem is in rawdata table record is coming as
    test1
    test2
    but i need it as
    test1mat12EA.......
    Thanks & Regards,
    Ruchi Tiwari

    Hi Ruchi,
    Are you using excel sheet to upload or text file?
    If you are using excel sheet for uplaoding then you can refer to the below code:
    P_FILE                 TYPE FILE_NAME OBLIGATORY.
    lv_FILE = P_FILE.
    ****************** CALL FUNCTION MODULE GUI_UPLOAD******************
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          FILENAME = lv_FILE
          FILETYPE = 'ASC'
        TABLES
          DATA_TAB = it_string.
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    I hope this helps.
    Thanks,
    Archana

  • Excel attachment contains only 1st row of Internal Table.

    Hello,
    I have designed a Vendor Ledger report and want to send the same as an excel attachment. I have made use of function module SO_NEW_DOCUMENT_ATT_SEND_API1 wherein I pass the parameters.
    The program works perfectly fine as I am receiving email along with the excel attachment. Also, the excel attachment opens without any errors. Also, the alignment of columns and data is perfect.
    But the problem is if my internal table is having 10 rows, I get only the first row of  the internal table in the excel sheet.
    I also put a break point just before calling the function module to send email, I could see that the internal table which contains the attachment is having all 10 rows.
    I really don't know what's going wrong in this.
    Request you to please help.
    Regards,
    Danish.

    Hi,
    Hi this is my code. Also, one thing I found that if i remove the Report Name i.e. "Vendor Ledger" , I get more than 1 row in my excel sheet. I feel there is some problem with the document size attributes.
    * Header for exception report
      CONCATENATE 'CC' 'Vendor' 'Stat' 'Name' 'Doc.No' 'FY' 'DDate' 'PDate'
                  'AssNo.' 'Doc.Tp' 'G/L' 'LAmt' 'LCurr' 'DAmt'
                  'D/C' 'Cl.Doc' 'TaxCd' 'TaxAmt'
                  INTO it_attachment SEPARATED BY
                  cl_abap_char_utilities=>horizontal_tab.
      CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO it_attachment.
      APPEND it_attachment.
    * Split Internal table data using horizontal tab.
      CLEAR it_main.
      LOOP AT it_main.
        CLEAR: lc_amt, dc_amt, tax_amt.
        lc_amt = it_main-lc_amount.
        dc_amt = it_main-amt_doccur.
        tax_amt = it_main-w_tax_base.
        CONCATENATE it_main-comp_code
                    it_main-vendor
                    it_main-status
                    it_main-name1
                    it_main-doc_no
                    it_main-fisc_year
                    it_main-doc_date
                    it_main-pstng_date
                    it_main-alloc_nmbr
                    it_main-doc_type
                    it_main-sp_gl_ind
                    lc_amt
                    it_main-loc_currcy
                    dc_amt
                    it_main-db_cr_ind
                    it_main-clr_doc_no
                    it_main-w_tax_code
                    tax_amt
                INTO it_attachment SEPARATED BY
                cl_abap_char_utilities=>horizontal_tab.
        CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO it_attachment.
        APPEND it_attachment.
      ENDLOOP.
    * Create Mail Body and Attachment.
      psubject = 'Vendor Ledger'.
      lv_message = 'Dear Sir/Madam,'.
      APPEND lv_message TO it_message.
      lv_message = ' '.
      APPEND lv_message TO it_message.
      lv_message = 'Attachment contain Vendor Ledger for Testing.'.
      APPEND lv_message TO it_message.
      lv_message = ' '.
      APPEND lv_message TO it_message.
      lv_message = ' '.
      APPEND lv_message TO it_message.
      lv_message = 'This is a System Generated Mail. Please do not reply.'.
      APPEND lv_message TO it_message.
    **Perform for populating mail characteristic info
      CLEAR gd_doc_data.
    * Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      READ TABLE it_attachment INDEX w_cnt.
      gd_doc_data-doc_size = 1.
      gd_doc_data-obj_name  = 'Danish'. "'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    * Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    **Describe the attachment info
      CLEAR it_packing_list.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES  it_packing_list-body_num.
      it_packing_list-doc_type = 'XLS'.
      it_packing_list-obj_name = 'File'.
      it_packing_list-obj_descr = 'File'.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      APPEND it_packing_list.
      REFRESH it_receivers.
      CLEAR it_receivers.
      it_receivers-receiver = 'Email Address'.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      APPEND it_receivers.
    **Function Module to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    Regards,
    Danish.

Maybe you are looking for

  • Flickering - radeon, awesome, xterm

    Hi! I'm setting up Arch on my notebook and I have problems with flickering. The config is very basic - just Xorg, open source Radeon driver and awesome wm. When rearranging xterm windows using awesome they flicker and they are redrawn slowly. It take

  • Grouping of PDF from Archive

    hi, i have a requirement to group a number of PDF from the Archive into a single PDF and send it as an attachment. I want to know the possiblity of grouping multiple PDFs into a single PDF. Thanks in advance, Anoop R.S

  • How to turn over camera-images?

    Except for photo's I can make short film-shoots with my Fuji Finepix camera. When I import the images in Iphoto, it's not possible to turn-over the video-file, different then photo's. When I play the movie in Iphoto, or in Imovie, the video remains i

  • ORA-01762: vopdrv: view query block not in FROM ????

    Hi All any one aware of the error. ORA-01762: vopdrv: view query block not in FROM Please reply back.

  • Error trying to pass one to two diffirent inputtext

    hi i have a situation where i what to pass my username to diffirent inputtext,e.g i got username entered i what to pass it to another table which got username and cratedby <af:inputText simple="true"                         required="#{bindings.Usern