Unable to get the row count of supplier site for each supplier

Hi,
In the sourcing module, suppliers page is having an advanced table in which there is a field 'supplier' and another filed 'supplier sites' (supplier field is of type picklist).Now, how can i get the count of 'supplier sites' for each supplier???

Hi sumit,
Thanks for the reply, can u please help in writing the code to loop through the VO...
I was trying to get the first row and then finding the count of supplier sites, but in each iteration of for loop(for each row) i am getting the same count value for each and every row...
Code :
int j=vo.getrowcount();//count of no. of rows
for (int i=0;i<j;i++)
row=(xxVORowImpl)rowsetiterator.getRowAtRangeIndex(1);
int a=am.getSupplierSitesVO.getRowCount();//this is the view object in the pick list
oapagecontext.writeDiagnostics(this,"value of   a is :"+a,1);
this code is giving row count of last row of supplier.
How to get the count for each and every row of supplier sites ?
Thanks.

Similar Messages

  • How to get the row Count of a ResultSet

    How to get the row Count of a ResultSet

    Hi
    I'v tried rennie1's way ,but I only get zero,my code is:
    rs.executeQuery("select count(*) from t_test");
    if (rs.next()) int rowCount=rs.getInt(1);
    I also tried barni's way ,but the method rs.last() and rs.beforeFirst() throw a same Exception
    I tried another way,the code is:
    while rs.next(){
    // Do nothing ,just move the cursour to the last row
    int rowCount=rs.getRow()
    However,the rowCount still equal zero
    Any help would be greatly apprecite!
    note:
    I get connection by DataSource's JNDI name from client, the Server is Weblogic Server 6, the DBMS is Oracle.

  • How to get the row count of a Table DATA?

    Hi,
      In my Adobe form layout, I have a Table node which is bound to an internal table. Now at runtime, I want to determine the number of rows that the internal table has, i.e the row count of the DATA node of the Table. How will I be able to determine the no. of rows of the internal table at runtime using Javascript? I am not being able to find any suitable answer in this forum. Please suggest. Thanks in advance.

    Hi,
    If you bind the interactive form table to the internal table and specify some properties, the table will vary its row size according to the number of data available in the internal table.
    You have to wrap the table in a sub form,  check 'allow page break with contents' and property 'flowed'.
    the table will automatically increase its row size...
    Is this the reason for which you wanted for the row count..?
    If so, this will help you..
    Regards.
    Surya

  • How could i get the kernel and user cpu usage for each process

    Hi all,
    In order to monitor the system CPU usage, I would like write a script to gather the kernel and user CPU usage for each process, like the prstat or top does. As always missing the shortlived kernel usage, prstat or top cann't get the precise CPU usage. I checked with the dtrace syscall, proc and fbt provider, but don't get which one is useful.
    Please provide your comments and suggestion.
    Thanks in adv

    mail2sleepy wrote:
    As I've studied the "dtrace" for a while, and seems Sun gives a pretty high score on this new feature.....I do want to know whether there's some probe can work for it, like writing a "dtrace" version prstat.You can write a prstat without dtrace. Because that's just polling at specific intervals and reading some process structures from /proc. You could have dtrace fire a probe every 5 seconds and read the same thing, but it wouldn't really be using any features of dtrace. Trhying to write it "in dtrace" doesn't make much sense.
    What you could do that would be harder via other methods is to fire a probe at process exit that displayed the process information including total CPU time. They could print exactly when processes exited. Doing that without dtrace would be very difficult.
    Darren

  • Get the Excel file creatoin Date through For Each Loop each excel file in SSIS

    I had  For Each Loop
    in Collection Path had 2 files it had Creation date of 25/01/2014
    So I want Update in Table that date as File_Receive_Date column
    How Can I do ??
    in variable I am using VFile_FULL_Name(=Filename with Path by attach to Foreach loop collection&connection manager)
    which other System Variable to use in SSIS  ??
    I have created vRef_Date  but in Expression =====??? what should I do through only SSIS ??
    Thanks
    Madhu

    The easiest approach is https://filepropertiestask.codeplex.com/ can capture the file creation date, but it is not working for all SSIS versions
    I recommend using .net FILE IO libraries to get the created date which needs to be done in a Script Task.
    The ForLoop approach will not let you achieve this goal.
    Arthur
    MyBlog
    Twitter

  • Get the record count

    The Query below is part of a huge query. The snipet is just the part that I need to make a change.
    For the query below, how can I get the recordcount in the select inside the case statement? I want to only output the r_text when the record count of the select is zero (0) else make the output to r_text null
    select
    distinct a.style_id, b.sty, b.season, a.cust, a.ad_d, b.code,
    (case when b.code = 'MAKE' then
    (select min(t.value) from sn.age r, sn.text t
    where r.t_id = '18' and r.name = 'MTGNSL'
         and r.t_id = t.t_id
         and r.name = t.name and r.text_id = t.text_id
         and r.id_1 = a.id
    ) end) r_text,
    (case when b.code is null then 'Blank Code'
    when b.code = 'MAKE' then 'MAKE' end) err
         

    If you are not using a scrollable result set then the following is the best way to do it.
    there are several key words in SQL that can be used, the one you are interested in is count();
    so if your query at the moment is
    "select col1, col2, col3 from my_table where col2=? and col3=?"you can work out how many rows will be returned by executing this command first
    "select count(col1) from my_table where col2=? and col3=?"this will return a result set with one row and one column, you can get the row count as follows:
    ResultSet rs = ps.executeQuery();
    int rowCount = rs.getInt(1);I hope this helps :)

  • Get the record count from a query

    Hi,
    does anyone know how to get the record count from a sql query?
    e.g: I've got a ResultSet from the Statement.excuteQuery(), and I want to know how many records this ResultSet contains, how to get this?
    I'd read thoughout the documents of Statement and ResultSet, but couldn't find a solution, do I have to use another seperate query such as "select count(*)" to do this?
    thanks.
    Yang Liu

    If you are not using a scrollable result set then the following is the best way to do it.
    there are several key words in SQL that can be used, the one you are interested in is count();
    so if your query at the moment is
    "select col1, col2, col3 from my_table where col2=? and col3=?"you can work out how many rows will be returned by executing this command first
    "select count(col1) from my_table where col2=? and col3=?"this will return a result set with one row and one column, you can get the row count as follows:
    ResultSet rs = ps.executeQuery();
    int rowCount = rs.getInt(1);I hope this helps :)

  • How can you get the Row at the mouse pointer??

    I got a JTable displaying info. I want to get the Index of the Row I click on.
    I can getX(), getY() with a MouseListener, but I am unable to get the row index related to these coordinates.
    Thanks!
    Olivier

    Sorry.
    That's ridiculous. I just found the rowAtPoint(Point point) method in JTable.
    Solved!!

  • How to get the rows from a table having some column has any letter

    Hi All,
    suppose i have a table having columns id(number), code(varchar).
    code has alphanumeric characters (ex. ABC123, 67B56 etc).
    some codes are only numbers (2344, 7898 etc).
    how can i get the rows which have alphabets in the code.
    ex:
    id code
    1 AB45
    2 456
    3 890
    4 67B7
    how can i write a query such that it should give me the ids 1 and 4 (as they have alphabets in code)
    thanks in advance to all

    Thanks to one and all.
    i am gettig my required output.
    But i have a doubt in the operator.
    If i add or remove '[]' in the operator, i am getting different ouputs.
    There is a count difference in the result of the operators used.
    REGEXP_LIKE(<column>,'[[:lower:]]')
    REGEXP_LIKE(<column>,'[[[:lower:]]]')
    REGEXP_LIKE(<column>,'[:lower:]')
    Can anybody please explain what is the difference in using '[]', in the operator?
    What is the correct syntax, whether i have to use two '[]'s or one '[]'.
    Also, can i use REGEXP_LIKE() in oracle 8i version.( I am unable to use the operator in 8i)?
    Any query to get the required output in 8i version?
    Thanks in advance to all.

  • How to add the Row count(number of rows in table)  in  the table header?

    Hi,
    I'm having a table. This table is viewed when i click on a search button.
    <b>On the table header it should dynamically display the number of rows in the table, i.e., the row count.</b>
    How to do this? could any one explain me with the detailed procedure to achieve this.
    Thanks & Regards,
    Suresh

    If you want to show a localized text in the table header, you should use the <b>Message Pool</b> to create a (parameterized) message "tableHeaderText" like "There are table entries".
    Next, create a context attribute "tableHeaderText" of type "string" and bind the "text" property of the table header Caption UI element to this attribute.
    Whenever the table data has changed (e.g. at the end of the supply function for the table's data source node), update the header text:
    int numRows = wdContext.node<TableDataSourceNode>().size();
    String text = wdComponentAPI.getTextAccessor().getText
      IMessage<ComponentName>.TABLE_HEADER_TEXT,
      new Object[] { String.valueOf(numRows) }
    wdContext.currentContextElement().setTableHeaderText(text);
    Maybe you want to provide a separate message for the case that there are no entries.
    Alternatively, you can make the attribute calculated and return the header text in the attribute getter.
    Armin

  • Unable to get the Text proerty of Range class

    Hi,
    I am using the Text property of Range class for excel template development using VSTO.While reloading the template i am getting the error "Unable to get the Text proerty of Range class".If i skip this line of code,i am getting similar kind of errors while accessing the properties of Range class(like Range.copy() ,Range.Locked, Range.EntireRow.Hidden).In all these cases i am getting the similar kind of error "unable to get the property of Range Class".
    Waiting for a quick response...
    Thanks in advance..

    Hi Besse,
    Actully, the error is coming when i try to populate datatable with the the range values in one of the sheet.
    I am using the below code.
    //"wsInteropMetadata"  is the sheet object.
    //"RangeName" is the range name in the sheet.
    rngConfig = wsInteropMetadata.get_Range("RangeName", Type.Missing);
    for (int iRow = 1; iRow <= iRowCnt; iRow++)
        dRNew = dTMetadataTable.NewRow();
        for (int iCol = 1; iCol <= iColCnt; iCol++)
          rngCell = (Excel.Range)rngConfig.Cells[iRow, iCol];
          dRNew[iCol - 1] = rngCell.Text.ToString();
       dTMetadataTable.Rows.Add(dRNew);
    In the first load of the template,this code is working fine.In the reload i am getting the error at "rngCell.Text".If i see in quickwatch,most of the properties of  "rngCell" object are throwing "System.Runtime.InteropServices.COMException".See the below exception information.
     Exception Information
     Exception Type: System.Runtime.InteropServices.COMException
    Message: Unable to get the Text property of the Range class
    Source: Microsoft Office Excel
    ErrorCode: -2146827284
    Thanks
    Krishna.

  • Localization in OBIEE 10g(Error "start row is set higher than the row count

    Hi All,
    I m Working on Localization.
    I have used exteranize string and saved excel file and added language column and inserted data en and fr and loaded the file into the database.
    then i have created 2 variables
    one is for weblanguage SELECT 'VALUEOF(NQ_SESSION.WEBLANGUAGE)' FROM DUAL
    second is SELECT SESSION_VARIABLE, TRANSLATION FROM TAB_EXTERNAL WHERE LANGUAGE = 'VALUEOF(NQ_SESSION.LOCALE)' when i click on Test for the second variable it showing error
    "start row is set higher than the row count"
    i have seleted start row =10 and show some 10.then also it is showing same error.
    Please send me the solution ASAP.
    Thanks and Regards
    Kiran Kumar

    Hi Kiran,
    I am working in OBIEE localization. I created two variables and when press test i am getting vaules successfully. But in OBIEE application i am getting columns in english only. It seems there is some problem with values in DUAL table. It contains only 1 column called 'DUMMY' and value as 'X'.
    Please give me complete configuration steps to setup localization OBIEE 10g. Please drop me a mail to [email protected] if u have steps. I will call u if u provide contact number.

  • How to get  visible row  count  in JTable ?

    I have one table which is added to one scroll pane. For example my table have total 1000 rows, but at a time only 20 rows should be visible to the scroll pane. And I want to scroll the rows and show only 20 at a time.When user scrolls JTable then next time he can view only 1 to 21, then 2 to 22, and so on. I want to know how to get that number which represents the visible row( in this case it is 20).So kindly help me how to get visible row count. Any help regarding this will be appriciated.
    Thanks and Regards,
    Sheetal

    how to get visible row count.First you need to get the viewport used by the scrollpane. Then you can use methods like getViewPosition() and getViewSize() to get information about the current postition of and size of the viewport.
    Then you can use the table method getRowAtPoint(). to determine the first and last visible row which can then be used to calculate the visible row count.
    When user scrolls JTable then next time he can view only 1 to 21, then 2 to 22, and so onThis is the default behaviour when a "block" scroll is done.
    However when you click on the arrow button on the scrollbar it will only scroll a single row. You could override the getScrollableUnitIncrement() method to return the value from the getScrollableBlockIncrement() method.
    However the user can still drag the scrollbar manually which would cause a problem. So you would also need to remove the MouseMotionListeners from the scrollbar to prevent this.

  • JTextPane + Getting a row count..

    Hi,
    I've been looking for a solution to this, but can't find one already in the forum. there are some close .. but this is my problem..
    I'm looking to get the current row count of a JTextPane... I'm not looking to get the count of '\n'.... I want to take the wrapping into account .. so if I resize the JTextPane, the row counts will change accordingly.
    The reason I'm looking for this information is so I can set the size on the JTextPane so that it always shows the data.. but when it only has one line, I only want it to take up space for one line (the reason for this is I don't want vertical scrollbars appearing where they're not needed)
    I hope I have given enough information for someone to help me out..
    Thanks :)
    /Balmark

    Unfortunately WrappedPlainView's methods and inner classes are private so we can't access it normal way.
    This is an example of hack access to WrappedPlainView. In some cases it can throw access violation exception.
    best regards
    Stas
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.text.*;
    import java.lang.reflect.*;
    public class Test {
    JScrollPane scroll;
    JTextArea textArea=new JTextArea();
    public Test() throws Exception {
    JFrame frame=new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    textArea.setLineWrap(true);
    textArea.setText("12345 67890 12345 67890 12345 67890\n 12345 67890 12345 67890 12345 67890");
    scroll=new JScrollPane(textArea);
    frame.getContentPane().add(scroll);
    JButton b=new JButton("print line count");
    frame.getContentPane().add(b,BorderLayout.SOUTH);
    b.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.err.println(textArea.getUI().getRootView(textArea).getView(0).getViewCount());
    WrappedPlainView pv=(WrappedPlainView)textArea.getUI().getRootView(textArea).getView(0);
    int lineCount=0;
    for(int i=0; i<pv.getViewCount(); i++) {
    View pvLine=pv.getView(i);
    try {
    Class cl=pvLine.getClass();
    Field f=cl.getDeclaredField("nlines");
    f.setAccessible(true);
    lineCount+=f.getInt(pvLine);
    /* Method methodLineCount=cl.getDeclaredMethod("calculateLineCount",null);
    methodLineCount.setAccessible(true);
    Object result=methodLineCount.invoke(pvLine,null);
    System.err.println("Line count="+result.toString());*/
    catch (Exception ex) {
    ex.printStackTrace();
    System.err.println("Line count="+lineCount);
    frame.setSize(200,200);
    frame.setLocationRelativeTo(null);
    frame.show();
    public static void main(String[] args) throws Exception {
    new Test();
    }

  • RowDisclosureListener af:table - Getting the Row in the Listener Method

    Hi,
    I am bit new to the adf. I have a requirement and it is as below.
    (1) I am using only ADF faces, Not with Business Components. All values/ list comes from a ManagedBean
    (2) I am displaying List of Employees in an <af:table>
    (3) I have something as detailStamp
    (4) For Some reason I have do some business logic (set some flag in the EmployeeBean) whenever it is Disclosed / selected
    (5) One portion of it is done and that is when the row is selected.
    (6) I dont know how to get the Row bean (Employee Bean) when it is disclosed
    Any Ideas how to do that?
    The code which I wrote to get the Employee Bean when it is selected (selectionListener) is as below and I want to do that in my RowDisclosureListener
    //This Works fine//
    public void messageSelectionListener(SelectionEvent selectionEvent) {
    System.out.println("Entering messageSelectionListener : " + selectionEvent.getComponent().getClientId());
    // set the selected message flag
    if (((Employee)getSearchResultTable().getSelectedRowData()).isSelectedForView()) {
    ((Employee)getSearchResultTable().getSelectedRowData()).setSelectedForView(false);
    TableUtils.closeRow(selectionEvent);
    } else {
    ((Employee)getSearchResultTable().getSelectedRowData()).setSelectedForView(true);
    TableUtils.discloseRow(selectionEvent);
    // update table in UI
    refreshTable();
    //How to do it in RowDisclosureListener
    public void messageDisclosureListener(RowDisclosureEvent rowDisclosureEvent) {
    System.out.println("Entering messageDisclosureListener: " + rowDisclosureEvent.getComponent().getClientId());
    RichTable table = (RichTable)rowDisclosureEvent.getSource();
    //How to get the Employee Bean here?
    refreshTable();
    Thanks in Advance.

    Krishna,
    You code did the trick. But how does M_TABLES gets updated with the record count?
    Wouldn't it be advisable to get the record count from the table itself rather than M_TABLES?
    Thanks.

Maybe you are looking for

  • Adobe Application Support folder missing files

    When I start up my Photoshop CS5.1 on my Mac I get an Adobe Photoshop Screen that says "One or more files in the Adobe application Support folder, necessary for running Photoshop, are missing.  Please run the Photoshop installer and re-install Photos

  • How do I permanantly apply audio noise reduction in FCP X

    I have a clip shot on a blue screen set that had some noise in the background (constant hum from air conditioner). The Background Noise Reduction in FCP X, applied at 100%, does a truly amazing job. But there is one huge problem. It appears that FCP

  • Anyone using Miglia Mini TV?

    Just installed successfully, but I can't open the Macintosh HD icon - anyone else experienced this problem?

  • Apple Maps - Singapore - no Yelp integration?

    Hi Community, Any idea on the following? Apple Maps is advertised to show Yelp content when searching the map. For me, this does not work here in Singapore. E.g. I am searching for restaurant A, but there is no search result in Apple Maps. Then I go

  • Selection screen value use as a header SQ01

    Can anybody please tell me how to pick the values from the selection screen and use them as a header in SAP Query sq01