PM Reports: Need to find the sum of a particular field in the output.

Hello Experts,
                      I have an issue. I have developed the report to calculate the power per ton. It is PM module.
Input is : DATE & Measuring Point.
Output required is : For a particular date , What is the power consumed per ton.
Its is calculated by the formula Power consumed per day /  Production.
I have multiple entries for production ( because different material are used )  per date and a single entery for power (because power is taken as total power consumed per day)
Hence im getting the output as
For example:
date                power            production         power/ton
01.03.2011      5000                    100                  50.00
01.03.2011      5000                      50                 100.00
01.03.2011      5000                      25                 200.00
01.03.2011      5000                      75                  66.66
The desired result is
date                power            production         power/ton
01.03.2011      5000                    250                  20.00
I need to sum the production field.
How can I achieve this ?
Please help.

Hello
Rotate the loop and use event so on change just clear the variable based date condition .
take 2  temp variable for summation
clearing the total and moving value on permanent variable means modifying the itab.
loop at .
*Clear
on change <datefield>.
modify itab from wa  transporting <field name> .
clear <total field>.
endon.
*Total
t_prd  = t_prd + production..
t_power = t_power + power .
endloop.

Similar Messages

  • How do I make a form field validate that it is the sum of two other fields?

    Hi there,
    I am creating a form, and I would like one of the fields to validate by making sure that this field is the sum of two other fields in the form.  Does anyone have any ideas on how to go about this?  I know I'll need to run a custom validation script, but I'm not sure where to begin - I've never done one for validation before.
    Thanks for any help!

    OK, here's a sample script that I hope will clearly demonstrate the general approach. It is intended to be the custom Validate script of the field that the user enters that value that is supposed to be equal to the sum of the two others.
    // Custom Validate script
    (function () {
        // Get the value that the user entered
        var sVal = event.value;
        // If it is blank, do nothing else
        if (!sVal) {
            return;
        // Convert string to a number
        nVal = +sVal;
        // Get the values of the fields, as numbers
        var v1 = +getField("text1").value;
        var v2 = +getField("text2").value;
        // Add them together, rounding to two decimal places, converting to number
        var sum = +util.printf("%.2f", v1 + v2);
        // Compare entered value to the sum of the other two fields
        // Alter the user if they do not match
        if (nVal !== sum) {
            app.alert("The value you entered does not equal the sum of text1 and text2. Please correct.", 3);
            // If you want the entered value rejected, include the following
            event.rc = false;
    Replace "text1" and "text2" with the actual field names.

  • Interactive Report Need total of aggregate (sums) where break format used

    I have an interactive report that uses break formatting. When I do an aggregate (sum) for the Quantity Column I get the sums for each campaign_id (used for the break format column). This is great. However, at the bottom of the report I need a grand total for all campaign ids (a sum of the sums) in a new row at the bottom of the report. Is this possible?
    I can't paste a screenshot here to show but her is a simple one column example - I can't make the columns stay lined up but I think you can see what I need.
    {code
    Campaign Hand Addressed (break format column)
    Quantity
    100
    200
    Sum:300
    Campaign Travel Check
    Quantity
    100
    500
    Sum:600
    Sum:900 This is row I need to add
    Oracle 11GR2
    APEX 3.2.1

    This works when I run it in SQL Developer. Now I enter this for my report query in APEX and I get the "not a GROUP BY expression.
    {code
    SELECT *
    FROM t3_mail_piece t
    WHERE t.week_id = 11
    GROUP BY ROLLUP(t.campaign_id, t.market_id)
    ORDER BY t.campaign_id
    , SUM(t.quantity);
    What is different?

  • Display a sum of a column(field) in the view

    Hi
    I would like to show the sum of a revenue field(currency) in any view of the opportunity entity(only when revenue field exist in the view) , may be at the end of the view or as a alert message on button click., but sum should change dynamically based on
    the filters applied or selected records.
    E.g. Here Est. Revenue to be summed and displayed.
    Kindly help me... Thanks in advance.
    Rekha.J

    This is the Solution
    Add This Code to Desing Page:-
    <GridView id="GrdView1" Runat Server/>
    <asp:TemplateField HeaderText="Date" ItemStyle-Width="100px">
                            <ItemTemplate>
                               <%# Eval("Date","{0:MMM d,yyyy}").ToString()%>
                            </ItemTemplate>
                            <FooterTemplate>
                                Sub-Total:
                            </FooterTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Amount" ItemStyle-Width="118px">
                            <ItemTemplate>
                                <%# GetAmount(decimal.Parse(Eval("Amount").ToString())).ToString()%>
                            </ItemTemplate>
                            <FooterTemplate>
                                <%# GetToalAmount().ToString("")%>
                            </FooterTemplate>
                        </asp:TemplateField>
    </GrigView>
    In the cs file write the code on pageload as
    decimal TotalAmountPaid = 0;
        public decimal GetAmount(decimal Price)
            TotalAmountPaid += Price;
            return Price;
        public decimal GetToalAmount()
            return TotalAmountPaid;
    Then Run This..............................

  • Get the value of a particular field in a segment of an Idoc

    Hi All,
    I have a requirement where I need to write a report which will fetch the value of a particular field in a segment of an idoc.
    I have the idoc number segment and field name as input parameters by which I can fetch Sdata from EDID4 but the confusion is how to find the exact field value from that Sdata. How to Map the SDATA to the segment structure.
    Please advice...

    Hi,
    I have one last doubt that may be you people can help with... The user will be giving the segment name and field name as input. So by following Kesav's code while i can get all the values in the segment structure at runtime please suggest how to display any one field from that structure given that that particular field will come at runtime.
    EX: user gives an idoc number 123 (say belonging to Orders basic type)
                                 segment E1EDK01
                                 field  BELNR.
    So i need to display the value of E1EDK01-BELNR of idoc number 123.
    Please suggest how to achieve this....

  • How to change the size of a particular object in the picture?

    How to change the size of a particular object in the picture?

    You need to select it.  Copy that selection to a new layer, and use Free Transform to resize it.
    http://www.youtube.com/watch?v=qWpAGmwhllQ
    http://www.youtube.com/watch?v=Bi4jJnYLkUA

  • Maintaing a default value for a particular field in the selection screen

    Hi all,
    How to maintain a default value for a particular field in the Selection Screen of a Standard report
    Regards
    Ajay

    >
    ajay babu wrote:
    > Hi all,
    >
    > How to maintain a default value for a particular field in the Selection Screen of a Standard report
    >
    > Regards
    > Ajay
    Create a variant for your standard program and assign this variant to the field 'Start with variant' while creating transaction code for the standard program in the transaction 'SE93'.
    Regards
    Rajesh.

  • How do I insert the value of an email field in the submit mailto: argument?

    I want to create a button that will redirect a PDF form to an email address entered as a field in the form.  In other words, a "return to sender" function.  The button function has a submit to URL where you can use "mailto:[email protected]".  How can I substitute the value from an email field in the form itself for the "[email protected]" value?

    You'll need to use JavaScript, and the mailDoc method in particular: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.505.html
    Get the value of the field that contains the email address and use it as the value of the cTo property. See the following for a sample script: http://forums.adobe.com/message/3553628?tstart=-1

  • How do I set the zoom at a particular level as the default to ensure pages are not too small and that i don't have to change the zoom for each page? in English

    How do I set the zoom at a particular level as the default to ensure pages are not too small and that i don't have to change the zoom for each page? in English
    == This happened ==
    Every time Firefox opened
    == From the beginning

    Some add-ons:
    Default FullZoom: https://addons.mozilla.org/en-US/firefox/addon/6965 (I use this one)
    No Squint: http://urandom.ca/nosquint/
    Also:
    http://support.mozilla.com/en-US/kb/Page+Zoom
    http://support.mozilla.com/en-US/kb/Text+Zoom
    http://kb.mozillazine.org/Browser.zoom.siteSpecific

  • Code for reading particular  fields from the file placed in application

    hi,
    code for reading particular  fields from the file placed in application server in to the internal table.

    Hi,
    Use the GUI_UPLOAD FM to upload the File into ur Internal Table.
    DATA : FILE_TABLE TYPE FILE_TABLE OCCURS 0,
             fwa TYPE FILE_TABLE,
             FILENAME TYPE STRING,
             RC TYPE I.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
      EXPORTING
        WINDOW_TITLE            = 'Open File'
       DEFAULT_EXTENSION       =
       DEFAULT_FILENAME        =
       FILE_FILTER             =
       INITIAL_DIRECTORY       =
       MULTISELECTION          =
       WITH_ENCODING           =
      CHANGING
        FILE_TABLE              = FILE_TABLE
        RC                      = RC
       USER_ACTION             =
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE FILE_TABLE INDEX 1 into fwa.
    FILENAME = fwa-FILENAME.
        CALL FUNCTION 'GUI_UPLOAD'
             EXPORTING
                  filename                = filename
                  FILETYPE                = 'DAT'
           IMPORTING
                FILELENGTH              =
             TABLES
                  data_tab                = itab
             EXCEPTIONS
                  file_open_error         = 1
                  file_read_error         = 2
                  no_batch                = 3
                  gui_refuse_filetransfer = 4
                  invalid_type            = 5
                  OTHERS                  = 6 .
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    Regards,
    Balakumar.G
    Reward Points if helpful.

  • How to reset particular fields in the Form

    hi there
    i am using a reset button to reset the form, but it resets the whole form including data which is bound with XML.
    i would like to know whether i can reset particular fields in the form excluding the XML bound fields.
    any examples would be appreciated!!
    Thank you for your time

    Check the help at
    Scripting > Scripting Reference > Scripting Methods > resetData

  • HT4759 I NEED TO FIND MY IPOD BUT I DON'T HAVE THE ICLOUD UPDATE , BUT I HAVE THE IPOD ON "FIND IPOD TOUCH" ?

    iCloud won't let me sign in unless i update my iCloud System? i need to find my iPod it's very important too me and my familia. Any Ideas ?

    Why can't you update iCloud?

  • My vertical column of bookmarks down the left side of my screen has disappeared and I need to find a way to get it back in the same place.

    This is purely a lay-out issue. We used to be able to choose to permanently display our bookmarks vertically down the left side of the screen, and I want to continue to be able to do so. My bookmarks are not lost; I know they are in my library. But the system doesn't seems to allow me to leave them on permanently down the left side. Please help. I have Windows 7 64-bit and the latest version ofFirefox.

    Do you mean that the bookmarks sidebar (View > Sidebar > Bookmarks) gets disabled?
    Try:
    * http://kb.mozillazine.org/Corrupt_localstore.rdf
    * Press F10 or press and hold the Alt key down to bring up the "Menu Bar" temporarily.

  • Need to find out appropriate InfoObject of ERP fields

    Hi Gurus,
    I am unable to find out few InfoObjects of ERP fields. Following is a list:
    OBJNR        (Object number)
    PRJSTS       (Individual status of an object (short form))
    ASTNR        (Applicant number)
    PBUKR        (Company code for WBS element)
    ZUORD       (Network assignment)
    IMPRF          (Investment measure profile)
    ISIZE           (Investment Type)
    OTYPE        (Joint Venture Object Type)
    JIBCL          (JIB/JIBE Class)
    TIMESTMP   (Time created (Greenwich Meantime))
    WKGBTR    (Total Value in Transaction Currency)
    MVFLG       (Quantity Complete/Incomplete)
    TCODE        (Transaction Code)
    VORNA      (First Name)
    NACHN       (Last Name)
    Thanks,
    Sajjad

    Hi SAPBIAN,
    Thanks for providing me very helpful hint. Before I was trying SE16 using the provided table but no entries were showing but going through SE11 and the menu thing worked!
    However I have few questions:
    1- If I am unable to find table entries of any field, do I need to create Z InfoObject?
    2- If I see multiple A in OBJVERS column than which one to pick?
    3- If I see only D in OBJVERS, does it mean I need to install that InfoObject?
    Please advise.
    Thanks,
    Sajjad

  • How to find the location of a particular font in the framemaker book?

    Hi All,
    please help me in finding the location of a particular type of font in the framemaker book. I was using the following procedure to find out earlier:
    Find > Character Format > (set the character format) > Search.
    Now I am unable to locate a particular type of font using the mentioned procedure.
    Please help me out.
    Thanks in adnavce,
    Mindevil

    This assumes that the font instance being searched for is an override:
    Click in some text in one of the book files.
    Edit > Find/Change
    [ Character Format ...]
    This pops up a Character Format dialog.
    Assuming you are on Windows:
    [Ctrl]+[Shift]+[F8] to set everything to As-Is/blank.
    In Family:, select the font being sought. [Set]
    Back in the Find dialog...
    Look in: <*> Book
    [Find]
    If the font instance is part of a Paragraph Format or Character Format, you can search by Para Tag name or Char Tag name (which is yet another reason why overrides are a problem).
    Or you can save out all the book files as MIF and search with a plaintext editor, but that requires a nominal knowledge of MIF.
    I might add that steps 1-3 above are covered in FM7.1 Help (and presumably the printed manual back then), but are absent for FM9, and I'm guessing that they never returned in later versions either.

Maybe you are looking for

  • The attempt to connect to the server (IP address) on port 443 failed - OLT

    Hi all I am facing one problem, if i run load to any application for 100 users for 1 iteration then it is not showing any error. Lets say i ran the load of 100 users for one hour then for some users there are errors like Line: (script.java:84)][Scrip

  • What to do with 16GB of ECC ram

    I recently purchased a Quad off of ebay and i came with believe it or not 16GB or ram. Now im not going to brag about the killer deal i got, i was just wondering what i should do with it all. I at most need 4gb, thats what i run in my dual 2.7. I pri

  • Handling large messages with MQ JMS sender adapter

    Hi. Im having trouble handling large messages with a MQ JMS sender adapter. The messages are around 35-40MB. Are there any settings I can ajust to make the communication channel work? Error message is: A channel error occurred. The detailed error (if

  • Authorization issue after technical upgrade

    We just completed an uprade to BI 7.0 SP 15.  We only want to complete a technical upgrade and use the old security model. We have found that when users run queries against multi-providers they aren't authorized.  BEX states that the user doesnt have

  • How to organize nay files?

    I have a Server Client application that contains 30 .java files in a single package is there some good way to organize these files better? I was considering to make some more packages but is there some "official" way to organinze java applications of