Total quenties & total price

hi sap experts
        my requirement is to give report  for quantities Consumption on date bases  in mm ...
       in same date there 4 to 5 times they consumed ......so
        i want to  calculate  the  total Quantities  used and for that total price  for the particular date  they enter in input
is there any fm r we have to write code ?
how to write code ?
Thanks a lot
Moderator message : Spec dumping is not allowed, read forum rules before posting. Thread locked.
Edited by: Vinod Kumar on Sep 15, 2011 3:41 PM

Hi Donald,
I don't know if there's u standard way to integrate priceunit in final price but you can handle your own specific code when the items are transfered.
Use Badi BBP_CATALOG_TRANSFER (se18 or spro) to take the priceunit into account.
Best regards,
Laurent.

Similar Messages

  • Interactive Report Sub-total and total

    Hi friends,
    I have an employee interactive report with group by job name and also showing the salary sub-total for each and every job(group by).
    I have an requirement like to highlight the sub-total for each and every job with a background color so that the user can identify the sub-total with the color, and also whether it is possible to display an overall total @ last in the report with a label named "Total Salary" in which it calculates the overall salary is also to be highlightened with the background color.
    Also is it possible to display a text "Sub-total" besides each and every salary sub-total  of job(group by). Currently if we display a sum for the salary then im getting the total's but with out a text named total.
    Since i can see the highlighted feature in interactive report but im not sure how to apply it for the sub-total and total column.
    I have reproduced the example in apex.oracle.com
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    In the application 9494 named "test" in page1.
    Thanks in advance.
    Brgds,
    Mini

    Hi, Mini,
    style=background-color:red;
    But that Total region color dint change.The code for style should be in "Form HTML Element Attributes". However, this changes the background color only for the Total value not for the whole row.
    If you want to change for the whole row, you need to change the template that is selected for the region.
    I changed the region template in your application to "Borderless Region" and made the changes to the "Borderless Region" template, it now shows the background color for Total Value.
    <table class="t20Region t20Borderless #REGION_CSS_CLASSES#" id="#REGION_STATIC_ID#" border="0" cellpadding="0" cellspacing="0" summary="" #REGION_ATTRIBUTES#>
    <thead><tr><th class="t20RegionHeader" id="#REGION_STATIC_ID#_header">#TITLE#</th></tr></thead>
    <tbody id="#REGION_STATIC_ID#_body">
    <tr><td class="t20ButtonHolder">#CLOSE##PREVIOUS##NEXT##DELETE##EDIT##CHANGE##CREATE##CREATE2##EXPAND##COPY##HELP#</td></tr>
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>
    </tbody>
    </table>The below does the trick. :)
    <tr><td class="t20RegionBody" style="background-color:orange">#BODY#</td></tr>Note: I made the changes to "Borderless Template", but you can copy the template to your own and apply this change.
    Regards,
    Natarajan

  • Sub-total and Total for a column having checkboxes in WD ABAP ALV

    Hello Experts,
    I have used ALV in We bdynpro ABAP to display my output. There are 2 columns that are checkboxes in Output. I want a sub-total and total for those two columns. I know tht total and sub-total functionality is available only for numeric fields .
    Is there any other indirect way by which i can achieve the same ?

    Hi Ragini,
    Please refer this thread: [alv total and subtotal|How to display graphs;.
    I hope it helps.
    Regards
    Arjun

  • Percentage in Totals / Grand Totals

    I have 2 columns on a report (in reports builder) that have numbers - total touched & total count. I am calculating the percentage done with the following formula: ROUND(((PP_TOUCHED / PP_TOTAL) * 100),2). This works fine for the detail lines, but I can't get the correct percentage in the grand totals.
    Also, when I use the above formula and one of the numbers is zero, I get an error.
    Kris

    I have 2 columns on a report (in reports builder)
    that have numbers - total touched & total count. I
    am calculating the percentage done with the following
    formula: ROUND(((PP_TOUCHED / PP_TOTAL) * 100),2).
    This works fine for the detail lines, but I can't
    get the correct percentage in the grand totals.How are you calculating the percentage for grand total? Create a formula column at report level and use summary columns in the formula to calculate percentage.
    Also, when I use the above formula and one of the
    numbers is zero, I get an error.
    It may help:
    ROUND(decode(nvl(PP_TOTAL,0),0,((PP_TOUCHED / PP_TOTAL) * 100)),2)

  • Sub totals and Totals

    I am developing a query using SQVI.
    How do I insert subtotals and totals for certain fields at the end of the query report.
    Thanks
    Sandeep

    hI SANDEEP  .....
    if you  go with  layou mode   then    there will be   3  pops  like   delete  ,  TOOL BAR  , SORT FIELDS ....etc ..
    there is  TOOL BAR   with the following  options   ...
    Background
    Heading
    Normal
    <b>Subtotals</b>
    Key Columns
    Positive
    Negative
    Control Levels
    Background (intensified
    Header (intensified)
    Normal (intensified)
    Sum totals (intensified
    Keys (intensified)
    Positive (intensified)
    Negative (intensified)
    Control lev.(intensifie
    so  that  by selecting the  fields   .....  liek sub total   acrros the  Fiscal  year  can be done  ....  Document wise   sub total  ..... vendor wise   , customer wise  ... like  based  on the fields   selection for sub total  and   total can  be  done ...
    Girish

  • Calculation of Vat On total amt(Basic price+Exices duty+Freight condition)

    Dear friends,
                       My client requirement is that the Vat should calculate on total amount including freight condition while creating PO that is
    Basic price=100
    ED 10%=10
    cess on ED 2%=2
    Total amount=112
    Freight=20
    Total amount after adding Freight=132
    Vat 4% should calculate on total amount=5.28
    Total amount=137.28

    Hi Mallinath,
    Actually in PO it will not calculate including freight. i suggest do not change the pricing. instead wat u can do is add freight in PO and at the time of Bill verification, choose goods/services & planned dely costs. system wil give a seperate line for delivery costs(freight), put a seperate tax code ( VAT 4%) and simulate. you wil get the results as per ur requirement.
    Regards,
    Girish

  • ALV grid total andsub-total

    hi there...I know there´s a lot of posts about this subject but i didn't find what i´m looking for...
    I want to know if there´s some way to give a total and a sub-total of a field, but instead of the total and subtotal sums I just want a count of the number of rows for the field that I've sorted.
    FIELDCATALOG-FIELDNAME   = 'BUKRS'.
      FIELDCATALOG-SELTEXT_M   = 'BUKRS'.
      FIELDCATALOG-COL_POS     = 0.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'BUTXT'.
      FIELDCATALOG-SELTEXT_M   = 'BUTXT'.
      FIELDCATALOG-COL_POS     = 1.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'LIFNR'.
      FIELDCATALOG-SELTEXT_M   = 'LIFNR'.
      FIELDCATALOG-COL_POS     = 2.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'NAME1'.
      FIELDCATALOG-SELTEXT_M   = 'NAME1'.
      FIELDCATALOG-COL_POS     = 3.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MBLNR'.
      FIELDCATALOG-SELTEXT_M   = 'MBLNR'.
      FIELDCATALOG-COL_POS     = 4.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MJAHR'.
      FIELDCATALOG-SELTEXT_M   = 'MJAHR'.
      FIELDCATALOG-COL_POS     = 5.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'CPUDT'.
      FIELDCATALOG-SELTEXT_M   = 'CPUDT'.
      FIELDCATALOG-COL_POS     = 6.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'BUDAT'.
      FIELDCATALOG-SELTEXT_M   = 'BUDAT'.
      FIELDCATALOG-COL_POS     = 7.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'USNAM'.
      FIELDCATALOG-SELTEXT_M   = 'BUDAT'.
      FIELDCATALOG-COL_POS     = 8.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MENGE'.
      FIELDCATALOG-SELTEXT_M   = 'MENGE'.
      FIELDCATALOG-COL_POS     = 9.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'DMBTR'.
      FIELDCATALOG-SELTEXT_M   = 'DMBTR'.
      FIELDCATALOG-COL_POS     = 10.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    *          SORT
      WA_SORT-SPOS = 1.
      WA_SORT-FIELDNAME = 'BUKRS'.
      WA_SORT-TABNAME = 'ITAB'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-SPOS = 2.
      WA_SORT-FIELDNAME = 'LIFNR'.
      WA_SORT-TABNAME = 'ITAB'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
    in the alv i want to know the number of rows for each value of lifnr (sub-total) and in the end the total of the all values of lifnr
    thanks

    Hi,
    It is better to obtain this information not in ALV but working on the table. Using control level processing it is easy to achieve.
    data: begin of it_overview occurs 0
              lifnr type ..
              tot_item type i,     "number of lifnr withing subtotal
            end of it_overwiev.
    data: pos type i.   "to remember the position.
    "your output table
    Loop at it_ouptut.
       at new lifnr.
          pos = sy-tabix.    "remember first position of new LIFNR
       endat.
       at end of lifnr.
          it_overview-lifnr = it_output-lifnr.
          it_overview-tot_item = sy-tabix - pos.    "calculate how many within one LIFNR
          append it_overview.                             "store it in the table
           clear pos.
       endat.
    endloop.
    this way table IT_OVERVIEW stores LIFNRs and number of items forming their subtotals.
    To get total use:
    DESCRIEBE TABLE it_output.
    it_output-lifnr = 'TOTAL_ITEMS'.    "total items within all LIFNRs
    it_output-tot_item = sy-tfill.            "is equal to total lines in the table
    append it_output.
    Regards
    Marcin

  • How to calculate Sub-Totals/Grand Totals on repeating row.

    I have a this form that I need to calculate to produce a Sub-Total....  An end user can keep adding a line item but I would like to be able to add the amounts entered to calculate in a sub-total field.  So basically, I need help with the actual script that would total the amount calculated from a Quantity*Amount  which is -->"Sub Total" column then taking all of those to a new calculating script down to the "Sub-Total" field below it.  I probably should rename them because its too similar..  I've tried the recommended scripts from the forums but just could not get it to work.
    Excuse my editing...but this is what it looks like.  If i need to clean it up so it looks more consistent please let me know if you have any advice.  I just started working on acrobat forms 2 days ago and my eyes have gone blurry from reading the help forums
    and here's the javascript on my "Sub-Total" (Which should probably be renamed to "Total" and my "Total" to "Grand Total".  Any help would be much appreciated.  Thanks!

    Try the LiveCycle Designer forums...

  • Sum values to display total (running total)

    I apologize for posting such a rudimentary question but I haven't been able to find an answer by searching the forum.
    Basically, I have several sensor inputs that are all factored into an equation that yeilds heat output (btu/hour). I need to take this value, which I have iterating once every second, and add it to itself every time it increments. In other words, say the first value is 10 (btus), the next second the value is 16, the code calculates and displays a value of 26 on the front panel and waits for the next second (or whatever iteration I choose) at which time it will add the new value to the running total.
    Thanks for your input
    Jake 
    Solved!
    Go to Solution.

    The Loopback function (<--) is basically a miniature shift register.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Sub-totals and Totals calculations....?

    How to Calculate the Sub-totals and Grand totals in ABAP Programs.

    Hi Bhaskar,
    In my opinion this can be acheived in two ways:
    1. Using ALV GRID DISPLAY
    2. Using AT NEW  , ON CHANGE OF  , etc events.
    1. In the ALV field catalogue u create entries for all the fileds to b
    displayed in the output list.
    Here, we need to put DO_SUM = 'X' .
    eg
      ****************fieldcatalog*********************
    data:anytab type slis_t_fieldcat_alv with header line.
    **************pgm name**********************
    data:anypgnm type sy-repid.
    **************events*************************
    anytab-fieldname   = 'MATNR'.
      anytab-seltext_m   = 'Material Number'.
      anytab-col_pos     = 0.
      anytab-outputlen   = 20.
      anytab-emphasize   = 'X'.
      anytab-do_sum = 'X' .                  <----
    here it is.
      append anytab to anytab .
      clear  anytab .
    Now wen u call the fm REUSE_ALV_GRID_DISPLAY , plz pass anytab ie fieldcatalog  and  the tabel with records to  b displayed .
    this would  sum the fields at the end.
    2.  Alternately ....for SUb-totals ;
       Sort itab in an ascending manner.
    Data : wa_itab    like line of itab,
              wa_subtotal type i.
    " fieldname1 in itab is the key field
    " fieldname2 is the value field
    LOOP at itab into wa_itab .
      wa_subtotal = wa-subtotal  + itab-<fieldname2>.
      AT END OF <fieldname1> .
          " your programming logic for subtotal
           Write :/ wa_itab-fieldname1 , wa_subtotal.
           Clear  wa_subtotal.
       ENDAT.
       " write :/  ....if u need to write any lofgic values ....
    ENDLOOP .
    Note : plz sc if a field in itab that is left of fieldname1 changes
              the AT END OF event is triggered.
             Therefoe , see that  pur key fields towards left in itab.
    FYI : u can try ON CHANGE OF....ENDON....
                          AT NEW .....ENDAT
                           AT LAST....ENDAT
                           AT FIRST ......ENDAT  events for ur own understanding
    i hope this helps u.
    Regards
    panakj

  • Sub totals& grand totals

    Dear All,
    I need to calculate sub totals then group totals and grand totals.
    ex
    x y z Val1 val2 val3
    x1 y1 z1 10 20 30
    x1 y1 z2 10 20 30
    x1 y2 z3 10 20 30
    Req Format
    x y z Val1 val2 val3
    x1 y1 z1 10 20 30
    x1 y1 z2 10 20 30
    y1 sum 20 40 60
    x1 y2 z3 10 20 30
    x1(sum) 30 60 90
    for that one where i need to make changes while in query in data set Or in template
    Awaiting for reply
    Subbu...

    Yes. I also wanna know how to do it. Would you pls point out an instruction for us? I read <<Oracle Business Intelligence Publisher B40017>> intensively. But I cann't find out any clue in it yet.
    I'm very urgent. Can you tell us how to do it?

  • What's the best way to create sub-totals & grand-total in SQL2008 R2 (and beyond)?

    What is the easiest way to get sub totals and a grand total on data that is being grouped?  It looks like RollUp might work, but it's being depreciated.
    My query is:
    SELECT
    COMPANY
    ,INVSTR_CD
    ,STATE_C
    ,SUM(CO_SHARE_TOTBAL) as CO_SHARE_TOTBAL
    FROM #ASSET AS A
    WHERE A.D_GETIT = 'Y'
    GROUP BY COMPANY, STATE_C, INVSTR_CD
    ORDER BY COMPANY, INVSTR_CD, STATE_C
    I need to provide a sub-total of the SUM'd field (SUM(CO_SHARE_TOTBAL) as CO_SHARE_TOTBAL), at the change of the COMPANY field.
    Then a Grand Total of all the SUM'd fields (SUM(CO_SHARE_TOTBAL).
    Thanks in advance!!
    -Al H

    If you post DDL of your table (only relevant columns) and some data and desired output, I may try to reproduce it. Did you check Jacob's blog post and the very last query? It does take a few trials before getting this correct. 
    Naomi,
    I did try the last query on Jacob's post.  I couldn't get the first column to populate.
    Thanks for the offer of help.
    DML is:
    Create Table #ASSET2 (
    [COMPANY] [varchar] (5) NULL
    ,[INVSTR_CD] [varchar](5) NULL
    ,[STATE_C] [char](2) NULL
    ,[SHARE_TOTBAL] [decimal] (15,2) NULL)
    Data is:
    Insert into #ASSET2 VALUES ('00000','099 ','FL','115226.77')
    Insert into #ASSET2 VALUES ('22222','030 ','CA','309899.43')
    Insert into #ASSET2 VALUES ('00000','010 ','CA','524296.89')
    Insert into #ASSET2 VALUES ('00000','099 ','IL','51699.70')
    Insert into #ASSET2 VALUES ('00000','789 ','PA','90856.04')
    Insert into #ASSET2 VALUES ('22222','010 ','CA','66951.33')
    Insert into #ASSET2 VALUES ('00000','099 ','CA','310046.03')
    Insert into #ASSET2 VALUES ('00000','010 ','AZ','178062.08')
    Insert into #ASSET2 VALUES ('00000','099 ','NY','278489.10')
    Desired results would be the following:
    COMPANY INVSTR_CD STATE_C SHARE_TOTBAL
    00000 010 AZ 178062.08
    00000 010 CA 524296.89
    00000 099 CA 310046.03
    00000 099 FL 115226.77
    00000 099 IL 51699.70
    00000 099 NY 278489.10
    00000 789 PA 90856.04
    TOTAL COMPANY 00000 1548676.61
    22222 010 CA 66951.33
    22222 030 CA 309899.43
    TOTAL COMPANY 22222 376850.76
    GRAND TOTAL 1925527.37
    -Al H

  • Script: Sub totals & Grand Totals.(Urgent)

    Hi Gurus
                   im developing a invoice billing. for this i need hw to get sub totals and grand totals at the last page in my main window . what should be given in the text elements and in the SE 38 part.please help me with this its very urgent.
    correct answers are fully rewarded.
    thanks in advance.
    thanks & regards.
    sirish.

    If you want your totals in fixed place than you need to create a new window and element inside it.
    If you want just after the finishing of the main data than you can create a element in MAIN window and call it with the call FM WRITE_FORM.
    Here is the small example:
    DATA: W_SUM TYPE VBRP-NETWR.
    START-OF-SELECTION.
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          APPLICATION = 'TX'
          DEVICE      = 'PRINTER'
          DIALOG      = 'X'
          FORM        = 'ZTEST_NP'
          LANGUAGE    = SY-LANGU.
      DO 3 TIMES.
        W_SUM = W_SUM + SY-INDEX.  " << sum
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT = 'MAIN'
            WINDOW  = 'MAIN'.
      ENDDO.
    * Fixed window for SUM
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          ELEMENT = 'LAST'
          WINDOW  = 'LAST'.
      IF SY-SUBRC <> 0.
      ENDIF.
      CALL FUNCTION 'CLOSE_FORM'
    Regards,
    Naimesh Patel

  • Navigation Target in Sub-Totals or Totals

    Hi All,
    I have a very typical report like this:
    Region |SubRegion | Q1 | Q2
    Reg1 Sub1 xx yu
    Sub2 zx ys
    Total Reg 1: xxx xxx
    etc etc
    I can add a navigation target link to another report to the Q1 and Q2 values, but I can't add a link in the Total Reg Values...
    Is this possible??
    Thanks,
    Alejandro

    Hi,
    I think you should do something like this:
    - Create two placeholders: &FIRST_COL and &SECOND_COL;
    - Initialize the two placeholders in the BeforeReport:
    e.g. IF (:P_COLUM = '1') THEN
    &FIRST_COL = column1;
    &SECOND_COL = column2;
    ELSE
    &FIRST_COL = column2;
    &SECOND_COL = column1;
    END IF;
    - Define your query in this way:
    SELECT &FIRST_COL firstCol,
    &SECOND_COL secondCol
    FROM TAB_COL;
    Then you can group on firstCol and you can use it to calculate sub totals.
    Hope this helps you.
    Bye
    Raffy

  • Quickfilter -toggle total emails/total conversations selected/in a folder? Workaround

    At the top of the preview pane there used to be a total of all the emails selected in the email list pane. This has mysteriously changed to total CONVERSATIONS. How can I change this back to show the total emails? Is there some way to topple them?
    Partially solved - the messages total is in a different place! It's above the preview pane beside the filter box… The total only shows when the filter is used, so to get the total number of messages in the folder I simply search for . Which of course is in all email addresses. (It doesn't show the number of emails if they are manually selected, but probably no big deal.)
    Posting this for others who may have same question:-) Thanks!

    At the top of the preview pane there used to be a total of all the emails selected in the email list pane. This has mysteriously changed to total CONVERSATIONS. How can I change this back to show the total emails? Is there some way to topple them?
    Partially solved - the messages total is in a different place! It's above the preview pane beside the filter box… The total only shows when the filter is used, so to get the total number of messages in the folder I simply search for . Which of course is in all email addresses. (It doesn't show the number of emails if they are manually selected, but probably no big deal.)
    Posting this for others who may have same question:-) Thanks!

Maybe you are looking for