Table rows

hi
is there a function which get table name and return the numbers of rows in it ?
(i dont want to use SELEC COUNT(*)  FROM XXXX  )
THANKS

You can use the Function module :   DMC_COUNT_TABLE_ENTRIES
Pass the table name  and the IM_Exact_count = 'X'
you will get the number of entries in a table.

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

  • 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

  • How to pass hidden field values on a click of a table row

    hi all,
    href = "bookAndNonBook.do"
    I am very new to struts. I have created a table using displaytable tag which displays results in a tabular format. In addtion, i have a hidden field (prodType), the table rows are getting highlighted when i get my mouse on a particular row.
    Following is the code from the results.jsp file
    <body
    onload="addRowHandlers('row', 'rowMouseOver')"
    bgcolor="#FFFFFF" text="#000000" leftmargin="100" topmargin="50"
    marginwidth="" marginheight="" rightmargin="30">
    <html:form action="/bookAndNonBook" method="post">
    <display:table name="sessionScope.productSearchList" id="row"
    sort="list" export="true" defaultsort="1" defaultorder="ascending"
    pagesize="15" decorator="org.displaytag.decorator.TotalTableDecorator"
    class="dataTable">
    <display:column property="prodType" title="ProdType" class="prodType"
    headerClass="prodType" media="html" />
    <display:column title="Title" property="titleName" sortable="true"
    class="title" headerClass="title" />
    </display:table>
    </html:form>
    </BODY>
    I am calling a funtion addRowHandlers which passes the table id (which is row) and the rowMouseover for highlighting the rows on mouse over.
    the code for function addRowHandlers is
    function addRowHandlers(tableId, rowClassName) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
    rows.onmouseover = function () {
    previousClass = this.className;
    this.className = this.className + " " + rowClassName ;
    this.style.cursor="hand";
    rows.onmouseout = function () {
    this.className = previousClass;
    this.style.cursor='';
    rows.onclick = function (){
    var cell = this.getElementsByTagName("td")[0];
    var ProdType = cell.innerHTML;
    alert("value of prodType = " + ProdType);
    when i run the above code and click on a particular row it returns me the value in the hidden field i.e. prodType for that particular row
    Now where i am having problem is i want that on the basis of prodType my jsp file should call different actions for different prodType as returned....somwhat a function like this
    function submitProduct(prodType) {
    if(prodType == "BK")
    resultsForm.action = "/bookProduct.do";
    else if(prodType == "NB")
    resultsForm.action = "/nonbookProduct.do";
    but i am unable to figure out that how do i this..
    Any help will be really appreciated
    Thanks
    Sam

    can you please suggest some good struts forums where i can post my question
    thanks in advance
    Sam

  • Table.rows.find() returns null in a table where the row exists.

    Hi...
    I am working in a Project in Visual Studio 2013 where I have to read an Excel report related with a list of business opportunities. Some of the Fields that are involved in it are:  Opportunity ID, BU, Account, close date, Account Manager,
    Total Value and so on. As soon as I get the conection with the Excel Report, I fill a DataTable and declare the columns [Opportunity ID] and [BU] as my Primary Keys.  In that way, an Opportunity value may have one o more rows
    with different BU code each of them.  In consequence, you can define one row in the table if you specify the [Opportunity ID] and the [BU] values.
    My problem starts when I try to get information of those rows that have an specific value of [Opportunity ID]. For that situation I make a "foreach" structure where I check the BU codes that are involved with that Opportunity. So
    I use the Find() Method to get the information of the row specified by the Opportunity ID and BU.  The first time it goes to find the information it gets the results successfully but in the next cycle changing just the [BU] using the same [Opportunity
    ID] value, the find() method returns a "null" and I do not know why because I am sure that the row exists in the table.  I have verified the "Unique" property for the  [Opportunity ID] and [BU] columns (which are
    my primary keys)  and they are in false which is OK.
    I share the code that I am using...
    Hope someone can help.
    Thanks.
    Alfmar.
    void ObtenTotalesxBUs(string Opportunity, string[] BUs, Object[] TotalBUs, Object[] ExpTotalBUs)
    ArrayList TotalesBUs = new ArrayList(); //Required information from the row.
    ArrayList ExpTotalesBUs = new ArrayList(); //Required information from the row.
    foreach(string businessUnit in BUs)
    Object[] LlaveBusqueda = { Opportunity, businessUnit }; //Provide values to the Primary Keys.
    DataRow RenglonInfo = null;
    RenglonInfo = TablaFunnel.Tabla.Rows.Find(LlaveBusqueda); //Find method receives the Primary Keys values. Here is where I have a "null" in return the second time changing just the [BU] field.
    TotalesBUs.Add(RenglonInfo["Total"]); //Get the required information from the row.
    ExpTotalesBUs.Add(RenglonInfo["Expected Total Value"]); //Get the required information from the row.
    TotalBUs = TotalesBUs.ToArray();
    ExpTotalBUs = ExpTotalesBUs.ToArray();}

    Hi Viorel..
    Thanks a lot for you help.
    I am absolutely sure that the second ítem of BU is valid and exist in the table because I tried to make a "Select" statement in the table providing the values of [Opportunity ID] and [BU] and I get the expected record. So, why is not
    working using Find() with the defined Primary Keys??? 
    I tried this in order to test that the record exists...
    if(RenglonInfo == null)
    string strSelect = "[Opportunity ID] = '0000218256' AND [BU] = 'SFW'";
    RenglonInfo2 = TablaFunnel.Tabla.Select(strSelect);

  • Check for empty table row before adding date

    On the form below, when I click the green + button (far right), a new table row is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text the user enters is deleted and new today's date added because it is in the intialize event. How do I script to check and make sure each dated row is empty before adding today's date?
    https://acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw
    Thanks,
    ~Don

    Hi Don,
    One option would be to use the caption area of the textfield for the date and leave the value portion free for the user to input their data:
    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.
    Hope that helps,
    Niall

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

  • Report Generation Toolkit Table Row Height-MS Word

    I am having trouble setting the table row height in the report generation toolkit. I can set the column width fine, but the row height seems to remain the same no matter what I set it to. I have attached the VI that generates and formats the table, and the printout it is resulting in. I have also attached the template file I am using.
    Any tips to get this to work right? I am trying to make the cells exactly the same height as the text inside. 
    Solved!
    Go to Solution.
    Attachments:
    AddMarkersToReport.vi ‏20 KB
    badFormatting.pdf ‏179 KB
    splitter.docx ‏13 KB

    Hi,
    So I tried .2  and it didn't work.  So I went to Word to manually change it, and it did not work either.  There is a selection box in word, for the table properties, that seems to default to the value "at least".  When I changed this manually to "exactly" in word, no problem with the .2 manually in Word.
    Hopefully this can be set within the template, for all new inserted tables.  I'm not sure the report generator VI's expose this property.  Well, this is a start for the issue.
    Edit ****
    You can go into the add table VI and expose the property.  See pic.   However, you have to decide if you want to "upgrade" this VI permanently to expose this property or make a copy with the property exposed.   I haven't messed with the new class reports too much, so not sure of the ins and outs with this.
    I think this is the issue with the row size becoming smaller.
    Mark Ramsdale

  • Smartforms  how to print Table rows on to the next page automatically

    if this question is answered pls point to the the link
    SMART forms:
    layout :  Half of my A4 page is filled with templates, a small portion is footer, the middle portion is Table.
    Note: i have set the condition for the footer as (tick the check box) "only after end of main window"
    Output:
                       the template is displayed the table is populated on the first page, no footer on 1st page,
                    on page 2 the table rows are printed (table rows were a lot) and finally footer got printed every thing as per normal
    what i want is:
                     instead of the table lines printed in the middle of page 2 (bcz my main window table is in the middle, top is templates)
                     i want the table lines (after filling the main window table lines in the 1st page) to continue to print from the
                     top of the page on page 2 and immediately after the table rows finish. footer must be printed....
    what should i be doing to get this output

    dear bob,
    yes i have done that already as u said, when i do it......
    i created a new page (next page) directed first page to next page
    on the next page my layout is like below
    removed all the templates dragged the main window to the top of the page...... 
    when i check the result, there is an empty line as the first line in the table (2nd page)
    and also the footer (again a template) on the first page, which is ticked as ( print after end of main window) is NOT displaying.

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • How to create editable tablecells for a single table row dynamically?

    Hi
    How to make the cell of a tablerow editable based on flag in backing list object bound to row? I can't decide the editable property while creating table columns. So i can't use setCellFactory() during creation. However setCellFactory() makes all cells in table column editable.How to make non-editable table row cell editable and vice-versa based on flag?

    hi
    good
    if you want to create two different view for a same table than you cant give the same name for the same view,otherwise it would allow you to create the view.Try out with different view name as well as the function group name,i hope this ll work.
    thanks
    mrutyun^

  • Calling a Smart Form on Click of a Table Row..

    Hi All,
    I have one requirement.
    I have developed one applicaiton, in which from R3, the values are coming in form of a table. Now, on Click of a Table row, it should call a smart form developed in R3 for that selected row attribute. Also the smart form should open in a new window, so that user can take a print of it.
    How to add this new view and how to get the selected Row value ?
    Please help me.

    Hi,
    To open the new window, I have added blow code:
    IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("InfoPopup");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
    window.open();
    but, getting error message as : IWDWindowInfo cannot be resolved
    what should be the import parameter? Also please tell me how to search for the Import parameters for the respected attribute/code?
    Please help.

  • How to access Table rows in ADOBE form

    Hello Experts,
    I want to access the Table rows which are getting populated by WDA context, in form JavaScript when the table is populated.
    on the basis of few cell values i want to disable and enable particular cells in table rows when the table is rendered to the user.
    Please provide your inputs and suggestion on how to write a java script for it and in which event  i should write the script.
    i searched SDN and found couple of blogs and threads and tried using them but not working.
    Thanks,
    Siddharth

    Hello All,
    thanks for your suggestions.
    after some research and  trial and error i found the solution:here is the sample code for those who might face this issue.
    SUPERNODE(Root Node)
        --SUBFM(SUBFORM)
    MYNODE( Table)
    DATA(Table ROW)
    ADD       (Table COLUMNS)
    DELETE   (Table COLUMNS)
    var data1;
    var norows = xfa.resolveNodes("SUPERNODE.SUBFM.MYNODE.DATA[*]").length;
    for ( var i =0; i < norows; i++)
         if( xfa.resolveNode("SUPERNODE.SUBFM.MYNODE.DATA["i"].DELETE").rawValue == "")
        xfa.resolveNode("SUPERNODE.SUBFM.MYNODE.DATA["i"].DELETE").access = "readOnly";
        if( xfa.resolveNode("SUPERNODE.SUBFM.MYNODE.DATA["i"].ADD").rawValue != "")
        xfa.resolveNode("SUPERNODE.SUBFM.MYNODE.DATA["i"].ADD").access = "readOnly";

  • 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

  • How can I export table row in internet explorer?

    I need to export a single table row on a website and I can't figure out how to do it.  The source view for the row I need is:
    tr class="alt">
    <td id="16ZwhxLjCN8fafA8wuYEnMFtGJGrFy6qcE">16ZwhxLjCN8fafA8wuYEnMFtGJGrFy6qcE</td>
    <td></td>
    <td></td>
    <td>0.00065227</td>
    <td>0.01233629</td>
    <td>0.00371003</td>
    </tr>I can get the table ID using the code below, but I don't know how to get the rest of the values. The table ID does not change but the numerical values do.$ie = New-Object -com InternetExplorer.Application
    $ie.silent = $false
    $ie.navigate2("mywebsite.com")
    $ie.Document.getElementById("16ZwhxLjCN8fafA8wuYEnMFtGJGrFy6qcE")

    Hi Tom,
    this may not be quite the perfect solution, but it works for me at least. I'm not using the IE ComObject, but rather the .NET Webclient for it ...
    # Load downloader function
    function Get-WebContent
    <#
    .SYNOPSIS
    Downloads a file
    .DESCRIPTION
    Download any file using a valid weblink and either store it locally or return its content
    .PARAMETER webLink
    The full link to the file (Example: "http://www.example.com/files/examplefile.dat"). Adds "http://" if webLink starts with "www".
    .PARAMETER destination
    The target where you want to store the file, including the filename (Example: "C:\Example\examplefile.dat"). Folder needs not exist but path must be valid. Optional.
    .PARAMETER getContent
    Switch that controls whether the function returns the file content.
    .EXAMPLE
    Get-WebContent -webLink "http://www.technet.com" -destination "C:\Example\technet.html"
    This will download the technet website and store it as a html file to the target location
    .EXAMPLE
    Get-WebContent -webLink "www.technet.com" -getContent
    This will download the technet website and return its content (as a string)
    #>
    Param(
    [Parameter(Mandatory=$true,Position="0")]
    [Alias('from')]
    [string]
    $WebLink,
    [Parameter(Position="1")]
    [Alias('to')]
    [string]
    $Destination,
    [Alias('grab')]
    [switch]
    $GetContent
    # Correct WebLink for typical errors
    if ($webLink.StartsWith("www") -or $webLink.StartsWith("WWW")){$webLink = "http://" + $webLink}
    $webclient = New-Object Net.Webclient
    $file = $webclient.DownloadString($webLink)
    if ($destination -ne "")
    try {Set-Content -Path $destination -Value $file -Force}
    catch {}
    if ($getContent){return $file}
    # Download website
    $website = Get-WebContent -WebLink "http://www.mywebsite.com" -GetContent
    # Cut away everything before the relevant part
    $string = $website.SubString($website.IndexOf('<td id="16ZwhxLjCN8fafA8wuYEnMFtGJGrFy6qcE">'))
    # Cut away everything after the row
    $string = $string.SubString(0,$string.IndexOf('</tr>'))
    # Split the string into each individual line
    $lines = $string.Split("`n")
    # Prepareing result variable
    $results = @()
    # For each line, cut away the clutter
    foreach ($line in $lines)
    $temp = $line.SubString(4,($line.length - 10))
    # for the first line, the td has an id, which this compensates for
    if ($temp -like 'id="16ZwhxLjCN8fafA8wuYEnMFtGJGrFy6qcE">*'){$temp = $temp.SubString(($temp.IndexOf(">") + 1))}
    # Add cleaned line to results
    $results += $temp
    You may need to adapt the string parsing beneath the function, if the text you posted is not literally identical to the way this function returns it. It worked for a string block acquired via copy&paste from your post anyway. :)
    I certainly would be more than happy to read a more elegant version, if someone has one to offer.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Button in a table row to get value of a column.

    Hello,
    I am following [this thread|Re: Problem with getting table element's table row] to get the value of a column up on button click (the button is in the same row).
    Here is the code in wdDoModify ()
    if (firstTime)
              IWDButton button = (IWDButton) view.getElement("TableCellEditor");
              button.mappingOfOnAction().addSourceMapping("ScheduledCourses", "row");
    Here is the code in the button action()
    public void onActionRegisterStudent(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.gfc.hr.training.wdp.IPrivateCourseRegistrationCompView.IScheduledCoursesElement row )
        //@@begin onActionRegisterStudent(ServerEvent)
         wdContext.nodeScheduledCourses().setLeadSelection(row.index());
        //@@end
    The context node for the table is "ScheduledCourses"
    When I click the button, I get an exception....
    com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Parameter ScheduledCourses not found

    Hi Srinivas,
    Assuming you have a node 'ScheduledCourses' with two attributes 'courseId' and 'courseName' and you want to display the 'courseName' on click of the button placed in a particular row of the table, please try the following (Most of them you have already done, if i am not wrong. I am listing the entire steps so that you can check whether you have missed any thing). 
    1. Place a Table UI element and bind the datatsource property to the node 'ScheduledCourses'
    2. Insert a new column in the table and for the column insert a table cell editor and select 'Button' from the list.
    3. select the button(table cell editor) and create an action for the button. While creating an action create a parameter with name 'courseElement' and type as IPrivate<ViewName>.IScheduledCoursesElement (Interface representing element of ScheduledCourses node)
    3. In wdDoModifyView() write the following code
        if(firstTime){
             IWDButton button=(IWDButton)view.getElement("Button1");
             button.mappingOfOnAction().addSourceMapping("nodeElement","courseElement");
    Here "Button1" is the id of the button inserted in the table column. The string "nodeElement" should be written as such and "courseElement" is the name of the parameter which we have created for the action of the button.
    4. Now in the action created for the button try to print the courseName as shown
    wdComponentAPI.getMessageManager().reportSuccess(courseElement.getCourseName());
    Regards,
    Shabeer

Maybe you are looking for