Total in table

Hi,
I am using ADF 11.1.1.3.
For example I have Employee Table .. This table has salary coulmn..I have to show the total in the last for salary.To do that i have added a attribut for SalSum.
In VOROWImpl in getSalSum i have to add the code to add salary (using andrwes blog)
public Number getSalSum()
RowIterator emps = getEmpView();
Number sum = new Number(0);
while (emps.hasNext()) {   
sum = sum.add( (Number)emps.next().getAttribute("Sal"));
return sum;
But in this case the code is added into DeptVO , not sure if we have only EMPView how to call the iterator in same class.
Edited by: Shubhangi m on Apr 18, 2011 1:35 AM

Hi,
this seems to be a duplicate post of this thread: How to user groovy  to show total of one column of table
Follow the links in there and you get the help you need
Frank

Similar Messages

  • Add total to table view

    Hi,
    i am adding total to table view, there is no problem. it is written "Grant Total" as default.
    and i click "format labels",
    new window opened,
    i write new value 'TOTAL'
    and i am getting error EIRWWH9E
    kindly please advise

    Hi,
    Its know bug in obiee11.1.1.5.0 version and this issue has been fixed in OBIEE 11.1.1.6.0
    BUG:11772408 - XML ERROR IN A PIVOT TABLE WITH GRAND TOTAL WHEN TRYING TO FORMATTING LABEL
    refer my oracle support:
    OBIEE Error: "Bad Xml Instance!" Error Codes: "Eirwwh9e" When Editing Pivot Column Total Label [ID 1378892.1]
    Thanks
    Deva

  • Sub total in table footer

    Hello,
    I am creating an Adobe form for SD invoices.
    I have a table which contains the list of invoice items.  I want to calculate a sub total per page in the table footer.
    For example :
    PAGE 1                                                                         
    Item1   10,00 euros                                              
    Item2   10,00 euros                                             
    Item3   10,00 euros                  
    Sub total : 30,00 euros  
    PAGE 2   
    Item4  10,00 euros
    Item5  13,00 euros 
    Item6   22,00 euros
    Item7  14,00 euros
    Sub total : 59,00 euros   
    PAGE 3
    Item8   23,00 euros 
    Item9   55,00 euros
    Sub total : 78,00 euros
    How can I calculate this ?
    I have found this code on SDN but I don't know if it matches with my problem and I don't know how to use it ....Do you have an idea ?
    var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
    var total = 0;
    for (var i=0; i <= fields.length-1; i++) {
    if (fields.item(i).name == "PRICE") {
    total = total + fields.item(i).rawValue;
    this.rawValue = total;
    Edited by: Laure VERE on Jul 1, 2010 9:11 AM

    Hi ,
    Search for the function "sum" in formcalc in the "Adobe Livecycle Designer Help". That will solve your problem.
    It is something like
    var total = sum( TableName.RowName[*].FieldName[*])
    Thanks,
    Omkar Mirvankar.

  • How to Set Precision of Column Footer Total for Table Bean?

    I am doing an OAF extension, and I have a table for which I need to increase the precision of the column values from 2 decimal places to 5. I did this successfully in the view object for the row values, but the table footer totals still have 2 decimal places. I can't seem to find anyway to set this. Anyone know how to do this?
    Thanks in Advance,
    Kurz

    Hi,
    // Get a handle to the table footer bean
    OATableBean tableBean = ...;
    OATableFooterBean tableFooterBean = tableBean.getFooter();
    if (tableFooterBean != null)
    // Get a handle to the total row bean
    OATotalRowBean totalRowBean = tableFooterBean.getTotal();
    // If you want to set text for the total button
    totalRowBean.setText("Re-Total");
    // If you want to hide the recalculate total button
    totalRowBean.setReadOnly(true);
    Format totalRow Item
    You can format the content of the totalRow item programmatically. However, setting a formatting option such as CURRENCY_CODE, on an individual web bean's text attribute, under the total column, does not format the total row's values. Instead, to format the total row's value, use the setAttributeValue(AttributeKey key, Object value) method of oracle.apps.fnd.framework.webui.beans.table.OAColumnBean in your controller, as shown in the following example:
    OAColumnBean columnBean = (OAColumnBean)webBean.findIndexedChildRecursive("Salary");
    columnBean.setAttributeValue(CURRENCY_CODE,"USD");
    User should also be able to format Total column values in Table using formatter like:
    oracle.cabu.ui.validate.Formatter formatter = new OADecimalValidater("###0.###;-###0.###","#.##0.###;-#,##0.###"); OAColumnBean columnBean = (OAColumnBean)webBean.findIndexedChildRecursive("Salary"); columnbean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);
    Regards,
    Guru Krishnan.

  • Regarding Customer Total Sales table

    Hi All SAP Experts
    I like to know which table will provide me total of each customers for year. an Actual sales for per customer. I know table VBAK with filed Net value. My question is that figure is right figure for each customer. I am looking for total sales. Report requirement is total sales it will not show line itemwise. Just total sales per customer.
    Thank you

    Welcome to the forum.  As a new member, I would like to inform you that there are certain rules and regulations applicable to this forum which you can find to your right screen where it has also been indicated that posting basic / repeated query is not allowed. Please search in this forum or Google it with the same text, so that you will find many threads discussed on the same topic.  Take the inputs from there and update still if you are not able to resolve.  Meanwhile, this thread would be locked.
    G. Lakshmipathi

  • TOTAL REQUIREMENTS TABLE FIELDS

    HI ALL,
    I WOULD LIKE TO DEVELOP A CUSTOMISED REPORT ON THE TOTAL REQUIREMENTS (INCLUDING SALES REQUIREMENTPIRDEPENDENT REQUIREMENT+RESERVATIONS)
    AGAINST A MATERIAL FOR THE GIVEN DATE.
    CAN YOU GUIDE ME THE STEPS & TABLE FIELDS.

    HI
    For Dependant requirements and Reservations , use table RESB
    For PIR  use Tables PBIM ,PBED
    For Sales order requirements use Table VBAP, VBEP
    Regards,
    krishna Mohan
    Edited by: Krishna Mohan N on Jan 24, 2008 11:06 AM

  • Grand total on table with variance

    !http://img17.imageshack.us/img17/4070/resulta.jpg!
    hi, I set the column formula of variance to be: ("Current Value" - "Last Value) / "Last Value" * 100
    when I enabled the "grand total" of the table, it gives the grand total of variance = 0%.
    but actually it should be 3.3%
    how to achieve my goal.
    thank you very much!

    ("Current Value" - "Last Value) / "Last Value" * 100.00
    Change "100" to "100.00"

  • Inserting Totals into tables

    I have this query that counts the total occurances of certain
    selected field curr_loc :
    <cfquery name="qryGet_Data" datasource="logistics">
    select curr_loc, count(curr_loc) as total_count
    from filename
    where
    curr_loc = 'DOCKR24' or
    curr_loc = 'MIS778A' or
    curr_loc = 'PROD-ID' or
    curr_loc = 'R24INSP' or
    curr_loc = 'RITHOLD' or
    curr_loc = 'RIT-R24' or
    curr_loc = 'SMC///A' or
    curr_loc = 'STORERT'
    group by curr_loc
    order by curr_loc
    </cfquery>
    When I produce the report, it looks something like this,
    which is what I want :
    Current Location Total
    DOCKR24 172
    MIS778A 69
    R24INSP 112
    RITHOLD 39
    RIT-R24 15
    SMC///A 43
    STORERT 16
    I created a table on the sql server that looks like this :
    1 month_day_year datetime 8
    0 DOCKR24 numeric 9 1
    0 MIS778A numeric 9 1
    0 R24INSP numeric 9 1
    0 RITHOLD numeric 9 1
    0 RITR24 numeric 9 1
    0 SMCA numeric 9 1
    0 STORERT numeric 9 1
    How do I get each of the total values inserted into the
    corresponding fields/columns ?
    For example, month_day_year would be todays_date (which I can
    calculate). The first field DOCKR24 should contain the value 172,
    the field MIS778A should contain the value 69, the field R24INSP
    should contain the value 112, etc.
    I have to run this process/procedure every day, so the next
    day, I would have a new month_day_year value, plus a new total
    count value for field DOCKr24, MIS778A, R24INSP, etc.. It will read
    the same file every day (which will contain different data) and
    calculate a new count for each curr_loc. If done correctly, I
    should have 365 rows in my table, one for each day of the year.
    Thanks for any help.

    I haven't worked with SQL Server in a few years (been stuck
    on Oracle for a while now), but I believe a simple "INSERT-SELECT"
    statement is all you're going need here.
    You don't even necessarily need to involve ColdFusion at all.
    You could package this INSERT-SELECT statement into a stored
    procedure and schedule it to run daily (with a DTS package
    perhaps).
    Here's a quick example based on the information you've
    provided. My apologies if something is a smidge off with the
    syntax.

  • Acounting the total of tables group by year

    Hi there, I need help
    I am writing simple query that gives the result on total counts by group and sort by year.
    When I do single query it works
    select to_char(date, 'yyyy') as year, count(*) as total from table_name group by to_char(date, 'yyyy') order by to_char(date, 'yyyy');
    I need to use above query using through dba_tables. I have two thousand owners which has same tables.
    thanks,

    all,
    so far
    This is what I have
    set serveroutput on
    declare
    cursor c1 is select owner, from all_tables where table_name ='MESSAGE' order by owner;
    sql_stmt varchar2(4000);
    cnt_val number;
    cnt_year date;
    begin
    for c1_rec in c1 loop
    sql_stmt:= 'select count(*), to_char(date, "yyyy") from '||c1_rec.owner||' .MESSAGE';
    execute immediate sql_stmt into cnt_val, cnt_year;
    dbms_output.put_line (rpad(c1_rec.owner,20) ||' ' ||cnt_val|| ' '||cnt_year);
    end loop;
    end;
    when I run the above query, the errors at line 1
    ora-00904: "yyyy": invalid identifier
    ora-06512: at line 12
    any idea, please help me....

  • Count records and update total in table

    I have a class schedule that people use to register for a class. The schedule displays how many people are registered but that is a manual entery be me in the database. Is there a way to set this up to where all of the registrations for a class are counted and the total displayed in the schedule?
    Using Access 2007.
    registratron form
    action page
    schedule page
    thnks Jim

    Hi Again,
    I tried both the subselect and the two query method with no luck. The two query method did return less errors. I have included code and would really appreciate some feeback  thank you --jim
    form--------------------- 
    <cfinput type="text" name="name" message="Please enter your full name." required="yes" id="name">
            </div>
    <div class="register">
    <label for="county">COUNTY:</label>
      <cfselect name="county" query="qcounty" value="county">
                <option value="" selected="selected">Select a County</option>
                </cfselect></div
    <div class="register">
    <label for="email">EMAIL:</label>
                            <cfinput type="text" name="email" message="Please enter a valid email address" required="yes" validate="email"></div>
                <br />
              <div class="register">             
                <cfinput type="submit" name="submit" value="Register">  <cfinput type="reset" name="Reset " value="Reset Form">
           </div></fieldset></cfform>
    action page-------------------
      <cfinsert datasource="WebAdmin" tablename="mobiltyTrainingRegistration"
              formfields=" Name, Email, County, Phone1, Phone2, Phone3, Class, classID, Comment">
    <!--- populate #registered field in schedule--->
              <cfquery name="qAttendance" datasource="webAdmin">
           select count(class) as total
           from mobiltyTrainingRegistration</cfquery>
           <cfquery name="qAttendance" datasource="webAdmin">
           insert into mobilityClassSchedule(status) values ("#qAttendance.RecordCount#")</cfquery>
    schedule page-------------------------------------
    <cfoutput query="training">
        <tr>
          <td class="c7" width="39%" align="left" style="font-size:0.90em;"> #Class#</td>
            <td class="c7" width="19%" align="center" style="font-size:0.90em; text-align:left;">#Location#</td>
            <td class="c7" width="21%" align="center" style="font-size:0.90em;">#DateFormat(DropDate, "mmm-dd-yy")#</cfoutput>
      <cfoutput query="qAttendance">
              <td width="21%" align="center" style="font-size:0.95em;">#qAttendance.Recordcount#</td> 
    </tr></cfoutput></table>

  • HI,  TOTAL IN TABLE CONTROL

    HI
    I WOULD LIKE TO KNOW HOW TO DO TOTAL AND SUBTOAL IN TABLE CONTROL IN DIALOGUE PROGRAM.
    THANX
    ROCKY

    Hi,
      Loop at it_tab.
        at end it_tab-fname.
          sum.-----> this will sum all the interger fields and give the result in the header line.
        end at.
    endloop.
    then write the result in the total field in ur table control.
    Plzz reward points if it helps.

  • Fi-sl totals and line items

    dear experts,
    i have timestamp generated for actuals line items table for fi-sl.
    i also have the totals summary table but it has no timestamp.
    i like to find out how can i compare records for the 2 tables given that timestamp is not present in totals table.
    regards
    ernesta

    Hi,
    Refer for FI-SL Totals Records.
    http://help.sap.com/saphelp_nw70/helpdata/EN/04/e04c40cc538437e10000000a155106/frameset.htm
    The DataSource delivers transaction data from a customer-defined FI-SL ledger on a totals record level. This DataSource is used to determine the balance carryforward, since the line items DataSource 3FI_SL_XX_SI does not supply this. Restrict the selection to period 0 to determine the balance carryforward (e.g. 0FISCPER = 000.2004 to generate the balance carryforward for the closed fiscal year 2003).
    You should only extract period 0 for a closed fiscal year, since the data selection only functions in the full upload.
    Delta Update
    The DataSource must be started in the full upload to determine the balance carryforward.
    Thanks,
    JituK

  • How to validate the dates in the table control ?

    How to validate the dates in the table control ?
    Can I write like this ?
    LOOP AT it_tab .
    CHAIN.
    FIELD : it_tab-strtdat,it_tab-enddat.
    module date_validation.
    ENDCHAIN.
    ENDLOOP.
    Module Date_validation.
    ranges : vdat type sy-datum.
    vdat-sign = 'I'.
    VDAT-LOW = it_tab-STRTDAT.
    VDAT-HIGH = it_tab-ENDDAT.
    VDAT-OPTION = 'BT'.
    APPEND VDAT.
    WHAT CODE I have to write here to validate ?
    and If I write like this How can we know which is the current row being add ?
    It loops total internal table ..?
    Bye,
    Muttu.

    Hi,
    I think there is no need to put chain endchain.
    To do validation you have to write module in PAI which does required validations.
    Thanks
    DARSHAN PATEL

  • How to get customer / sales order details for VBBS table?

    Hi Friends,
    I have a requirement to create a report that will give the details of sales order ( VBELN ) and customer ( KUNNR) details from the sales requirement totals record table ( VBBS )
    Currently we have a report that just gives out the VBBS table entries for plant and material combination. As you are aware, the VBBS table contains the sales / deliveries requirements as displayed in MD04 transaction.
    Now there is a requirement to have the customer ( KUNNR ) and sales order (VBELN )  detail for each individual requirement totals.
    I checked the VBBE table ( sales requrirement : individual records ) but I cannot find any relationship between VBBS and VBBE. If there is a material / plant in VBBS , the same entry does not exist in VBBE.
    Please suggest if there is any other table to get this detail.
    Thanks
    Satya

    Tables are related.
    MATNR
    WERKS
    MBDAT
    LGORT
    CHARG
    etc fields are common in both VBBS and VBBE.
    May be you can generate a condition a fetch data using this.
    I hope it helps.
    thanks

  • Joining two fact tables with different dimensions into single logical table

    Hi Gurus,
    I try to accomplish in Oracle Business Intelligence 11.1.1.3.0:
    F1 (D1, D2 and D3)
    F2 (D1 and D2 and D4)
    And we want to build a report F1 F2 D1 D2 D3 D4 to have data for:
    F1 that match only for D1-D2-D3
    and data for
    F2 that match only D1-D2-D4
    all that in one row, so D3 and D4 are not common dimensions.
    I can only do:
    F3 (D1, D2)
    F4 (D1, D2 and D4)
    And report
    F3 F4 D1,D2,D4 (all that in one row, and only D4 is not a common dimension)
    Here is the very good example how to accomplish the scenario 1
    http://108obiee.blogspot.com/2009/08/joining-two-fact-tables-with-different.html
    But looks like it does not work in 11.1.1.3.0
    I get
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 14025] No fact table exists at the requested level of detail: [,,Clients,,Day,ROI,,,,EW_Names,,,,,,,,,,,,,,,,,]. (HY000)
    I am sure I set up everything correctly as advised in the blog but it works with only one not a common dimension
    Is it a bug in 11.1.1.3.0 or something?
    Thanks,
    Kate

    Thanks for all your replies.
    Actually, I've tried the solutions you guys mentioned. Generally speaking, the result should be displayed. However, my scenario is a little bit tricky.
    table Y's figures are not the aggregation of table X for D dimension. Instead, table Y's figures include not only D dimension total, but also others (others do not mean A, B, C dimension). For example, table Y stores all food's figure, while table X stores only drink's figure. D dimension is only about drink's detail. In my scenario, other foods' figure is not provided.
    So, even if I set D dimension to all/total for table X, table X's result is still not the same as table Y.
    Indeed, table Y does not have a column key to join to D dimension's key. So, if I select D dimension and table Y's measures at the same time in BI Answer, result returns no data. Hence, I can't compare table X and table Y's results with selection of D dimension.
    Is there any solution to solve this problem?
    Edited by: TomChan on Jun 3, 2009 9:36 AM

Maybe you are looking for