Month wise Total

Hi alll
I want month wise summary total. How can i calculate.my datas r in internal table. how can i calculate. Internal table structre
date
amount,
sales organisation,
etc.

HI muthu,
1. U have one internal table ITAB
   with all records.
2. Make one more STAB
  with
  fields -
  a) MONTH
  b) TOTAL
  (the month field and total numeric field
   should be same as ITAB)
3. then just do this.
4. LOOP AT ITAB.
   MOVE-CORRESPONDING ITAB TO STAB
   COLLECT STAB.
   ENDLOOP.
5. In STAB u will get all the TOTALS, month wise only.
regards,
amit m.

Similar Messages

  • GRR3 report is not showing cost centers monthly wise totals

    Hi,
      we are having cost center report for full year company code currency report which was working in R3 system. after upgrade it is not showing monthly wise total currency values but when drill down it to actual line item level it is showing all totals. can anybody hlep me to identy issue.
    Thanks,

    Dear Venu
    Check any other standard summarisation report and see whether they are giving data or not. If not you need to implement note 1817039 to fetch summarisation data. But before that I suggest once again you do data collection upto the period and try running your report.If no success then read the note and apply it.
    Regards
    Rajneesh Saxena

  • Year wise total

    Hi i am getting data for month wise..
    month wise diffrent data is coming ...
    i want to sum year wise total based on month wise total..
    how can i do this...

    As a sample code...i given here..
    give your code too..
    data: yr(4) type c,
    sum(10) type p decimals 2.
    sum = 0.
    sort itab by mdate.
    loop at itab into wa.
    sum =  sum + amount.
    at end of mdate+0(4).
    write:/ sum.
    sum = 0.
    end at.
    endloop.
    Message was edited by:
            Ramu

  • Display total dmbtr according to mat type and month wise

    hi all,
    i want to display total dmbtr according to mat type and month wise. like
    month       mat.type  total_dmbtr
    jan 2008   fert           xxxxxxxxxx
    jan 2008   mcfe         yyyyyyyy
    feb 2008  fert  mmmmm

    this is my prog..but am gettin o/p for one month irrespective of material type..
    tables : mseg, mkpf, mara, S031.
    ********************DECLARATION******************************************
    types : begin of ty_mkpf,
            budat type budat,
            mblnr type mblnr,
            end of ty_mkpf.
    TYPES : BEGIN OF TY_S031,
            WERKS TYPE werks_d,
            SPMON TYPE SPMON,
            matnr TYPE matnr,
            END OF TY_S031.
    types : begin of ty_mseg,
            mblnr type mblnr,
            matnr type matnr,
            werks type werks_d,
            menge type menge_d,
            dmbtr type dmbtr,
            bwart type bwart,
            end of ty_mseg.
    types : begin of ty_mara,
            matnr type matnr,
            mtart type mtart,
            end of ty_mara.
    data : it_mkpf type ty_mkpf occurs 0 with header line,
           it_mseg type ty_mseg occurs 0 with header line,
           it_mara type ty_mara occurs 0 with header line,
           IT_S031 TYPE TY_S031 OCCURS 0 WITH HEADER LINE.
          it_final TYPE ty_final OCCURS 0 WITH HEADER LINE.
    data : flag type dmbtr,
           flag1 type dmbtr ,
           flag3 type dmbtr ,
           flag4 type dmbtr,
           flag5 type dmbtr,
           flag6 type dmbtr,
           flag7 type dmbtr,
           f1 type i VALUE 0,
           num_of_loops TYPE i VALUE 0,
           flag2 TYPE spmon.
    **********************************INITIALIZATION***************************
    flag  = 0.
    flag1 = 0.
    flag3 = 0.
    flag4 = 0.
    flag5 = 0.
    flag6 = 0.
    flag7 = 0.
    ******************selection screen*****************************************
    selection-screen begin of block b1 with frame title txt_001.
    select-options : plant for S031-werks,
                     month for S031-SPMON.
                    date for mkpf-budat. "+4(2).
                    MONTH FOR MONTH_NAMES_GET.
    selection-screen end of block b1.
    flag2 = month-low.
    f1 = month-high - month-low.
    if month-high is initial.
      num_of_loops = 1.
    else.
      num_of_loops =  f1 + 1.
    endif.
    start-of-selection.
      perform getdata1.
    *&      Form  get_data
          text
    form getdata1.
    if month-high is INITIAL.
    write : / 'for month  ' COLOR COL_GROUP, flag2 COLOR COL_GROUP.
      Select WERKS SpMON matnr from S031 into corresponding fields of table it_S031
      where SpMON = flag2 AND WERKS IN PLANT.
       loop at IT_S031.
         at first.
            write : /5 'mat_num', 20 'month', 40 'QTY',58'amt',68'movement_type', 85'mat_type'. ",105 'qty remaining'.
            skip.
         endat.
      select single mblnr werks matnr menge dmbtr bwart from mseg into corresponding fields of it_mseg
        where werks = IT_S031-werks and ( bwart = '102' or bwart = '101' or bwart = '601' or bwart = '602' )
          and matnr = it_s031-matnr.
        if it_mseg-bwart = '101'.
          flag = flag + it_mseg-dmbtr.
        elseif it_mseg-bwart = '102'.
          flag1 = flag1 + it_mseg-dmbtr.
        elseif it_mseg-bwart = '601'  .
          flag4 = flag4 + it_mseg-dmbtr.
        elseif it_mseg-bwart = '602'  .
          flag5 = flag5 + it_mseg-dmbtr.
        endif.
        flag3 = flag - flag1. "101-102
        flag6 = flag4 - flag5. "601-602
        select SINGLE matnr mtart from mara into corresponding fields of  it_mara
          where matnr = it_mseg-matnr. " and mtart = 'FERT' .
       loop at it_mara.
          write : / it_mara-matnr,20  IT_S031-SPMON, it_mseg-menge, it_mseg-dmbtr, 70 it_mseg-bwart, 88 it_mara-mtart.
          skip.
        endloop.
      endloop.
      skip 1.
      write : / 'TOTAL QTY RECVD (a = 101-102)      ' , flag3.
      write : / 'TOTAL QTY CONSUMED ( b = 601-602)  ' , flag6.
      flag7 = flag3 - flag6.
      write : / 'QTY REMAINING (a-b)                ' , flag7.
    skip 2.
    flag  = 0.
    flag3 = 0.
    flag4 = 0.
    flag5 = 0.
    flag6 = 0.
    flag7 = 0.
    flag2 = flag2 + 1.
    endif.
      do num_of_loops times.
      if not flag2 gt month-high.
        write : / 'for month  ' COLOR COL_GROUP, flag2 COLOR COL_GROUP.
      Select WERKS SpMON matnr from S031 into corresponding fields of table it_S031
      where SpMON = flag2 AND WERKS IN PLANT.
       loop at IT_S031.
         at first.
            write : /5 'mat_num', 20 'month', 40 'QTY',58'amt',68'movement_type', 85'mat_type'. ",105 'qty remaining'.
            skip.
         endat.
      select single mblnr werks matnr menge dmbtr bwart from mseg into corresponding fields of it_mseg
        where werks = IT_S031-werks and ( bwart = '102' or bwart = '101' or bwart = '601' or bwart = '602' )
          and matnr = it_s031-matnr.
        if it_mseg-bwart = '101'.
          flag = flag + it_mseg-dmbtr.
        elseif it_mseg-bwart = '102'.
          flag1 = flag1 + it_mseg-dmbtr.
        elseif it_mseg-bwart = '601'  .
          flag4 = flag4 + it_mseg-dmbtr.
        elseif it_mseg-bwart = '602'  .
          flag5 = flag5 + it_mseg-dmbtr.
        endif.
        flag3 = flag - flag1. "101-102
        flag6 = flag4 - flag5. "601-602
        select matnr mtart from mara into corresponding fields of table it_mara
          where matnr = it_mseg-matnr. " and mtart = 'FERT' .
        loop at it_mara.
          write : / it_mara-matnr,20  IT_S031-SPMON, it_mseg-menge, it_mseg-dmbtr, 70 it_mseg-bwart, 88 it_mara-mtart.
          skip.
        endloop.
      endloop.
      skip 1.
      write : / 'total recd qty (a = 101-102)       ' , flag3.
      write : / 'total Qty consumed ( b = 601-602)  ' , flag6.
      flag7 = flag3 - flag6.
      write : / 'Qty remaining (a-b)                ' , flag7.
    skip 2.
    flag  = 0. flag3 = 0. flag4 = 0. flag5 = 0. flag6 = 0. flag7 = 0.
    flag2 = flag2 + 1.
    endif.
    enddo.
      endform.                                                    "getdata1

  • Monthly wise sales report

    hai,
         i m working on sales report where in i need to get month wise sales of the products and the related cost incured to company by the sales in the matrix form as shown below  can u help me in which way can i get this monthly report
              march     april     may   june    july......feb
    mtrl    25            30         0       19      23   ........(mtrl quantity)
    cost   30000     15000      0      45000  ..........(amt in rs)
    where in the above i m able to get yearly sales in one column (i.e i m able to show for one particular customer total sales in one column) but i m unable to split sales monthly and unable to show in a report so how can i able to sow in this matrix form

    Dear Raj,
    Please find the code for monthly wise report in PA0001 Table for calculation of Administrator time Recording.
    http://scn.sap.com/message/14216250#14216250

  • How to get the count monthly wise

    Hi All
    I have lot of order dispatched in a year 2010, how to get the moth wise total.
    For example jan 1000 orders ,feb 2500 orders.
    Thanks & Regards
    Srikkanth.M

    Pleiadian wrote:
    Maybe even
    b.schedule_ship_date between to_date('2010','YYYY') and to_date('2011','YYYY');)But this could return schedule ship dates that are 01-Jan-2011 00:00:00. I don't think this is wanted since it was not specified in the original requirement. I'm not even sure if to_date('2010','YYYY') returns 01. Feb.2010 in a few days (when we will have february).
    Just checking the docs....
    found it: http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#SQLRF51062
    from the docs:
    If you specify a date value without a time component, then the default time is midnight (00:00:00 or 12:00:00 for 24-hour and 12-hour clock time, respectively). If you specify a date value without a date, then the default date is the first day of the current month.Just to be on the safe side always give the complete format mask!
    b.schedule_ship_date >= to_date('01012010','DDMMYYYY')
    and b.schedule_ship_date < to_date('01012011','DDMMYYYY')Edited by: Sven W. on Jan 17, 2011 5:14 PM

  • Stock report with value and qauntity for given date not month wise

    Hi gems,
    can any body give me the standard report for Stock value and qauntity for given date not month wise at storage location level

    Hi
    check the report S_P00_07000139 with the option inventory and raw material report- detail and selection date (from, to date same). List will give opening & closing balances with goods movment and their values.
    Thanks

  • XML Publisher - Page Wise Total

    We are facing problem in incorporating ‘Page Wise Total’ in Invoice Report - Invoices print at format CAP_ETA for Germany. It an XML Report and its output appear in PDF format. As per the new requirement sent by L1 team, we are required to make changes in RTF, to show ‘Page Wise Total’.
    We have worked on this enhancement but unable to display ‘Page Wise Total’. We are able to display Sum Total of all the records appeared in three different blocks of records for that particular page at the end of the footer of Page, but not yet able to SUM UP total of these three Sum Total of three different blocks on that particular page.
    For e.g. First page of my XML Report display three different Block of data as shown below with Subtotal of 38,600.00, 4,453.47 for 1st and 2nd Block respectively, but 3rd block records appeared partially on the first page and remaining appeared on the next page. So My Report should display ‘Page Wise Total’ or ‘Amount Forward’ as 52853.47, which sholud be carried forward to next page as ‘Amount Forward’ - 52853.47. The next page/second page will dispaly the remaing line records of the 3rd block and Subtotal( Please see attachment New_Layout_Invoice_TUM_English.doc)
    Name Description Unit Quantity Price Amount in Euro
    Rösner Fees Day 17.00 1,400.00 23,800.00
    Schreiber, Clemens Fees Day 2.00 1,400.00 2,800.00
    Slegers, Arnd Fees Day 4.00 1,400.00 5,500.00
    Weiler, Andreas Fees Day 4.00 1,400.00 6,400.00
    Subtotal: 27.00 38,600.00
    Römer, Michael Expenses 2,253.79
    Schreiber, Clemens Expenses 157.69
    Slegers, Arnd Expenses 519.78
    Weiler, Andreas Expenses 1,522.21
    Subtotal: 4,453.47
    Rösner, Michael Travel expenses 2,400.00
    Schreiber, Clemens Travel expenses 2,000.00
    Siegers, Arndt Travel expenses 1,800.00
    Weiler, Andreas Travel expenses 2,000.00
    Marek, Gruchala Travel expenses 1,600.00
    Amount forward 52853.47
    As mentioned above we are able to show independently three different Page Wise Total of each of these blocks by using syntax:
    <?add-page-total:block1amount;’L_AMOUNT’?>, this syntax is used to sum up all the line records appeared in a block for a particular page and
    <?show-page-total: block1amount;’#####.##0,000’;’ ###.##0,000)’?> is used to display the Sum Total calculated by above syntax.
    But we are not able to further sum up all these Page Wise Total of different blocks.
    Please find attached copy of RTF file from Production (V18_CAR253E1), copy of RTF (V18_CAR253E1_TEST Where we are testing these new changes) and .out XML output file.
    I need help on this issue
    Thanks & Regards,
    Praveen S Negi
    [email protected]
    91-09930799325

    Hi Praveen,
    You got the solution for page total in Invoice Report in XML publisher report.
    Can you pls help regarding the same, i want to display total amount in the invoice report.
    Thanks in advance,
    Sunny

  • Display schedule qty - Month wise in ALV Grid

    Hi Experts,
    I have a requirement to display the schedule line quantities month wise in ALV  Grid. The columns sholud be dynamic columns based on the input date range. I got some idea about how to create dynamic ALV but it is not clear to implement in my requirement.
    Please Guide me in achiving the same.
    Example:
    Jan 2011      Feb 2011     March 2011
    100               2000            300
    Thanks&Regards,
    Karthik

    Hi.,
    Create field catalog dynamically as like this.,
    select-options s_date for sy-datum.
    data: n type i,
          count type i,
          cnt type string,
          field type string,
          descr type string.
    DATA: m TYPE t247-mnr,
          month_name type char10,
          m1 type i.
    n = s_date-high+4(2) - s_date-low+4(2) .   " getting number of months
    m1 = s_date-low+4(2).
    m = m1.
    n = n + 1.
    DO n TIMES.   " building field catalog dynamically
      m = m + 1.
      count = count + 1.
      cnt = count.
      concatenate 'FIELD' cnt into field.
      CALL FUNCTION 'ISP_GET_MONTH_NAME'    " FM to get month name
          EXPORTING
            LANGUAGE           =  sy-langu
            MONTH_NUMBER       =   m
         IMPORTING
    *    LANGU_BACK         =
           LONGTEXT           =  month_name .
      concatenate month_name s_date-low+0(4) into descr separated by ''.
      wa_fieldcat-col_pos = count.
      wa_fieldcat-row_pos = '1'.
      wa_fieldcat-fieldname = field.
      wa_fieldcat-seltext_m = descr.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    ENDDO.
    After this create dynamic table using,
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = t_fldcat
        IMPORTING
          ep_table        = t_newtable.
    then loop the internal table and assign the component to final internal table,.
    like .,
    CONCATENATE 'FIELD' index INTO  fieldvalue.     " do same like fieldcatalog
        ASSIGN COMPONENT  fieldvalue   OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
        <fs_fldval> = wa-fieldvalue.
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Display data in month wise

    Hi all,
    I have my data in the table as date wise. I need to sum this data in month wise.
    Can anyone tell me how to do it. Is their any fm to do it or any sample pgm of this kind.
    For ex my output should be like this :
    field1 field2 Month1 Month2 Month3 Month4 ..
    Waiting for reply,
    Regards,
    Priya

    hi priya,
    First of all sort the whole set of values as per date wise into an internal table.
    Sort the table as per the date .
    CONCATENATE PR_MONTH '01' INTO W_FIRST_DATE.
            CALL FUNCTION 'LAST_DAY_OF_MONTHS'
              EXPORTING
                DAY_IN            = W_FIRST_DATE
              IMPORTING
                LAST_DAY_OF_MONTH = W_LAST_DATE
              EXCEPTIONS
                DAY_IN_NO_DATE    = 1
                OTHERS            = 2.
            IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
                  W_DATE = W_FIRST_DATE.
    With this try to determine the first and last days of the month
    From where u want to start .
    Capture the month field from date field into pr_month.
    Set the first date of the month to 01 like 02/01/2006
    Suppose u had 02/02/2006 as the first occurance of the date then
    U r trying to determine the first date and last date of ur feb month for the year 2006 .
    Now 02/01/2006 and 02/28/2006 are determined by this process .
    Set date_low  = 02/01/2006 .
        Date_high = 02/28/2006.
    Now into ur select statement capture the fields between 02/01/2006 and 02/28/2006 just like range .
    U can use select between or range
    ,so this covers all the fields for feb ,
    Use collect on ur final output table which will give u the final sum values.
    Now next field is say 03/10/2006 , then use the same process to capture the values .
    Itab say is containg date fields
    Logic is
    Loop at itab.
    Month = itab-date+(x)
    At new month.
       Perform operation .
    Endat.
    Endloop.

  • Display information on Month wise

    We have one requirement and we need to display the Month wise information on the report (Sysdate - 1, sydate -2 ....etc)
    for example today is 08 Sept 2011 In template level we need to display below
    Sept 2011 Aug 2011 Jul 2011 Jun 2011 May 2011 Apr 2011
    Please let me know if it's possible to do in RTF Template.

    Pull all the required date and data from DB using queries,.

  • Month wise display

    Hi
    I have a requiement , I need to display a report which will give sales target and Actual , month wise for respective sales representative
    the format is as follows
    Sales Representative Jan           feb        upto Dec
                        target Actual  target Actual
    I have a ODS which will give the Actual Fig and I am using a flat file to upload the target values into another ODS
    I will use a Infoset or multiprovider to merge it
    Pl suggest how to go about it ?
    I mean do I need to create 12 Target Infoobjects(Key Fig)
    and how i will do mapping and  compare month wise target and actual values
    regrds
    kisholoy

    Hi kisholoy,
    According to me u need not to have separate ODS for the Target figures, u can have the target data into the Actual figure ODS with different infosource arrangement for the Target figures.
    I have done such thing previously and it works fine in the same situation.
    Well at a reporting side u can keep Sales representative in selection so that viewer can see report for the perticular sales representative or can see for all sales representative.
    For this arrangement follow the things i have mentioned hereabove.
    1. create a structure for the months in a year. PS: Also put Fiscal year in Selection. (Put this fiscal year and sales representative in the Free characteristics.)
    2. Show Text and key for sales representative by ticking ovet this display option in the properties.
    3. Go in the Columns create strcture for actual and target figures.
    Thus ur query is ready. Do some additional settings as per custemer need.
    Hope it helps.
    Assign the points if it works.

  • Month-wise break.

    Hi,
    I have a requirement as follows :-
    The user will submit the start date and end date. Based on the date parameters, the customized procedure should do some calculations month-wise.
    For eg : start date - 01-Dec-2012 to end date - 31-Mar-2013
    I want the break up as
    Start date End date
    01-dec-2012 31-dec-2012
    01-jan-2013 31-jan-2013
    01-feb-2013 28-feb-2013
    01-mar-2013 31-mar-2013
    How can i achieve this month-wise break ?
    Regards,

    Hi,
    There are no DATE bind variables, at least not in SQL*Plus.
    You can use VARCHAR2s to pass the start and end dates, like this:
    VARIABLE  start_date     VARCHAR2 (11)
    VARIABLE  end_date     VARCHAR2 (11)
    EXEC     :start_date := '02-Dec-2012';
    EXEC      :end_date   := '31-Mar-2013';
    WITH      got_months   AS
         SELECT  TRUNC ( TO_DATE (:start_date, 'DD-Mon-YYYY')
                    , 'MONTH'
                    )          AS first_month
         ,       TRUNC ( TO_DATE (:end_date,   'DD-Mon-YYYY')
                    , 'MONTH'
                    )          AS last_month
         FROM    dual
    SELECT     ADD_MONTHS (first_month, LEVEL - 1)     AS month_start
    ,     ADD_MONTHS (first_month, LEVEL    ) - 1     AS month_end
    FROM     got_months
    CONNECT BY     LEVEL     <= 1 + MONTHS_BETWEEN ( last_month
                                          , first_month
    ;Output:
    MONTH_START MONTH_END
    01-Dec-2012 31-Dec-2012
    01-Jan-2013 31-Jan-2013
    01-Feb-2013 28-Feb-2013
    01-Mar-2013 31-Mar-2013

  • Monthly wise Sales report - Help me

    Dear SDN mates
    Is there any standard reports for Monthly wise sales report ...the SAP1 , SAP2 reports were not helpful....Does this can be solved by standard reports or it needs to be customized????
    kindly help me?

    hi,
    check VC05 transaction.

  • Urgent:page wise total in smartforms

    hi,all
    How to do page wise total in smartforms   ?
    use table in smartforms for summary in pagebreak
    ex. page1
    10 (line 1)
    20 (line 2)
    30 (line 3)
    total 100
    page 2
    40 (line 1)
    50 (line 2)
    total 50
    Total in page 1 incorrect = line1(page1) + line2(page1) + line3(page1) + line1 (in page2)
    Total in page 2 inccorrect = line2 (in page2) .
    please help me guys to solve this problem..

    r u printing the internal table data using the TABLE node then--> in the Calculation tab u can do this.
    first create a variable in Global difinations-->global data tab.(ex v_tot)
    then in the TABLE>calculations TAB> 1select ->sum then 2nd colun>give the field name which u want to calculate (ex-wa_itab-netwr) in the Target Filedname tab> give the varialbe u have declared for the total(ex v_tot). in TIME colums select AFTER theLOOP...
    then in theTABLE>footer>inset a line display the variable(total u r using).here
    after the the printing the total..->create a program lines> cleat the v_tot... why u need to clear this is.... u want to display only the total value which are displaying in the current page... after printing this v_tot... clear this... so that in the next page it start totaling the freshly...
    lem me know if u have any clarifications.
    u can calculate as the above way for all the 6 fields.
    please Avoid postin duplicate threads

Maybe you are looking for

  • T-code MB5B Issue

    Dear All, Im having an issue with MB5B (Stock on Posting Date) The issue is i cannot Sum up for column opening balance or closing balance. In selection screen, I have selected: Valuated Stock Totals only non-hierarchical Then in Output, when i try to

  • Issue in standard LOV after extending the VO

    Hello All, My requirement is to restrict the LOV "Payment Document" of standard page "PsrPG.xml". Path of the page :- oracle.apps.ap.payments.psr.webui I have extended the VO and implemented my logic to fulfill the requirement. Its working fine if I

  • Erreur d'affichage caractéres Reader et Acrobat

    Bonjour, depuis plusieurs moi, j'ai des caractéres qui ne s'affiche pas correctement : n° s'affiche n! au lieu d'une apostrophe, j'ai une sorte de rond avec une vague dessus j'ai le même probléme avec reader XI et acrobat mon PC a été reinstallé en w

  • Site column Person or Group not working through TMG

    We published our Sharepoint 2010 Site through TMG 2010, everything is working fine, except some users cannot edit the site column Person/Group in the document library. The Word 2013 opens and in the field we just see not currently available. I have s

  • The program frees random.

    If i wil open a photo,    sometimes it frees, Author times it frees wen i wil change sometime. This is the system info. Adobe Photoshop Elements Versie: 12.0 (12.1 (20140303.12.1.49334)) x32 Besturingssysteem: Windows 8 64-bits Versie: 6.2 Systeemarc