Sum of UDF Rows in same UDF Last Row

Hi,
I have created a UDF in the Marketing Documents - Rows as a Price field. The requirement is:
I enter, suppose, three prices one after the other in the Column till the third row. In the fourth Row, I want the sum of the previous three rows to be displayed on pressing Shift + F2. Can any one help me with the query for formatted search please?
Regards
Sudatt

Hi Kevin,
You got that almost right. But the FMS is not on a different UDF, but the same UDF.
Example:
ROW No                  Value     
1                                100           
2                                200           
3                                300           
4                                400           
5                                500            
                                1500         (This value will come from FMS with a Shift + F2)
Regards
Sudatt

Similar Messages

  • Sum of Table column contents into a last row with respect to column

    In a WebDynpro for java application,
      Need to sum up all the table with respect to column, at the last Row of the table with respect to column.
    Only one table should be present for contents as well for the total.
    Please help me.
    Edited by: devender vadithyabadabath on Jan 12, 2008 11:54 AM

    Hi,
    you must add e last element at the end of you Nodeelements.
    I<yourNode>Node node1 = wdContext.node<;yourNode>;
    I<yourNode>Element element = node1.create<;yourNode>element.;
    Iterate over the your node element to build your sum of each and than add this sum to the last row of your table.
    element.set<;yourAttribute>(sum);
    node1.addElement(element);
    I hope this helps
    regards
    Gunter

  • How to auto scroll a table to last row when using Active Data Service?  11g

    Hi all,
    Has anyone got any experience with the ADF Active Data Service?
    I am using an af:table in combination with the ADF Active Data Service and I want the table to scroll to the latest row when new data arrives.
    It is basically a simple setup:
    The value attribute of my table points to a bean that extends CollectionModel and implements ActiveDataModel. This works perfectly. A soon as I receive new data in my bean, the table is automatically updated (e.g. a new row is inserted). I use JDev version: 11.1.1.3
    The problem is that I can not get the scroll bar to move down to the last row automatically when new data arrives. The auto scroll only works for the client that actually performs a submit. In other words the person that submits the new data, will see his scrollbar move down, this is because I added the following code:
    RowKeySet rowkeysset = chatTableBinding.getSelectedRowKeys();
    rowkeysset.clear();
    rowkeysset.add(getRowKey());
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.chatTableBinding);
    This does not work for the clients that receive the new data via the Active data model. Apparently the active data service partially refreshes the table, but not in such a way that it sets the selected row to the last row?
    My table definition:
    <af:table value="#{pageFlowScope.chatBean.instantMessagingChatwindowBean}" var="row"
    id="t1" columnStretching="last" rows="10"
    styleClass="AFStretchWidth" autoHeightRows="10" contentDelivery="immediate"
    horizontalGridVisible="false"
    verticalGridVisible="false"
    disableColumnReordering="true" displayRow="last"
    rowSelection="single"
    binding="#{pageFlowScope.chatBean.instantMessagingChatwindowBean.chatTableBinding}"
    inlineStyle="height:80px;">
    p.s.
    The table is used to show incoming chat message.
    I am building a chat client (taskflow) in a Webcenter application. The concept is similar of that presented by Lucas Jellemain in his blogpost on building a Google Talk Client http://www.oracle.com/technetwork/articles/jellema-googletalk-094343.html

    Dan,
    This is a thanks for posting your findings. You saved me quite some time.
    <af:selectBooleanCheckbox id="showOnlyActiveSubscriptions" selected="true"
    label="Show only active services:"
    value="#{servicePortfolioBean.showOnlyActiveSubscriptions}"
    autoSubmit="true" />
    <af:table binding="#{servicePortfolioBean.serviceTable}" ...
    partialTriggers="showOnlyActiveSubscriptions">
    Of course, when I add a "ValueChangeListener" to the selectBooleanCheckbox, the PPR stops working. :( I wonder why?

  • The last row count

    how can i make it when i after insert the data in a table ,it let me know the new total row number or the last row number.
    example.
    -now got 12 row datas
    -after i insert a new entry
    -it tell me now is row 13
    thanks

    Re: the last row count
    jesperdj Registered: Jun 10, 2003 1:00 AM      Nov 10, 2005 2:05 AM
    Let's get this straight first: You are talking about inserting a row into a database and counting the number of rows in a database table, right?
    Or are you talking about a table in a GUI?
    inserting row into a database is not a problem..and then..where after i insert the data into the database..i will retrieve the whole database and display it in my TAble in GUI...my problem now is..how i make it to highlight the new insert data in my table?or other way to say,how i highlight my newly insert datarow in my table?

  • Problem with bex query listing sales "this month" and "same month last year

    Hi,
    I've created a query in BW BEx, where I have a mandatory variable for 0calmonth, and I list 0material and sales (in volume, liter). And I have a restricted key figure giving me sales (volume in liter) restricted with 0calmonth = variable - 12, to give me the sale for the same month the user select, previous year.
    This seems to be working, the sum is correct, but when adding up the number for the sales in the month previous year, the numbers does not fit the sum in the end.
    I think the report only lists materials with sales the month selected in the variable, if a material has not been sold that month, but in the same month last year, it's not listed in the reports, but it's added in the sum in the end.
    Example.
    We have three records like this:
    material - calmonth - volume
    101 - 01.2010 - 5
    101 - 01.2011 - 8
    201 - 01.2010 - 7
    The report will give the following (calmonth variable = 01.2011)
    Material - volume this month - volume same month last year
    101 - 8 - 5
    Sum 8 - 12
    Any way to solve this issue? We noticed because we run BO - Webi on top of the BEx query, and BO sum's the values per material, and in webi the report would give us the sum 8 and 5.
    Any input is appreciated.
    Regards,
    Øystein

    Hi,
    thanks for your reply.
    The error is that the report only seems to list materials that has been sold "this month", and if the same material was sold the same month last year, it will also list the volume for this.
    But if the material is only sold in the same month last year, it's not listed in the report, but it's calculated into the sum at the end.
    The report is listing material, which is why the error presents itself, as you said
    Getting 8 minus 12 is correct unless you drill down by material. In that case, it should be 8 minus 5 and 0 minus 7.
    The row with 0 - 7 is not shown, and my guess is that the report will only list materials that has sales this month (which has been selected in the variable)
    Regards,
    Øystein
    Edited by: Oystein Gundersen on Mar 21, 2011 4:36 PM

  • Total Last Cell from last row, last column into another table

    What I'm trying to do is create a sum in a final table that will add together all the last cell Sums in the last column, last row from all Ten tables.
    Example of where I want to get the information from:
    I know I could use something like this *=SUM(Table 1 :: K45,Table 2 :: D9)* but in the future I want to be able to add extra rows in the Ten tables and therefore have the final table calculate the last cell without having to manualy change the cell numbers in the Sum.
    Message was edited by: Pongify

    Pongify wrote:
    Your "Bingo" solution worked a treat, now with Ten tables do I have to put the code in the last table cell Ten times changing the table number on each?
    Yes you have, the last table is perfectly unable to guess from which table it must grab datas.
    CAUTION There is an oddity which I call a bug.
    If you rename one of the table from which you grab datas, the two first occurences (in bold) in the formula will be adjusted accordingly but the 3rd one will not (the underlined one).
    =INDIRECT(ADDRESS(ROWS( *Tableau 1* :: A),COLUMNS( *Tableau 1* :: 1:1),,,"_Tableau 1_"))
    My guess is that the designers forgot that this "string" has exactly the same status as the first two occurences. Of course it's reported to Apple but at this time, we have to live with it.
    Here is a slightly modifier formula:
    =INDIRECT(ADDRESS(ROWS(Tableau 1 :: A),COLUMNS(Tableau 1 :: $1:$1),,,"Tableau "&ROW()))
    I replaced 1:1 (in the COLUMNS operand) which was modified during the fill down process by $1:$1 which remains unchanged.
    As I am lazy, I modified the last reference to the tables so it is automatically adjusted during the fill down process (my tables are named Tableau 1 thru Tableau 10).
    Yvan KOENIG (from FRANCE dimanche 6 juillet 2008 16:27:30)

  • Hiding bloc of Lines in a web template in the last row

    Hello,
    I want to hide a bloc of lines in a web query.
    Here I use the table interface with the method
    characteristic cell according to the "How to" - paper
    (How to hide a column).
    Normally , there is no problem to set the tag
    '<!--' in the first column ot the row to be suppressed and the tag
    '-->' in the first column of the row, I want to display again.
    But the problem is the last row. Here I must close the
    tag in the last column of the last row. The effect is
    something like a double line at the end of the output.
    (I think, I see here another time the first column of
    a row, because I cannot close the tag properly)
    As a result, I have problems with the print manager, we use to enhance the web printing.
    Can someone give me the information, how to close the tag
    in a proper way at the last row.
    Many thanks for your help.
    Regards
    Ralph

    Hi,
    I don't think this is possible. I would try to use c_cell_extend to extend the style of each <td>-Tag with style="visibility:hidden; display:none" This should have the same affect (for all cells which have to be hidden) (depending on your table styles there might be some padding or spacing effects; you have to try this out).
    Heike

  • Trying to get the last row from a resultset

    Hi,
    I'm trying to do a query to postgreSQL and have it return the last updated value, (last row).
    My prepared statement is returning the correct results, but i'm having a problem getting the latest value.
    I'm using a comboBox to drive a textfield, to load the last entered values in depending on which item in the comboBox is selected.
    I've tried a variety of things and most seem to return the first row, not showing the updated values.
    Or, if it does work, it takes to long to load, and i get an error.
    here is the working code;
    Object m = machCBX.getSelectedItem():
    try { PreparedStatment last = conn.prepareStatement("SELECT part, count FROM production WHERE machine = ?",
    ResultSet.TYPE_SCROLL_INSENSITIVE,  //tried both INSENSITIVE and SENSITIVE
    ResultSet.CONCUR_READ_ONLY);
    last.setString(1, String.valueOf(m));
    rs. = last.executeQuery();
    if(rs.isAfterLast) == false ) {
    rs.afterLast();
    while(rs.previous()) {
    String p = rs.getString("part");
    int c = rs.getInt("count");
    partJTX.setText(p);
    countJTX.setText(c);
    }this grabs values, but they are not the last entered values.
    Now if i try to use rs.last() it returns the value i'm looking for but takes to long, and i get:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space I also know using ra.last() isn't the best way to go.
    I'm just wondering if there is another way other than getting into vectors and row count? or am i better off to go with the later?
    thanks
    -PD

    OK, you've got a major misunderstanding...
    The relational database model is built on the storage of sets - UNORDERED sets. In other words, when you hand a database a SELECT statement without an ORDER BY clause, the database is free to return the results in any order.
    Now it so happens that most databases will happen to return data retrieved by an unordered SELECT, at least for a while, in the same order that it was inserted, especially if no UPDATE or DELETE activity has occured, and no database maintenance has occured. However, eventually most tables have some operation that creates a "space" in the underlying storage, or causes a row to expand and have to be moved or extended, or something. Then the database will start returning unordered results in a different order. If you (or other people) never ever ever UPDATE or DELETE a table, then on some databases the data might well come out in insertion order for a very very long time; given human nature and the way projects tend to work, relying on that is a sucker's bet, IMHO.
    In other words, if you want the "most recent" something, you need to store a timestamp with your data. (With some databases, you might be able to take advantage of some non-standard feature to get "last updates" or "row change timestamps", but I know of no such for Postgres.
    While this won't solve your major problem, above, your issue with rs.last is probably occuring because Postgres by default will prefetch your entire ResultSet. Use Statement.setFetchSize() to change that (PreparedStatement inherits the method, of course).

  • How do I store the values in the @D array in the below mentioned VI? Only the last row in the Array is populated with values from the image.

    Hello Guys,
    I am trying to build a sinogram from 180 projection images and I am not able to store the summed values into the array as it is moving the values and then populating all the rows except for the last with ZERO.
    Thanks in advance.
    Attachments:
    sinogram.vi ‏53 KB

    Your loop runs only three times, so all you can possibly populate is 3 rows.
    Typically, you would initialize a shift register with the initialized array, then use replace array subset, feeding the modified array back into the shift register. However, in this case you could just autoindex the 1D array at the output tunnel to build the resulting 2D array.
    Sorry, I am not familiar with sinograms. Do you have a link describing the algorithm?
    LabVIEW Champion . Do more with less code and in less time .

  • How to display a empty (non-existing) column and info in LAST row

    Hello!
    I´m trying to create the code that diplays all authors (author.name), empty COLUMN, NR_OF_BOOK_PER_AUTHOR.
    I want the LAST ROW to display: (column1) the word 'Sum:', (column2) nr of authors, (column3) total sum of all books
    Headache: How do I display the EMPTY column and how do I get the LAST ROW to display column1) 'Sum:', (column2) nr of authors, (column3) total sum of all books
    It should look like this:
    AUTHOR EMPTY NR_OF_BOOKS_PER_AUTHOR
    I can list all authors and NR_OF_BOOKS_PER_AUTHOR using this code:
    SELECT A.NAME, COUNT(B.ROWID)
    FROM AUTHOR A, BOOK B
    WHERE B.AUTHOR_ID = A.ID
    GROUP BY A.NAME
    ORDER BY COUNT(B.ROWID)
    I can count the numbers of authors (should be displayed in last row column2) using:
    SELECT COUNT(name)
    FROM author
    and I can list the total amount of books (should be displayed in last row column3) using:
    SELECT COUNT(title)
    FROM book
    But I come up short with how to display the EMPTY column and the last row containing (column1) the word 'Sum:', (column2) nr of authors, (column3) total sum of all books
    Any suggestions?
    Best regards,
    Daniel

    I want the LAST ROW to display: (column1) the word 'Sum:', (column2) nr of authors, (column3) total sum of all booksHave a look at GROUP BY with CUBE or ROLLUP.
    Cheers, APC

  • Using firefox 4.0.1, IBM SVC console internal server, rows with I think form data, the last row is corrupted and overlays a prior row.

    IBM SVC console uses websphere. Screen data that is presented in table form last row appears to overwrite the prior row only. In other similar layouts, the last row is cut in half and cannot be seen. The prior version of Firefox 3 (something) did not have this problem. OS Windows XP Pro SP3
    Firefox V3.6.17 worked fine

    Seeing the same problem using the HMC with FF7 beta.

  • How to get the last row

    I have 10 rows in my table and I have to retrive last row using rownum.
    For this I use
    SELECT * from <table_name>
    where rownum<=10
    minus
    SELECT * from <table_name>
    where rownum<=9
    The result is no rows selected
    In the same case if I use
    SELECT rownum from <table_name>
    Where rownum <= 10
    minus
    SELECT rownum from <table_name>
    where rownum <=9
    The result is 10
    Why this happend.
    If the result is 10, then why the row whose rowid is 10 is not retrived

    All
    Please bear in mind that ROWNUM is an attribute of the query NOT the table. The last row returned by an unORDERed SELECT statement may be the most recently inserted row but is not guaranteed to be so.
    The only way of assuring yourself of returning the most recent row is either to timestamp all your tables with a date_created column or to use a primary key with an ascending value.
    rgds, APC

  • Delete Last Row in Matrix on SBO 2005

    Hi,
    Im using SAPB1 2005 SP1 with B1DE.
    I've seen a post that indicates that the following code should delete a row from a matrix (even the last row) when using SBO 2005
    I still find that all rows except last row of matrix are removed from the database.
    <b>How do I delete the last row from the Del button event handler????</b>
    I'm using
    <i>        [B1Listener(BoEventTypes.et_CLICK, false)]
            public virtual void OnAfterClick(ItemEvent pVal)
                bool ActionSuccess = pVal.ActionSuccess;
                Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                Item item = form.Items.Item("del");
                Button button = ((Button)(item.Specific));
                // ADD YOUR ACTION CODE HERE ...
                int row;
                Matrix oMtx = (Matrix)form.Items.Item("mtx_0").Specific;
                DBDataSource oDBDS = (DBDataSource)form.DataSources.DBDataSources.Item("@SD_POOLCONTRCT_LINE");
                row = oMtx.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
                oMtx.DeleteRow(row);
                if (oMtx.RowCount == 0)
                    oDBDS.RemoveRecord(0);
                if ((form.Mode != BoFormMode.fm_ADD_MODE) | (form.Mode != BoFormMode.fm_UPDATE_MODE))
                    form.Mode = BoFormMode.fm_UPDATE_MODE;
                }</i>

    Hi Ben,
    [B1Listener(BoEventTypes.et_CLICK, false)]
    public virtual void OnAfterClick(ItemEvent pVal)
    bool ActionSuccess = pVal.ActionSuccess;
    Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
    Item item = form.Items.Item("del");
    Button button = ((Button)(item.Specific));
    // ADD YOUR ACTION CODE HERE ...
    int row;
    Matrix oMtx = (Matrix)form.Items.Item("mtx_0").Specific;
    DBDataSource oDBDS = (DBDataSource)form.DataSources.DBDataSources.Item("@SD_POOLCONTRCT_LINE");
    Rest of your code will remain same.
    I am making the modification here. I am using the RowCount property that gives me the address of the last row of the matrix.
    <b>row = oMtx.RowCount;</b>
    Every time this will return you the last row and that row will be deleted.
    <b>row = oMtx.RowCount;</b>
    oMtx.DeleteRow(row);
    if (oMtx.RowCount == 0)
    oDBDS.RemoveRecord(0);
    if ((form.Mode != BoFormMode.fm_ADD_MODE) | (form.Mode != BoFormMode.fm_UPDATE_MODE))
    form.Mode = BoFormMode.fm_UPDATE_MODE;
    Regards,
    Prashant

  • Copy to the last row a table

    H,
    I have created a table that adds a row when clicking on a button. The next step for me is to copy the information I have in some fields to the correspondent columns of the created row( last row) of the table. Since the row number alters I don't know how to do that.
    regards

    Hi,
    The addInstance() method returns the same object as if you have executed a resolveNode targeting the row added.  So if your row was called Row1 and contained a cell with a field called TextField1 then you could add a row and set the field's value with code like;
    var newRow = Table1._Row1.addInstance();
    newRow.TextField1.rawValue = "some information";
    Regards
    Bruce

  • DataGrid - Query´s Last Row as Footer

    Hi!
    I have a query like:
    SELECT [User], 'Qtd' = Count(DISTINCT [OrderId])
    FROM [Jobs]
    GROUP BY [User]
    UNION
    SELECT 'Total', 'Qtd' = Count(DISTINCT [OrderId])
    FROM [Jobs];
    And I´m displaying this query result in a DataGrid object in an ASPX page.
    I´d like to set the last row of the query as a footer with a specific formatting. How do I set the last row of my query as a footer record at the DataGrid?
    Thanks,
    Molina.

    Hello,
    Please ask your question over in the ASPNET forum
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

Maybe you are looking for

  • I am trying to make only the main content editable in a template.

    I thought I had only the main content area editable, but when I made a change to the menu bar in the template it didn't carry over ( I did try update) and then I realized my whole page is editable on the page where I applied the template.  Can someon

  • Can I tether with an iPhone 4s and a Windows 7 laptop?

    Is there more to this than just turning on the hotspot and connecting the two together via cable?

  • Pages is in low resolution

    since i've upgraded my iPad 3 to ios 8.3 Pages now looks in low resolution, like an old iPhone 3G. I've tried to intall everything from scratch, but it doesn't fix this issue. What am I doing wrong? Here is what it looks like now.

  • Bold, Colors in mail - Urgent

    Hi all, I am using a function mod for mail alert. The  user wants cretain names as BOLD & Colors in the text. Is there any function mod which sends the mail with BOLD, COLORS & any other options? Pls urgent. Thanks in advance. Vijay

  • Servlets in Multi tier Architecture

    Hi We plan to use a three tier architecture with Client --- Applet (JDK 1.2) Middle tier -- WebServer and servlets Database Server -- Oracle 8i Our application should have data entry for several (5 - 12 ) tabs each consisting of around 15 fields . A