Sap.m.table row, col number of a clicked cell

hi,
I have a sap.m.table with multiple rows and columns, whenever i click into a cell, i want to know its row and column num. How can i do it?
thanks,

Hi Mulugeta
You may have to extend sap.m.Table like this.
Example
-D

Similar Messages

  • View a single table-row as multiple rows in a GridControl

    Hi,
    is it possible to distribute the entries of a single row of a table/RowSetInfo over multiple lines of a GridControl?
    I've seen an example on the Internet (http://www2.gol.com/users/tame/swing/examples/JTableExamples4.html) which does this without database connection but it seems as if it's necessary to replace the default JTable, TableModel and UI by customized ones. As far as I've seen it's not possible to replace the JTable which is used by a GridControl? So is there any other way to do this? (A modification of the JTable-UI itself doesn't suffice as the JTable yields wrong row- and column-numbers on mousclick-events and therefore the components of the second row are not enabled properly).
    Thanks in advance
    null

    |I've seen an example on the Internet |(http://www2.gol.com/users/tame/swing/exampl|es/JTableExamples4.html) which does this |without database connection but it seems as |if it's necessary to replace the default |JTable, TableModel and UI by customized |ones.
    You wont be able to replace the JTable. But you can change all the attributes on the internal table which the grid uses (see getTable() method). The datamodel for the grid is impemented by oracle.dacf.control.swing.GridDataSource. You can possibly extend this class. You can also change the Table column model and the renderers used by the Table.
    |So is there any other way to do this? (A |modification of the JTable-UI itself doesn't |suffice as the JTable yields wrong row- and |column-numbers on mousclick-events and |therefore the components of the second row |are not enabled properly).
    Could you expain how the mapping between cell renderer and the table (row, col) is done in the extended JTable - which class ?.
    (http://www2.gol.com/users/tame/swing/exampl|es/JTableExamples4.html)
    null

  • Get Table Row Count

    hi folks,
    How to get a tables' row count (number of records)?
    Values of table are filled by an RFC return structure. Or how can we get the number of records in the RFC return structure?
    thanks in advance
    nikhil

    Hi,
    Check the size of the node bound to the table
    lets say orders is the node bound to the table
    //Replace orders with the node bound to your table.
    wdContext.nodeOrders().size();
    Regards
    Ayyapparaj

  • Sap.table.table onAfterRendering event breaks the table rows and cols

    Hi guys,
    I am coloring all the rows, which don't have an entry.
    I do that by using the event onAfterRendering from the table control.
    The coloring is working fine, but the rows and cols get broken as u can see on the attached picture.
    By adding a new entry to the table, they get fixed.
    Any ideas how could i fix that?
    I appreciate any help.
    Regars,
    Georgi

    This is because you have overwritten the library code :-)
    please do this.
    <yourControl>.onAfterRendering = function() {
         sap.ui.table.Table.prototype.onAfterRendering.apply(this);
         <your code> ....
    -D

  • Sap.m.Table generating first two blank rows after adding more rows.

    Hi everyone,
                          I am stucked in a very bad condition the problem is with the table rows and columns. I am generating dynamic table columns and rows based on searched unit so whenever i am searching i created a function for initializing the table rows and columns i am looping the array for whatever the size of rows and columns it will display up to 5. My issue is with the request going is adding more times then the required one. So if anyone can check for the solution. Only problem is my data is generated correct but next time i call this method again it is hiding the first 2 rows.
    function initializeGrid() {
        if (SHOPFLOOR_DCS_UNIT_KEY != null) {
            var dcsComboBox = sap.ui.getCore().byId("selectDCSName");
            var dcsName = dcsComboBox.getValue();
            var viewData = {};
            viewData.EntityName = "DataCollectionSetAttribute";
            viewData.Condition = [{ColumnName : "DcsName",Value :dcsName}];
            viewData.Projection = {AttributeName:true,AttributeType:true,Length:true,Precision:true,LowerLimit:true,
                    UpperLimit:true,DefaultValue:true };
            $
            .ajax({
                type : "POST",
                url : "/demo/xsds/designer/SelectByQueryService.xsjs",
                contentType : "application/json",
                data : JSON.stringify(viewData),
                dataType : "json",
                success : function(data) {
                    /*dcDataTable.unbindItems();
                    dcDataTable.removeAllItems();
                    dcDataTable.removeAllColumns();*/
                    var dcsCols = data;
                    if (data != null
                            && data.length > 0) {
                        var firstColumn = [{
                            "AttributeName": "SerialNumber",
                            "ModifiedAttributeName": "SerialNumber"
                        for (var index = 0; dcsCols.length > index; index++) {
                            var currentRow = dcsCols[index];
                            if (currentRow.AttributeName != null
                                    && currentRow.LowerLimit != null
                                    && currentRow.UpperLimit != null) {
                                dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                                + "["
                                    + currentRow.LowerLimit
                                    + " - "
                                    + currentRow.UpperLimit
                                    + ","
                                    + "Def:"
                                    + currentRow.DefaultValue
                                    + "]";
                                firstColumn
                                .push(dcsCols[index]);
                            } else if (currentRow.AttributeName != null) {
                                dcsCols[index].ModifiedAttributeName = currentRow.AttributeName
                                + "["
                                    + "Def:"
                                    + currentRow.DefaultValue
                                    + "]";
                                firstColumn
                                .push(dcsCols[index]);
                            if (currentRow.AttributeType != null
                                    && currentRow.AttributeType == "LocalDate")
                                dateAttributes[dateAttributes.length] = currentRow.AttributeName;
                        dcsCols = firstColumn;
                        runtimeDCS = dcsCols;
                        console.log("dcsCols", dcsCols);
                        var viewData = {};
                        viewData.EntityName = dcsName;
                        viewData.Cmd="GET";
                        viewData.UnitKey=SHOPFLOOR_DCS_UNIT_KEY;
                        $.ajax({
                            type : "POST",
                            url : "/demo/xsds/designer/AddOrRemoveDCSDataService.xsjs",
                            contentType : "application/json",
                            data : JSON.stringify(viewData),
                            dataType : "json",
                            success : function(data) {
                                console.log("dcsVals"+
                                        JSON.stringify(data)+data.length);
                                dcDataTable.removeAllColumns();
                                for (var i = 0; i < data.length; i++) {
                                    for (key in data[i]) {
                                        var textValue = data[i][key];
                                        if (typeof textValue !== "object"
                                                && typeof textValue === "string"
                                                && textValue
                                                .indexOf("/Date(") > -1) {
                                            var startIndex = textValue
                                            .indexOf("(");
                                            var endIndex = textValue.indexOf(")");
                                            var tempValue = textValue.substring(startIndex + 1,endIndex);
                                            var tempDate = new Date(parseInt(tempValue));
                                            data[i][key] = tempDate.toDateString();
                                dcsModel.setData({dcsRows : data});
                                sap.ui.getCore().setModel(dcsModel);
                                var columnList = new sap.m.ColumnListItem();
                                dcDataTable.bindItems({
                                    path: "/dcsRows/",
                                    template: columnList,
                                for (var i = 0; i < dcsCols.length && i<5; i++) {
                                    dcDataTable.addColumn(new sap.m.Column({
                                        header : new sap.m.Label({
                                            text : dcsCols[i].ModifiedAttributeName
                                    columnList.addCell(new sap.m.Text({
                                        text : {
                                            path : dcsCols[i].AttributeName
                                clearItems();
                            },error : function(response) {
                                console.log("Request Failed==>",response);
                                if (response.responseText.indexOf('<html>') == -1)
                                    console.log(JSON.stringify(response.responseText));
                                else
                                    console.log("Invalid Service Name");
                },error : function(response) {
                    console.log("Request Failed==>",response);
                    if (response.responseText.indexOf('<html>') == -1)
                        console.log(JSON.stringify(response.responseText));
                    else
                        console.log("Invalid Service Name");
        else {
            console.log("Data not found!!!");

    No, even with the select box gone the table still doesn't show the last two rows, so this seems indeed be irrelevant to the question.
    Best Regards,
    S.
    ***update***
    I tried to create a simple case in which the same strange behavior occurs but I can't seem to reproduce it. The table that produces the two blank rows is part of a complex application and I tried to extract enough of it for a simple test case that behaves the same way but I can't manage to do that. I guess that once I have the behavior I will also know what causes it.
    It seems that the iterator is set to rangesize 10 but the table rests on rangesize 12, when I looked at other tables in the application it seems that if I want to set the rangesize from 57 to 50, it remains on 57.
    Can anyone help me with either this limited info or otherwise instruct me to get more info ?
    Best Regards,
    S.
    Edited by: matdoya on Dec 1, 2008 5:51 AM

  • Sap.ui.table.Table.addRow(): The control manages the rows aggregation. The method "addRow" cannot be used programmatically!

    Hi there,
    I'm using a sap.ui.table.Table and want to add rows. However, I get the error message stated above in the title of this thread.
    The same happens when adding the rows via XML view by defining the rows aggregation.
    Coding in Table-dbg.js
    * @see JSDoc generated by SAPUI5 control API generator
    sap.ui.table.Table.prototype.addRow = function() {
      jQuery.sap.log.error("The control manages the rows aggregation. The method \"addRow\" cannot be used programmatically!");
    Any ideas?
    Regards
    Tobias

    Hi Tobias,
    A row could be added to the model instead.
    Below post might help.
    Re: Adding 1 row to a table in SAPUI5 with local data(textfields etc...)
    Thanks and Regards, Venkatesh

  • Can we get a cell from sap.m.table i.e. row-column value on Click?

    Hi All,
    we are looking for a requirement where if a user clicks on a particular text(cell) displayed in a table, we should be able to change the color of that text(cell) only.
    Can we achieve this in SAPUI5 ?
    Any help is greatly appreciated

    here is the exact solution which i applied:
    Thanks to Dennis Seah code modification was negligible .
    In onInit() function i placed the method which takes the cell on which the user clicked and stores it in the variable $o (line 26, $o is global variable).
       2. Replace tableID with your table's ID.
    onInit : function() {
    view = this.getView();
    var oTable = view.byId('tableID');
    oTable.onAfterRendering = function() {
    if (sap.m.Table.prototype.onAfterRendering) {
      sap.m.Table.prototype.onAfterRendering.apply(this);
    var tbl = this;
    tbl.selectedCell = null;
    var items = this.getItems();
    for ( var i = 0; i < items.length; i++) {
      var item = items[i];
      var path = item.getBindingContext().getPath();
      var cells = item.getAggregation('cells');
    for ( var j = 0; j < cells.length; j++) {
      var cell = cells[j];
      var $cell = cell.$();
      $cell.attr('path', path);
      $cell.attr('bindName',cell.mBindingInfos.text.parts[0].path);
      var $parent = $cell.parent();
      $parent.css('cursor', 'pointer');
      $parent.click(function() {
      if (tbl.selectedCell) {
           tbl.selectedCell.css('color', '');
      $o = $(this).find('span');
      var obj = tbl.getModel().getProperty($o.attr('path'));
      sap.m.MessageToast.show(obj[$o.attr('bindName')]);
      tbl.selectedCell = $o;
       3. then in changeColor function i use the code to change the color of the cell
    changeColor: function() {
      $o.css('color', 'red');

  • Convert XML to SAP internal table

    Hi gurus,
    My program is suppose to get current exchange rate file from website and upload it in SAP.
    by using FM 'HTTP_GET', im getting the data in XML format.My problem is..i have tried to use transformation but failed to
    map it against XML data element..and i have tried to use CALL FUNCTION 'SCMS_TEXT_TO_XSTRING' and then CALL FUNCTION 'SMUM_XML_PARSE' but it returns initial value with error ''line   0 col  12-unexpected symbol: '>'' .
    Below is an excerpt of my XML file:
    ..<xml version>
    ..<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    .. xmlns:o="urn:schemas-microsoft-com:office:office"
    .. xmlns:x="urn:schemas-    microsoft-com:office:excel"
    .. xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
    .. <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> <WindowHeight>10875</WindowHeight>........ <WindowWidth>13260</WindowWidth><WindowTopX>480</WindowTopX><WindowTopY>30</Wind
    ..  <Style ss:ID="Default" ss:Name="Normal">
    ..  <Alignment ss:Vertical="Bottom"/>
    ..  <Borders/>
    ..  <Font/>
    ..  <Interior/>
    ..  <NumberFormat/>
    ..  <Protection/>
    ..  </Style>
    ..  <Style ss:ID="BoldColumn">
    ..  <Font ss:FontName="Microsoft Sans Serif" x:Family="Swiss" ss:Bold="1"/>
    .. <Worksheet ss:Name="Page1"><Table ss:StyleID="s21"   > <Column   ss:Width="130"/> <Column   ss:Width="85"/> <Column   .. ss:Width="85"/> <Column   ss:Width="85"/> <Column   ss:Widt
    .. Cell><Cell ss:MergeAcross="1" ss:StyleID="BoldColumn"><Data ss:Type="String">Average Buying Rates</Data></Cell><Cell .. ss:MergeDown="1" ss:StyleID="BoldColumn"><Data ss:Type="Stri
    .. ss:Type="Number">47.3732</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Number">47.5374</Data></Cell><Cell .. ss:StyleID="Decimal"><Data ss:Type="Number">48.2323</Data></Ce
    .. "  ><Data ss:Type="String">HONG KONG</Data></Cell><Cell ss:StyleID="StringLiteralCenter"  ><Data .. .. ss:Type="String">HKD</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Numb
    .. ss:Type="Number">22.8131</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Number">23.2595</Data></Cell>.. .. </Row><Row><Cell ss:StyleID="StringLiteral"  ><Data ss:Type="String"
    .. ss:StyleID="StringLiteralCenter"  ><Data ss:Type="String">IDR</Data></Cell><Cell ss:StyleID="Decimal"><Data .. ss:Type="Number">3.0395</Data></Cell><Cell ss:StyleID="Decimal"><Data
    .. ecimal"><Data ss:Type="Number">30.6424</Data></Cell></Row><Row><Cell ss:StyleID="StringLiteral"  ><Data .. ss:Type="String">AUSTRALIA</Data></Cell><Cell ss:StyleID="StringLiteralCe
    .. ell ss:StyleID="Decimal"><Data ss:Type="Number">0.3392</Data></Cell><Cell ss:StyleID="Decimal"><Data .. ss:Type="Number">0.3409</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Typ
    .. StringLiteral"  ><Data ss:Type="String">DENMARK</Data></Cell><Cell ss:StyleID="StringLiteralCenter"  ><Data .. ss:Type="String">DKK</Data></Cell><Cell ss:StyleID="Decimal"><Data ss
    .. ata ss:Type="Number">4.4550</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Number">4.6073</Data></Cell>.. </Row><Row></Row><Row></Row><Row><Cell ss:MergeAcross="4" ss:Style
    .. s of   23 November 2010</Data></Cell></Row><Row></Row><Row><Cell ss:MergeAcross="4" .. ss:StyleID="BoldColumn_Left" ><Data ss:Type="String">2. Foreign Exchange Rates (THOMSON REUTE
    ..  ><Data ss:Type="String">ZAR</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Number">4.2735</Data></Cell>.. <Cell ss:StyleID="Decimal"><Data ss:Type="Number">4.3125</Data></
    .. ="Decimal"><Data ss:Type="Number">106.5459</Data></Cell><Cell ss:StyleID="Decimal"><Data .. ss:Type="Number">107.5164</Data></Cell></Row><Row><Cell ss:StyleID="StringLiteral"  ><Da
    .. a></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Number">4.6916</Data></Cell></Row><Row><Cell .. ss:StyleID="StringLiteral"  ><Data ss:Type="String">BANGLADESH</Data></Cell><Cell
    .. r">0.0074</Data></Cell></Row><Row><Cell ss:StyleID="StringLiteral"  ><Data ss:Type="String">KENYA</Data></Cell><Cell .. ss:StyleID="StringLiteralCenter"  ><Data ss:Type="String">KE
    .. ><Cell ss:StyleID="StringLiteral"  ><Data ss:Type="String">VIET NAM</Data></Cell><Cell ss:StyleID="StringLiteralCenter"  >.. <Data ss:Type="String">VND</Data></Cell><Cell ss:StyleI
    .. A</Data></Cell><Cell ss:StyleID="StringLiteralCenter"  ><Data ss:Type="String">LKR</Data></Cell><Cell .. .. ss:StyleID="Decimal"><Data ss:Type="Number">0.2686</Data></Cell><Cell ss:St
    .. String">OMR</Data></Cell><Cell ss:StyleID="Decimal"><Data ss:Type="Number">77.7094</Data></Cell><Cell
    Please help me to translate my XML file into SAP format...i need it fixed urgently..
    Edited by: Guest101 on Dec 28, 2010 12:11 PM

    It has 2 part one is source code and another is the XML file
    create an XML file with the data provided in the last 2.
    then place it in a path mention the path in the below source.
    1. Complete code for converting XML to internal table in SAP.
    *& Report  ZTST_PGM02
    REPORT  ZTST_PGM02.
    Load iXML Lib.
    type-pools: ixml.
    class cl_ixml definition load.
    data: G_IXML type ref to if_ixml.
    data: STREAMFACTORY type ref to if_ixml_stream_factory.
    data: ISTREAM type ref to if_ixml_istream.
    data: DOCUMENT type ref to if_ixml_document.
    data: PARSER type ref to if_ixml_parser.
    data: LV_FILE_URL type rlgrap-filename.
    You should provide the parameter for file name
    LV_FILE_URL = 'D:\navps\input_xml.xml'.
    types: begin of XML_LINE,
            DATA(256) type x,
          end of XML_LINE.
    types: begin of TY_HEADER,
             CUST_NAME(20)     type c,
             CARD_NO(20)       type c,
             TAX_AMOUNT(10)    type c,
             TOTAL_AMOUNT(10)  type c,
           end of TY_HEADER.
    types: begin of TY_ITEM,
             ITEM_NO(4)      type n,
             ITEM_ID(20)     type c,
             ITEM_TITLE(50)  type c,
             ITEM_QTY(10)    type c,
             ITEM_UPRICE(10) type c,
           end of TY_ITEM.
    data: GV_HEADER type TY_HEADER.
    data: GT_ITEM   type standard table of TY_ITEM  with header line.
    data: XML_TABLE      type table of XML_LINE,
          XML_TABLE_SIZE type i.
    The next step is creating the main factory for the iXML library:
    G_IXML = cl_ixml=>create( ).
    Now Create Stream Factory
    STREAMFACTORY = G_IXML->create_stream_factory( ).
    upload a file from the client's workstation
    call function 'WS_UPLOAD'
         exporting
              filename   = LV_FILE_URL
              filetype   = 'BIN'
         importing
              filelength = XML_TABLE_SIZE
         tables
              data_tab   = XML_TABLE
         exceptions
              others     = 11.
    wrap the table containing the file into a stream
    ISTREAM = STREAMFACTORY->create_istream_itable( table = XML_TABLE
                                                    size  = XML_TABLE_SIZE )
    Get the file data as Stream
    *istream = streamfactory->create_istream_uri( public_id = lv_file_url
                                                system_id = lv_file_url ).
    Create XML Document instance
    DOCUMENT = G_IXML->create_document( ).
    Create parser Object
    PARSER = G_IXML->create_parser( stream_factory = STREAMFACTORY
                                    ISTREAM = istream
                                    DOCUMENT = document ).
    Parse an XML document into a DOM tree
    *parser->parse( ).
    Parsing Error Processing
    if PARSER->parse( ) ne 0.
      if PARSER->num_errors( ) ne 0.
        data: PARSEERROR type ref to if_ixml_parse_error,
              STR        type STRING,
              I          type i,
              COUNT      type I,
              INDEX      type i.
        COUNT = PARSER->num_errors( ).
        write: COUNT, ' parse errors have occured:'.
        INDEX = 0.
        while INDEX < COUNT.
          PARSEERROR = PARSER->get_error( INDEX = index ).
          I = PARSEERROR->get_line( ).
          write: 'line: ', i.
          I = PARSEERROR->get_column( ).
          write: 'column: ', i.
          STR = PARSEERROR->get_reason( ).
          write: STR.
          INDEX = index + 1.
        endwhile.
      endif.
    endif.
    Close the stream since it #s not needed anymore
    call method ISTREAM->close( ).
    clear ISTREAM.
    Now try to make it look good
    data : lv_size     type sytabix,
            lv_ret_code type sysubrc.
    data: lo_xml_document type ref to cl_xml_document.
    field-symbols: <fs_xml_data> type any table.
    lo_xml_document = document.
    call method lo_xml_document->get_as_table
       importing
         table   = <fs_xml_data>
         size    = lv_size
         retcode = lv_ret_code
    *data: items type ref to if_ixml_node_collection.
    *items = document->get_elements_by_tag_name( name = 'Item' ).
    *data: iterator type ref to if_ixml_node_iterator,
         node     type ref to if_ixml_node.
    *iterator = document->create_iterator( ).
    *node = iterator->get_next( ).
    *while not node is initial.
    do something with the node
    node = iterator->get_next( ).
    *endwhile.
    DATA : GV_NODE type ref to if_ixml_node.
    DATA : GV_NODETEXT type STRING.
    data:  GV_FIRST_TIME.
    GV_FIRST_TIME = 'X'.
    GV_NODE = DOCUMENT.
    GT_ITEM-item_no = 1.
    perform GET_DATA tables     GT_ITEM
                     using      GV_NODE
                     changing   GV_HEADER.
    Last item is still not added.
      append GT_ITEM.
    write  : GV_HEADER-cust_name,
             GV_HEADER-card_no,
             GV_HEADER-tax_amount,
             GV_HEADER-total_amount.
    loop at GT_ITEM.
      write  /:.
      write  : GT_ITEM-item_no,
               GT_ITEM-item_id,
               GT_ITEM-item_title,
               GT_ITEM-item_qty,
               GT_ITEM-item_uprice.
    endloop.
          FORM Get_data                                                 *
    form get_data tables   YT_ITEM    structure GT_ITEM
                  using value(x_node) type ref to if_ixml_node
                  changing Y_HEADER   type TY_HEADER.
      data: INDENT      type i.
      data: PTEXT       type ref to if_ixml_text.
      data: STRING      type string.
      data: TEMP_STRING(100).
      case X_NODE->get_type( ).
        when if_ixml_node=>co_node_element.
          STRING = X_NODE->get_name( ).
          GV_NODETEXT = STRING.
        when if_ixml_node=>co_node_text.
          PTEXT ?= X_NODE->query_interface( IXML_IID_TEXT ).
          if PTEXT->ws_only( ) is initial.
            STRING = X_NODE->get_value( ).
            case GV_NODETEXT.
              when 'Customer'.
                clear GV_HEADER.
              when 'Name'.
                move STRING to GV_HEADER-cust_name.
              when 'Cardnum'.
                move STRING to GV_HEADER-card_no.
              when 'Tax'.
                move STRING to GV_HEADER-tax_amount.
              when 'Total'.
                move STRING to GV_HEADER-total_amount.
            Iteam details
              when 'ID'.
                move STRING to GT_ITEM-item_id.
              when 'Title'.
                move STRING to TEMP_STRING.
                move TEMP_STRING to GT_ITEM-item_title.
              when 'Quantity'.
                move STRING to GT_ITEM-item_qty.
              when 'UnitPrice'.
                move STRING to GT_ITEM-item_uprice.
            endcase.
          endif.
      endcase.
      if GV_NODETEXT = 'Customer'.
        clear GV_HEADER.
      elseif GV_NODETEXT = 'Item'.
        if GV_FIRST_TIME ne 'X'.
           append GT_ITEM.
         clear : gt_item.
           GT_ITEM-item_no = gt_item-item_no + 1.
        endif.
        GV_FIRST_TIME = ' '.
      endif.
    Get the next child
      X_NODE = x_node->get_first_child( ).
    Recurse
      while not X_NODE is initial.
        perform GET_DATA tables     GT_ITEM
                         using      X_NODE
                         changing   GV_HEADER.
        X_NODE = x_node->get_next( ).
      endwhile.
    endform.
    Create an XML file with the following DATA given below and place it in the path mentioned above source code.
    2. XML File DATA. You create an XML File in this format to test the same.
      <?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
    - <Order>
    - <Customer>
      <Name>Bill Buckram</Name>
      <Cardnum>234 234 234 234</Cardnum>
      </Customer>
    - <Manifest>
    - <Item>
      <ID>209</ID>
      <Title>Duke: A Biography of the Java Evangelist</Title>
      <Quantity>1</Quantity>
      <UnitPrice>$10.75</UnitPrice>
      </Item>
    - <Item>
      <ID>208</ID>
      <Title>100% Pure: Making Cross Platform Deployment a Reality</Title>
      <Quantity>1</Quantity>
      <UnitPrice>$10.75</UnitPrice>
      </Item>
    - <Item>
      <ID>204</ID>
      <Title>Making the Transition from C++ to the Java(tm) Language</Title>
      <Quantity>1</Quantity>
      <UnitPrice>$10.75</UnitPrice>
      </Item>
    - <Item>
      <ID>202</ID>
      <Title>Web Servers for Fun and Profit</Title>
      <Quantity>1</Quantity>
      <UnitPrice>$10.75</UnitPrice>
      </Item>
    - <Item>
      <ID>210</ID>
      <Title>I Think Not: Dukes Likeness to the Federation Insignia</Title>
      <Quantity>1</Quantity>
      <UnitPrice>$10.75</UnitPrice>
      </Item>
      </Manifest>
    - <Receipt>
      <Subtotal>$53.75</Subtotal>
      <Tax>$4.43</Tax>
      <Total>$58.18</Total>
      </Receipt>
      </Order>

  • Populate drop-down list in table row or repeating subform

    I am currently working on an Adobe Interactive Form integrated with web dynpro ABAP.  I would like to create a table or repeating subform with a number of drop-down lists populated from SAP.
    I am using the Enumerated Drop-down list from the WebDynproNative menu.  In my WDDOINIT method, I am populating the attributes using the set_attribute_value_set method.  This is working fine when my dropdown is not in a table or repeating subform.  The dropdown is populated and the selected value is returned to SAP when submitting the form.  However, when I place the dropdown in a table row or a repeating subform, the dropdown is not populated.
    Any ideas or suggestions?

    Hi There,
    I am facing problem in Dropdown lists in Subforms.
    I want the region dropdown list values according to country (only for DE) dropdown list value. Both Dropdown lists are in a Subform.
    For that, I have used this in EXIT event of Country Dropdown list:
    if (this.rawValue == "DE Deutschland")
    data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Schleswig-Holstein","1");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hamburg","2");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Niedersachsen","3);
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bremen","4");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Nordrhein-Westfalen","5");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Hessen","6");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Rheinland-Pfalz","7");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Baden-Württemberg","8");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Bayern","9");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Saarland","10");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Berlin","11");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Brandenburg","12");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Mecklenburg-Vorpomme","13");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen","14");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Sachsen-Anhalt","15");
    data.Item.IT_ITEM.DATA.ZZ_REGION.addItem("Thüringen","16");
    else
    data.Item.IT_ITEM.DATA.ZZ_REGION.clearItems();
    It does only change first region dropdownlist value, not others because both dropdown lists are in a Subform.
    Other problem is that it works only when All Country Dropdown lists are "DE". Means, first region dropdown list depends upon not only first country dropdown but also other dropdown.
    My requirement is, If first country Dropdown is "DE", only first Region Dropdown list should be fill, not others. And so on.
    Please provide solution that How can I change all dropdown lists of a Subform dynamically?
    Waiting for reply.
    Thank you
    Chandler Bing

  • Excel data transfer into SAP internal table with GUI_UPLOAD

    hi all,
      i m using SRM4 system and i wanted to develop one report which will upload data from excel and convert it into IT.
    i know that many threads are posted on this topic.
    but my requirement is slight different. in the system only one function module is available that is "GUI_UPLOAD" and we want that user shd not save file as tab delimited before calling this fm. instead, program shd take care of all these things...
    please suggest something asap..
    helpful ans will be rewarded..
    thanks,
    jigs.

    Dear Jigs,
    Please go though the following lines of code:
    D A T A D E C L A R A T I O N *
    TABLES: ANEP,
    BKPF.
    TYPES: BEGIN OF TY_TABDATA,
    MANDT LIKE SY-MANDT, " Client
    ZSLNUM LIKE ZSHIFTDEPN-ZSLNUM, " Serial Number
    ZASSET LIKE ZSHIFTDEPN-ZASSET, " Original asset that was transferred
    ZYEAR LIKE ZSHIFTDEPN-ZYEAR, " Fiscal Year
    ZPERIOD LIKE ZSHIFTDEPN-ZPERIOD, " Fiscal Period
    ZSHIFT1 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 1
    ZSHIFT2 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 2
    ZSHIFT3 LIKE ZSHIFTDEPN-ZSHIFT1, " Shift No. 3
    END OF TY_TABDATA.
    Declaration of the Internal Table with Header Line comprising of the uploaded data.
    DATA: BEGIN OF IT_FILE_UPLOAD OCCURS 0.
    INCLUDE STRUCTURE ALSMEX_TABLINE. " Rows for Table with Excel Data
    DATA: END OF IT_FILE_UPLOAD.
    S E L E C T I O N - S C R E E N *
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME,
    BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN: END OF BLOCK B2,
    END OF BLOCK B1.
    E V E N T : AT S E L E C T I O N - S C R E E N *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    PROGRAM_NAME = SYST-REPID
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    STATIC = 'X'
    MASK = '.'
    CHANGING
    FILE_NAME = P_FNAME
    EXCEPTIONS
    MASK_TOO_LONG = 1
    OTHERS = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Upload Excel file into Internal Table.
    PERFORM UPLOAD_EXCEL_FILE.
    Organize the uploaded data into another Internal Table.
    PERFORM ORGANIZE_UPLOADED_DATA.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    *& Form UPLOAD_EXCEL_FILE
    text
    --> p1 text
    <-- p2 text
    FORM UPLOAD_EXCEL_FILE .
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
    FILENAME = P_FNAME
    I_BEGIN_COL = 1
    I_BEGIN_ROW = 3
    I_END_COL = 7
    I_END_ROW = 32000
    TABLES
    INTERN = IT_FILE_UPLOAD
    EXCEPTIONS
    INCONSISTENT_PARAMETERS = 1
    UPLOAD_OLE = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. " UPLOAD_EXCEL_FILE
    *& Form ORGANIZE_UPLOADED_DATA
    text
    --> p1 text
    <-- p2 text
    FORM ORGANIZE_UPLOADED_DATA .
    SORT IT_FILE_UPLOAD BY ROW
    COL.
    LOOP AT IT_FILE_UPLOAD.
    CASE IT_FILE_UPLOAD-COL.
    WHEN 1.
    WA_TABDATA-ZSLNUM = IT_FILE_UPLOAD-VALUE.
    WHEN 2.
    WA_TABDATA-ZASSET = IT_FILE_UPLOAD-VALUE.
    WHEN 3.
    WA_TABDATA-ZYEAR = IT_FILE_UPLOAD-VALUE.
    WHEN 4.
    WA_TABDATA-ZPERIOD = IT_FILE_UPLOAD-VALUE.
    WHEN 5.
    WA_TABDATA-ZSHIFT1 = IT_FILE_UPLOAD-VALUE.
    WHEN 6.
    WA_TABDATA-ZSHIFT2 = IT_FILE_UPLOAD-VALUE.
    WHEN 7.
    WA_TABDATA-ZSHIFT3 = IT_FILE_UPLOAD-VALUE.
    ENDCASE.
    AT END OF ROW.
    WA_TABDATA-MANDT = SY-MANDT.
    APPEND WA_TABDATA TO IT_TABDATA.
    CLEAR: WA_TABDATA.
    ENDAT.
    ENDLOOP.
    ENDFORM. " ORGANIZE_UPLOADED_DATA
    In the subroutine --> ORGANIZE_UPLOADED_DATA, data are organized as per the structure declared above.
    Regards,
    Abir
    Don't forget to award points *

  • Count table rows UI5 , XML view

    Hello,
    I want to count ( find the number of rows in a table , or in my model ) .
    I have a model ( json ) and i apply this model to a table. I tried to find how many rows I have in my table but i couldn't.
    Can you help me ? 
    The view ( xml ) looks like this :
    <Table id="doc_table"
        inset="false"
        items="{
          path: '/Documents',
          sorter: {
            path: 'Document_Id'
        >
        <headerToolbar>
          <Toolbar>
            <Label text="Products"></Label>
          </Toolbar>
        </headerToolbar>
        <columns>
          <Column
            width="12em">
            <Label text="Document_id" />
          </Column>
          <Column
            minScreenWidth="Tablet"
            demandPopin="true">
            <Label text="Partner_id" />
          </Column>
          <Column
            minScreenWidth="Tablet"
            demandPopin="true"
            hAlign="Right">
            <Label text="PolicyNr" />
          </Column>
          <Column
            minScreenWidth="Tablet"
            demandPopin="true"
            hAlign="Center">
            <Label text="RepvalDescr" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="RepvalType" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="Reportbeg" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="Reportend" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="Repval" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="Repdate" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="DueDate" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="Currency" />
          </Column>
          <Column
            hAlign="Right">
            <Label text="Submit" />
          </Column>
        </columns>
        <items>
          <ColumnListItem>
            <cells>
              <Text
                text="{Document_Id}" />
              <Text
                text="{Partner_Id}" />
              <Text
                text="{PolicyNr}" />
              <Text
                text="{RepvalDescr}"/>
              <Text
              text="{RepvalType}" />
              <Text
                text="{Reportbeg}" />
              <Text
                text="{Reportend}" />
              <Text
                text="{Repval}" />
              <Text
                text="{Repdate}"/>
              <Text
              text="{DueDate}" />
              <Text
                text="{Currency}"/>
              <Text
              text="{Submit}" />
            </cells>
          </ColumnListItem>
        </items>
      </Table>
    and in the controller ( .js ) i tried a lot of things , none with good results :
    var rowsd = view.getElementById("doc_table").getElementsByTagName("tbody")[0].getElementsByTagName("tr").length;
    var rows = this.getView().byId("doc_table").getElementsByTagName("tbody").length;
    table.getBinding("items").filter(oFilter).length;
    I tried all that i found ,,, but nothing works .
    Thank you !

    i tried to do this but in browser , in inspect element i get : Cannot read property 'length' of undefined
    my code :
    var table = new sap.ui.table.Table();
      table = this.getView().byId("doc_table");
      var oModel = new sap.ui.model.json.JSONModel("model/mock.json");
         table.setModel(oModel);
         var count =oModel.getProperty("/Documents").length;

  • Opening a new view in a new window on click of a table row entry.

    Hi Guys,
    How to open a new View of a same application in a new window (just like a pop up) on a click of a Table Row entry?
    I am using NWDS 7.0 version. So please suggest acccorrdingly.

    Hi Nikesh,
    first of all you will have to declare use of onLeadSelect event handler for your table (note that it will only be triggered when a lead selection occurs not a multiselection).
    Also, you can build at design time a View and a Window (for example, PopupWin) in your WebDynpro Component, and embed the view into the window.
    In your code for onLeadSelect function, you can use something like this to pop up the window.
    public void onActionRowSelection(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSeleccionTabla(ServerEvent)
        IWDWindowManager windowManager = wdComponentAPI.getWindowManager();
        IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("PopupWin");
        IWDWindow window = windowManager.createModalWindow(windowInfo);
        window.setWindowPosition(WDWindowPos.CENTER);
        window.setWindowSize(new WDCssSize(450, WDWindowUnitOfLength.PX) , WDCssSize.UNDEFINED);
        // Store handle ti window in context attribute to able to close it later
        wdContext.currentContextElement().setPopup(window);
        window.show();
        //@@end
    Hope it helps,
    David

  • Pl/sql table - row type records

    Hi,
    Is there any limit on the number of records that a pl/sql table (row type) can accomodate.Iam using oracle 10g

    user11200499 wrote:
    I have gone thru that url, nothing on the maximum number of records that can be present in pl/sql table is given there. Will be very helpful if you can let me know if there is any such limitation.There is no such thing as a PL/SQL "+table+". A table, in Oracle terminology, means colums and rows and indexes and the ability to scale data, effectively read and process and filter and aggregate data.
    A so-called PL/SQL "+table+" is nothing at all like this.
    The correct term for it, and used in all other programming languages, are arrays (procedural term) and collections (object orientated term).
    An array/collection is a local memory structure in the unit of code. In PL/SQL, that means PGA (process global area) memory. And as this uses server memory, you should not abuse it and only use as much that is truly needed.
    Make a PL/SQL array/collection too large, and PGA grows.. and can have a very negative impact on performance. It can even cause the server to crawl to halt, where you will struggle to enter a commandline command on the server as it is spending 99% of CPU time trying to deal with memory requests and page swapping.
    So what do we then use arrays/collections for in PL/SQL?
    For the very same reason we use in any other programming language - dealing with managing local programming data in a more effective memory structure. Such as bulk processing when requiring a buffer variable that can be passed to and from the PL and SQL engines.
    This does NOT mean using it as you would use it as if it is a SQL table. As it is not.
    So to answer your question of how large a PL/SQL array or collection can be? That depends entirely on the problem you are trying to solve. If it is for example bulk processing, then typically a collection of a 100 rows provides the best balance between the amount of (expensive) PGA memory being used versus the increase in performance by reducing context switching between the PL and SQL engines.
    If the rows are quite small, perhaps even a 1,000 row collection. More than that seldom decreases context switching enough to justify the increase in expensive PGA.
    So what should then be used to store larger data structures in PL/SQL? GTT or Global Temporary Tables. As this is a proper SQL table structure. Can be indexed. Natively supports SQL. Can scale with data volumes.
    And most importantly, it does not consume dedicated process memory and will not blow server memory.

  • SAP MM table for MRP

    Dear Expert,
    I have question about SAP MM table.
    I have material with MRP type is PD and lot size is EX, let say this material is X.
    Then i create reservation from WO using material X. In MD04, we will see there is requirement for material X under that WO. Stock does not exist than MRP Run will create PR to fulfill this requirement.
    But we do not know, this PR was trigeer by what WO.
    I want to ask all of you, is there table for SAP to save this mapping.
    So we can surely thougt that this PR came from this WO.
    I just trying to trace, i found MDRS, but in this table, i am not found the PR number with specific.
    Please let me know, if you have information
    Appreciate for your help and Thank you
    Regards,
    Silvia

    Hi Silvia,
    In MD04, click on the PR & click on pegging info, you will be able to see which WO is calling this PR.
    If you want to check for a lot of materials at a given time, then create a Z report & call the FM -> MD_PEGGING_NO_DIALOG
    But note that the same PR / planned order can be pegged to many requirements depending on the MRP parameters maintained in the MRP views.
    Hope the above answers your query.
    Regards,
    Vivek

  • How do I set an id to a table row in a report region?

    How do I assign an id to a table row in a report region? I am trying to uniquely identify a row in the result set. What I want to do is have the report region render an id for each tr tag i.e.
    <tr id='1'>...</tr>
    <tr id='2'>...</tr>
    <tr id='3'>...</tr>
    Thanks,
    Boyan

    Hello,
    In the Before Each Row attribute of the report template you are using add something like this.
    &lt;tr id="row_#ROWNUM#">ID's in HTML should never start with a number it won't break anything but it's wrong that's why I put row_ first
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

Maybe you are looking for

  • Does EJBInit come with WL9.0?

    When I go to use EJBInit from the command-line after having run the setWLEnv.cmd for Weblogic 9.0, which I just installed...it throws a NoClass DefFoundException...I exploded weblogic.jar that came with the 9.0 installation and EJBInit is nowhere to

  • How can I read pdf documents?

    I am new to a Mac and I cannnot read any pdf attachments on websites which is very fustrating. I go on Safari to view a site and click on a newsletter or attachment but cannot read the pdf. Why is this?

  • How to Display Mutiple CostCentre Hierarchies in the Report

    Hi Team, As we have multiple Hierarchy groups defined in R/3 for Cost Centres, I would like reflect he CC values in the CC report where it is showing the default Hierarchy (only) whereas others are appearing in NotAssigned, is there a way to handle t

  • Ship To address changed in SO, is it updated in Delivery?

    Sales order is created, delivery is created. Then in VA02, in sales order header level, Tab Partners, ShipTo Street/House No. is changed. Does this change go through to the delivery automatically? Please help, Typewriter

  • Studying "programming in AS3" questions

    Hi, Looking at the code below, I presume KeyCode and ENTER are both values (or should I say property?) of the Keyboard class.   Bear with me, I'm new at learning AS3.  So far, I find it easier than learning Flash itself, but still I want to make sure