Formula to provide a varaible the total value for a group

Hi,
I need to create a formula which outputs the value for a single group. For example, two groups are:
Group: Year
     Group: Products
I only need to place in the footer the total for year 2012, product jam. The report contains dteails for many products and years.
Any one help me with this formula?
Cheers,

Hi Leo,
Create this formula and place it on the Group Header 2. You may suppress this formula as we don't really need to display it.
WhilePrintingRecords;
numbervar summ;
if {Year} = 2012 and {Product} = "Jam" then
    summ := Sum ({Product}, {Year}))
Note. If the {Year} field is a date field, then you need to use a function to extract the year like:
Year({Year_field}) = 2012
Create another formula to display the sum and Place it on the Report Footer:
WhilePrintingRecords;
numbervar summ;
Hope this helps!
-Abhilash

Similar Messages

  • Is it possible to get the total value for column and assign to other field

    hi,
    Is it possible to get the total value of particular column and assign that value to another field?
    How to do this?
    Thanks in advance,
    SAN

    Afridi,
    My extended controller class code:
    package xxhr.oracle.apps.per.selfservice.appraisals.webui;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
    import oracle.apps.per.selfservice.appraisals.webui.OverviewPageCO;
    import oracle.jbo.Row;
    public class XXOverviewPageCO extends OverviewPageCO {
    public XXOverviewPageCO() {
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if(pageContext.getParameter("XXCalcAvgButton")!=null){
    throw new OAException("welcome",OAException.INFORMATION);
    //getSum(pageContext, webBean);
    private String getSum(OAPageContext pageContext, OAWebBean webBean) {
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject ratvo = (OAViewObject)am.findViewObject("CompetenceElementsVO");
    OAViewObject valuevo = (OAViewObject)am.findViewObject("PerRatingLevelsVO");
    Integer Sum = new Integer("0");
    int numofRows = ratvo.getRowCount();
    for (int x = 0; x < numofRows; x++) {
    Object Rating =
    ratvo.getRowAtRangeIndex(x).getAttribute("ProficiencyLevelId");
    if(Rating!=null) {
    int numofRowsforvalue = valuevo.getRowCount();
    for(int i=0;i<numofRowsforvalue;i++){
    if(valuevo.getRowAtRangeIndex(i).getAttribute("RatingLevelId").equals(Rating)){
    Object StepValue=valuevo.getRowAtRangeIndex(i).getAttribute("StepValue");
    Sum = new Integer(StepValue.toString()) + Sum;
    OAMessageStyledTextBean displayCompAvg=(OAMessageStyledTextBean)webBean.findChildRecursive("XXCompAvgText");
    displayCompAvg.setValue(pageContext,Sum);
    return null;
    But it is not affecting in the page.
    Can you please tell me what is the problem.

  • FM returns wrong total value for Limit type PO's

    Hi all,
    I am working on SRM 5.0 (SP13) ECS.
    I have implemented the BADI "BBP_WFL_APPROVAL_BADI" for determining the Approvers for PO whenevr a PO is changed.If the diference between the Old PO value and new PO value is > 1000 and the approval text field(custom text under "Documents" link) is set to "YES",then the WF approval is required and the approvers are determined.
    The above logic works fine for the Standard type PO's where the difference between the old value and new value is determined using FM "BBP_PD_PO_GETDETAIL"  by passing the GUID (for the change version and the active vesion) obtained at runtime in the BADI.
    However for the limit type PO's,whenevr I change the total value for the Limit item,I see that the FM "BBP_PD_PO_GETDETAIL" doesnt return the changed value but  always returns blank!
    Bcause I need to check bth the values i.e. Custom text set to "YES" as well as Total value diff ,I cant use the start conditions in tcode SWB_COND.ALso I need to fetch the approvers based on the price diff so I need this value at runtime in the BADI using the FM "BBP_PD_PO_GETDETAIL".
    Please advise why the FM is not returning the changed values for the Limit type PO and is there any other way(other table/FM) to get the changed value at runtime for the LIMIT type PO.
    Thanks for your time.
    Edited by: Rads1234 on Nov 18, 2010 4:39 AM

    Thanks for the rpely.
    Yes.I am using the GUID available at runtime in the  BADI "BBP_WFL_APPROV_BADI" which is the current change version GUID.I tried using that GUID to get the data from both FM as well as CDHDR and CDPOS tables.
    I think this is something related to LImit type PO because for Standard type PO's the FM returns the corretc changed value (as in the screen) for the change version GUID.I fail to understand why the changed values are shwon on the screen but are not stored anywhere in the system before actually ordering the PO!

  • Total value for Pending Sales order

    Hi All,
    Kindly tell where we can find the total value for the pending sales order. I think that there should be standard t-code for the same.
    Thanks & Regards
    Points will be rewarded

    Dear,
    One more problem has been highlighted of mismatch inthe values of Billing document and MC01 reporting.
    We have dispatched material for one customer for value Rs. 105000 and the same is shown as 20375 in the MC01 report. This is the First line item in the billing document.
    Kindly suggest the course of action or alternate solution.
    Thanks

  • Format the total value in the column of the graph table

    Hello all,
    I have a graph table and I need to format the total value in the column of the table.
    I am trying to find my table bean with the code below but it's not working in the processRequest. Is there anything else that should be done?
    // Get the graph
    OAGraphTableBean graphBean = (OAGraphTableBean)webBean.findChildRecursive("MyGraph");
    // Get the table
    OATableBean tblBean = (OATableBean)graphBean.findChildRecursive("MyTable");
    The tblBean is null in the processRequest. In the processFormRequest the tblBean is not null.
    Thanks and Regards,
    Andrea

    Hi,
    The code OAGraphTableBean graphBean = (OAGraphTableBean)webBean.findChildRecursive("MyTable"); does not work because in this case I am getting the table but casting to a graph.
    The MyTable bean is a child of MyGraph.
    When creating a graph bean we have the option to create a table as a child (select your graphTable region in the Structure pane, and choose New > tabularFormat - to create the table).
    The table bean child I can get just in the processFormRequest, but the graph I can get in both processRequest and processFormRequest.
    I need to get the table bean in the processRequest to format the total value column.
    Do you know if is there anything else that should be done to format the total column?
    Thanks and Regards,
    Andrea

  • How can I get the total "values" in a hashtable ?

    i know that i can get the total values in a hashtable by hash.elements() method. It returns an
    enumeration with all the values present in this hashtable. this is fine upto here.
    Now the preoblem is:
    According to what rule this enumeration will be returned. I mean..
    If i added in key A with value a,
    then key B with value b;
    then key C with value c;
    then key D with value d;
    (They all are objects of type String)
    now i call ... hash.elements(); Suppose it returns Enumeration enum;.
    Now in what order they all are present in this hashtable.
    Meaning is that if i move arond this enum in what sequence they all will be returned.
    option A ) In the same order as they were inserted in hashtable.
    option B ) According to LIFO;
    option C) There is no fix rules , simply it return all the elements and u cannot judge that the first element in enum was really the first element inserted in the hashtable and the second element of enum was really the second element inserted in the hashtable.
    What do u think..which option is correct ?
    Ny idea will highly appreciated.
    Thanks in advance.
    Sanjeev Dhiman

    hi, i am again..
    boss ! this is not true..u just change the order and or change the keys and something like ...
    "Sanjeev", "hello"
    "Dhiman", "hi"
    "Technosys" ,"Services"
    u will find that its not LIFO..really i was thinking before coding my project that option A is correct and with knowledge i wrote 3 - 4 classes but when i run the programm its starts throwing errors.
    so, i posted this question. I think "apppu" is right.
    I think , firstly hash is calculated for each value and that value is returned which can be received in a fastest way and hence not necessarily in LIFO and FIFO..
    Thanks to u also as u gave ur precious time for me.
    Once again.
    Thank you very much.
    Sanjeev Dhiman

  • Unable to read the total value.

    Hi guys,
    I am able to get the total for alv table column.. but i want to display the total value  in some other text view field.
    In order to do that... first i have to read the total value, and have to set the same to text view field,
    total value is of type   ( DATA: LV_AGGR_RULE TYPE REF TO CL_SALV_WD_AGGR_RULE. )
    but my text view field attribute is of STRING TYPE.
    So am getting conversion error. Pleas help me in this.
    Regards
    Farooq
    Edited by: farooq basha on Jun 13, 2011 12:52 PM

    Hi ,
    Try to loop your internal table on the column "Amount" and make a sum for that particular column, u will get the required sum Amount..
    Thanks
    Aisurya

  • How to Check the total value of a field

    Hi,
    I want to check the total value of a field (this total is obtain by using property of that field thru personalization).
    that means , in a table 3 columns are there (col 1, col2 & col3). I personalized the total property as true for col3.
    now i'm getting the total for that field.
    I want to check that total whether it crossed 100 or not.
    How to do this?
    Thanks in advance,
    SAN

    Hi San,
    You can achieve by using OATotalRowBean, search for OATotalRowBean in this forum you should be able to get some sample code.
    public class OATotalRowBean
    extends TotalRowBean
    implements OAWebBean, OAWebBeanConstants
    A special row rendered at the bottom of a table which lets users see totals for columns which are designated for summing.
    Note The total is calculated and displayed only for visible rows.
    When you indicate that you want to total one or more columns, the OA Framework creates an OATotalRowBean and designates it as the columnFooter named child of the OATableBean. If the OATableBean is also configured to insert rows (so it has an "Add Another Row" button), then the total bean becomes an indexed child of the add table row bean (see OAAddTableRowBean), which the OA Framework in turn designates as the table's columnFooter object.
    If you need to access the table's column footer object for any reason, call the OATableBean's getColumnFooter() method. If row insertions are enabled, this method returns an OAAddTableRowBean; otherwise it returns an OATableRowBean.
    For detailed information about creating and working with tables, see OA Framework Developer Guide: Tables.
    With regards,
    Kali.
    OSSi.

  • T.Code for checking the total value of a material

    Hi Experts,
      Can anybody tel me the T.code for checking the total value of a material which is procured in a specified period?
    Thanks in advance
    Channa

    Refer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get PO-GRN-INVOICE Qty & Value details
    Last button on Application tool Bar it is in line of filter, total etc icons
    Also check below reports :
    MC$G - PURCHIS: Material PurchVal Selection
    MC$0 - PURCHIS: PurchGrp PurchVal Selection
    MC$< - PURCHIS: MatGrp PurchVal Selection
    MC$4 - PURCHIS: Vendor PurchVal Selection

  • Lines above and below the total values

    Hi All,
    This is for an invoice. I display line items and then the totals. I want to draw lines above and below the total values. i am able to underline the total values using the paragraph formats but that will give only lines below the values. how can I get the lines above and below the values in correct proportions? Please give me some ideas on how to do this.
    Thank you,
    Prathima.

    Prathima,
    You should not be using ULINE and VLINE commands here. Instead you have to declare boxes.
    /:           BOX FRAME 10 TW
    /:           BOX XPOS  '3.0' CM  WIDTH 0 TW FRAME 10 TW
    /:           BOX XPOS  '6.0' CM  WIDTH 0 TW FRAME 10 TW
    /:           BOX XPOS  '9.0' CM  WIDTH 0 TW FRAME 10 TW
    /:           BOX XPOS '12.0' CM  WIDTH 0 TW FRAME 10 TW
    Using boxes is advantageous in a lot of ways as you can specify the x and y positions exactly.
    Thanks
    Aneesh.

  • I need in Formula Node to assign to the variable value 4000000000!!! What kind of variable it should be???

    i've just tryed to write unsigned in32, but it does not understand 'unsogned'... But i need variable to be unsigned, because the max value = 4000000000... So, how can i solve this probleme???

    Hi,
    I don't see exactly what you're trying to do here.
    Where do you want to assign the variable 4000000000 to? If you want it as an
    input, just use a dbl, with only zeros behind the coma.
    Note that an integer is a number without any decimals. An integer in LabVIEW
    is this, but with an extra limitation that it can only be 32 bits... So a
    dbl can be an integer.
    If the input dbl is not an integer, use round, round to -inf or round to
    +inf to make it one. This can also be done if the output needs to be an
    integer.Inside the formula node floor(x), int(x), intrz(x) or ceil(x) can be
    used to make integers.
    I hope this is what you mean... I can't see any problems doing this.
    Regards,
    Wiebe.
    "DrON" wrote in message
    news:506500000008000000E
    [email protected]..
    > I need in Formula Node to assign to the variable value 4000000000!!!
    > What kind of variable it should be???
    >
    > i've just tryed to write unsigned in32, but it does not understand
    > 'unsogned'... But i need variable to be unsigned, because the max
    > value = 4000000000... So, how can i solve this probleme???

  • How to find the total value of the Production order

    HI ,
    I am developing one report in which , custumer have a req. to show the total value (in Dollar) of all  open production order as well as the past production order ( not DELEvered & teco ) for  the selected plant . for that i need  BAPI or table name .
    Regards
    Satish

    Hi,
    For production order nos. - AUFK or AFKO
    For production order status - JEST & to know the status eg REL etc, refer TJ02
    For costs - COSS & COEP (Pass order nos. to the field OBJNR as OR followed by 12 digit order number)
    Hope the above helps.
    Regards,
    Vivek

  • How to know the dynamic values for this :AND category_id_query IN (1, :3, )

    Hi Team,
    R12 Instance :
    Oracle Installed Base Agent User Responsibility --> Item Instances -->
    Item Instance: Item Instances > View : Item Instance : xxxxx> Contracts : Item Instance : xxxxx> Service Contract: xxxxx>
    In the above page there are two table regions.
    Notes.
    -------------------------------------Table Region---------------------------
    Attachments
    -------------------------------------Table Region---------------------------
    --the attachments are shown using the query from the fnd_lobs and fnd_docs etc...
    I want to know what are the document types are displayed in this page ?
    --We developed a custom program to attach the attachments to the  services contracts and the above seeded OAF page displays those ..as needed.
    But after recent changes..the Attachments--> table region is not showing the attachments.
    I have verified the query..and could not find any clue in that..
    but i need some help if you guys can provide..
    SELECT *
    FROM
    *(SELECT d.DOCUMENT_ID,*
    d.DATATYPE_ID,
    d.DATATYPE_NAME,
    d.DESCRIPTION,
    DECODE(d.FILE_NAME, NULL,
    *(SELECT message_text*
    FROM fnd_new_messages
    WHERE message_name = 'FND_UNDEFINED'
    AND application_id = 0
    AND language_code  = userenv('LANG')
    *), d.FILE_NAME)FileName,*
    d.MEDIA_ID,
    d.CATEGORY_ID,
    d.DM_NODE,
    d.DM_FOLDER_PATH,
    d.DM_TYPE,
    d.DM_DOCUMENT_ID,
    d.DM_VERSION_NUMBER,
    ad.ATTACHED_DOCUMENT_ID,
    ad.ENTITY_NAME,
    ad.PK1_VALUE,
    ad.PK2_VALUE,
    ad.PK3_VALUE,
    ad.PK4_VALUE,
    ad.PK5_VALUE,
    d.usage_type,
    d.security_type,
    d.security_id,
    ad.category_id attachment_catgeory_id,
    ad.status,
    d.storage_type,
    d.image_type,
    d.START_DATE_ACTIVE,
    d.END_DATE_ACTIVE,
    d.REQUEST_ID,
    d.PROGRAM_APPLICATION_ID,
    d.PROGRAM_ID,
    d.category_description,
    d.publish_flag,
    DECODE(ad.category_id, NULL, d.category_id, ad.category_id) category_id_query,
    d.URL,
    d.TITLE
    FROM FND_DOCUMENTS_VL d,
    FND_ATTACHED_DOCUMENTS ad
    WHERE d.DOCUMENT_ID = ad.DOCUMENT_ID
    *) QRSLT*
    WHERE ((entity_name    ='OKC_K_HEADERS_V'-- :1
    AND pk1_value          IN ( 600144,599046) --:2
    AND category_id_query IN (1, :3, :4, :5, :6, :7) )
    AND datatype_id       IN (6,2,1,5)
    AND (SECURITY_TYPE     =4
    OR PUBLISH_FLAG        ='Y')))
    --='000180931' -- 'ADP118'
    The above seeded query is the one which is used for table region to retrieve the data..
    how to know the dynamic values for this : AND category_id_query IN (1, :3, :4, :5, :6, :7) )
    --Sridhar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi Patricia,
    is it working for restricted key figure and calculated key figure ??
    Note Number Fisc Period Opening Days
    1 1 2
    2 1 3
    3 1 0
    because I have other restriction, so I create two restricted key figure..
    RK1  with restriction :  Total Number of Note,
    RK2  with restriction :  Total Opening Days ,
    then I Created a calculated key figure, average opening days in a period
    CK1 = RK2 / RK1..
    in this case, I am not sure if it will work or not..
    for example, during RK2 calclation, it might be this   2+3 = 5, the line with 0 will be ignored..
    during RK1 calcualtion, it might be 1 + 1 + 1 = 3. ---> Not sure in this case, the line with opening days 0 will be calculated or not..
    could you please confirm..

  • Total value for PO not displayed

    Hi,
    While creating a SSP PO, the total value is not displayed. Please suggest.
    Regards,
    Anand.

    Dear Poster
    Your thread has had no response since it's creation over
    2 weeks ago, therefore, I recommend that you either:
    - Rephrase the question.
    - Provide additional Information to prompt a response.
    - Close the thread if the answer is already known.
    Thank you for your compliance in this regard.
    Jason Boggans
    SAP SRM SDN Moderator

  • What is the initial value for a numeric field ??

    Can someone tell me what the INITIAL VALUE FOR A NUMERIC FIELD is ?? Thank you
    Rod.

    Using the following...
       class MyClass
         int myvar1;  // Default initial value
         int myvar2 = 3;  // Default initial value and default value
         MyOtherClass myclass1; // Default initial value
         void doit()
           int mylocal1;  // No value
           MyOtherClass myclass2; // No value
    All number member variables, like myvar1 start off with andefault initial value which is zero. For booleans this is false. Object reference variables, like myclass1, have a null value.
    All local numeric variables are considered undefined. So mylocal1 and myclass2 are undefined. Before you can use them you must explicitly provide a value.
    Finally note that myvar2 will have two values during class instantiation. Initially it will have a value of zero. Sometime later it will have the value of 3. (When that happens is very definitely outside the scope of what this forum covers. If you want to know then ask in the advanced forum.)

Maybe you are looking for

  • Report for PO changes

    hii, is there any report or txn by which i can know the details of any changes made in PO. abhishek

  • Problem with call transaction MMBE

    Hello, I need to make a call to the transaction MMBE from within my Z program. This is the code that I have written for it: WHEN 'STOCKOVW'.       SET PARAMETER ID 'MAT' FIELD line_rec-matnr.       SET PARAMETER ID 'WRK' FIELD line_rec-werks.       C

  • How can I add a dip to white at the beginning of a clip?

    How can I add a dip to white at the beginning of a clip?  I know where to find it on Pr, but I'm new to AE.  I have 2 clips that need to transition one to the other.  The first clip ends by dipping to white; therefore, I need to either dip to white a

  • Firefox freezes while playing flash videos.

    When i play flash videos Firefox freezes. frames is lagging but the sound is ok.

  • What is causing Google Chrome to start very slow?

    So Google Chrome crashed for 2 times and now its starting extremely slow. I check console and these are the errors: CODE SIGNING: cs_invalid_page(0x1000): p=787[ksadmin] clearing CS_VALID CODE SIGNING: cs_invalid_page(0x1000): p=790[ksadmin] clearing