Subtotal By Period

I want to build a report showing actual line item data. In my firts rwo I have cost centre in my second Ihave fiscal year and period and in my third I have doc number. Then in the columm I have amount. I want to see subtotals for the amount by period e.g.
Cost Centre /  Fiscal Year & Period / Doc Number / Amount
A1234             April 2008                   123456          £100
                        April 2008                   345678          £120
                        Result                                               £220
                        May 2008                   123456          £110
                        May 2008                   345678          £125
                        Result                                               £235 
I've tried having fiscal year and period as Results Row always display but this only gives me result row for all periods rather than a subtotal for each period. I need to have Cost Centre as the first row as I'm going to displayig this data for several cost centres. Any ideas?
Cheers
Joel

No, it will summarize the single values of each document and give the total in an additional row.
For your example:
Cost Centre / Fiscal Year & Period / Doc Number / Amount
A1234 April 2008 123456 £100
April 2008 345678 £120
Result £220
The single values of documents 123456 and 345678 will be added to a new line.
You have seen the similar effect when you tried the setting for fiscal year/period. The single values of this characteristic was added to a total.
Edited by: Alexander Prill on Oct 28, 2009 4:49 PM

Similar Messages

  • Mix AVG and Total for the same column in ALV grid

    Hi,
    We are using CL_GUI_ALV_GRID=>SET_TABLE_FOR_FIRST_DISPLAY, and I'd like to know if the following situation is possible.
    Let's say we have a column which contains a number of hours, and we set it up to subtotal by period, but as an average rather than a total (DO_SUM = "C"). This is not a problem so far.
    The problem is that we'd like for the "Grand Total" at the bottom of the ALV grid to total all of the subtotal averages, instead of calculating an average.
    Ex:
    Period            Hours
    2010/01           6.0
    2010/02           7.0
    2010/03           2.0
                    5.0  (This is an average... 6.0 + 7.0 + 2.0 / 3)
    2011/01          12.0
    2011/02           5.0
    2011/03           4.0
                    7.0  (This is an average... 12.0 + 5.0 + 4.0 / 3)
                12.0 (We want this to be a total of 5.0 + 7.0)
    So we want the "grand total" line to be 12.0 which is the sum, but it currently comes out as an average.
    Therefore we're looking to average at the sub total level, but we want a total of the subtotal levels at the grand total level for the same column.
    Thanks,
    Denis

    Refer to the suggestion given by Naimesh here Can we modify a sub-total in ALV making use of function GET_GLOBALS_FROM_SLVC_FULLSCR and the method GET_SUBTOTALS. You can see the parameter ep_collect01 refered in case of subtotals. Can you please check ep_collect00 for grand total in your case.
    As said about EP_COLLECT00,here goes a classic example Modify grand total in ALV GRID
    BR
    Keshav
    Edited by: Keshav.T on Sep 21, 2011 9:39 AM

  • Need to have subtotal

    Hi,
      I am using 'ALV_GRID_DISPLAY'. i need to have a subtotal in the output based on two fields of my output (vendor and period).
    any one help please
    Thanks  in advance.

    DATA: lv_sort TYPE slis_sortinfo_alv,
              gt_sort             TYPE slis_t_sortinfo_alv,
      lv_sort-fieldname = 'BUKRS'. " Sort by Co Code
      lv_sort-tabname = 'GT_TRANSDT'.
      lv_sort-subtot    = 'X'.
      APPEND lv_sort TO gt_sort.
      lv_sort-fieldname = 'BELNR'. " Sort by G/L accounts
       lv_sort-tabname = 'GT_TRANSDT'.
      lv_sort-subtot    = 'X'.
      APPEND lv_sort TO gt_sort.
    pass gt_sort in the function module.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
         i_callback_program                = gv_repid
         i_callback_pf_status_set          = gv_status
         i_callback_user_command           = 'F_FB03'
        I_CALLBACK_TOP_OF_PAGE            = ' '
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
        I_CALLBACK_HTML_END_OF_LIST       = ' '
        I_STRUCTURE_NAME                  =
        I_BACKGROUND_ID                   = ' '
        I_GRID_TITLE                      =
        I_GRID_SETTINGS                   =
         is_layout                         = gs_layout
         it_fieldcat                       = gt_fieldcat
        IT_EXCLUDING                      =
        IT_SPECIAL_GROUPS                 =
    <b>     it_sort                           = gt_sort[]</b>
        IT_FILTER                         =
        IS_SEL_HIDE                       =
         i_default                         = 'A'
         i_save                            = gv_save
         is_variant                        = gv_variant
         it_events                         = gt_events[]
        IT_EVENT_EXIT                     =
        IS_PRINT                          =
        IS_REPREP_ID                      =
        I_SCREEN_START_COLUMN             = 0
        I_SCREEN_START_LINE               = 0
        I_SCREEN_END_COLUMN               = 0
        I_SCREEN_END_LINE                 = 0
        IT_ALV_GRAPHICS                   =
        IT_HYPERLINK                      =
        IT_ADD_FIELDCAT                   =
        IT_EXCEPT_QINFO                   =
        I_HTML_HEIGHT_TOP                 =
        I_HTML_HEIGHT_END                 =
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           =
        ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_transdt_line
      EXCEPTIONS
        PROGRAM_ERROR                     = 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.

  • Restriction in subtotal

    hi
    i have one report,there i am using oops-alv.here i am calculating subtotal,total on the basis of account nmber but for certain account we will not calulate total & subtotal,please help me,my program is
                    T Y P E S   D E C L A R A T I O N S                      *
    Types for storing final output table for all GL Accounts
    TYPES:BEGIN OF ty_faglflexa,
         rbukrs TYPE faglflexa-rbukrs, "company code
         racct TYPE faglflexa-racct,  "account no
         prctr TYPE faglflexa-prctr,  "profit center
         ryear TYPE faglflexa-ryear,  "year
         docnr TYPE faglflexa-docnr,  "document no
         pprctr TYPE faglflexa-pprctr, "partner PC
         tsl TYPE faglflexa-tsl,       "trans value key
         poper TYPE faglflexa-poper,  "posting period
         rassc TYPE faglflexa-rassc,  "trading partner
         stblg TYPE bkpf-stblg,       "Reverse docu no
        END OF ty_faglflexa.
    Types for storing final output table for all INTER-COMPANY Accounts
    TYPES:BEGIN OF ty_faglflexa1,
         pprctr TYPE faglflexa-pprctr, "partner PC
         tsl TYPE faglflexa-tsl,       "trans value key
         prctr TYPE faglflexa-prctr,  "profit center
         ryear TYPE faglflexa-ryear,  "year
         docnr TYPE faglflexa-docnr,  "document no
         racct TYPE faglflexa-racct,  "account no
         rbukrs TYPE faglflexa-rbukrs, "company code
         poper TYPE faglflexa-poper,  "posting period
         rassc TYPE faglflexa-rassc,  "trading partner
         stblg TYPE bkpf-stblg,       "Reverse docu no
        END OF ty_faglflexa1.
    Types for storing output table for account
    TYPES: BEGIN OF ty_tf100,
          item TYPE tf100-item,         "account
          END OF ty_tf100.
                      D A T A   D E C L A R A T I O N S                  *
    DATA:w_faglflexa TYPE faglflexa.
        -----Data declaration for ALV display
    DATA:
      gr_table            TYPE REF TO cl_salv_table,
      gr_functions        TYPE REF TO cl_salv_functions,
      gr_display          TYPE REF TO cl_salv_display_settings,
      gr_columns          TYPE REF TO cl_salv_columns_table,
      gr_column           TYPE REF TO cl_salv_column_table,
      lr_events           TYPE REF TO cl_salv_events_table,
      lr_aggregations     TYPE REF TO cl_salv_aggregations,
      lr_groups           TYPE REF TO cl_salv_sorts,
      gr_filter           TYPE REF TO cl_salv_filters.
           I N T E R N A L   T A B L E   D E C L A R A T I O N S         *
    DATA:
        Internal table storing data for Profit Center
          gt_faglflexa  TYPE STANDARD TABLE OF ty_faglflexa INITIAL SIZE 0,
        Internal table storing data for Partner Profit Center
          gt_faglflexa1  TYPE STANDARD TABLE OF ty_faglflexa1  INITIAL SIZE 0,
        Internal table storing data for accounts
          gt_tf100 TYPE STANDARD TABLE OF ty_tf100 INITIAL SIZE 0.
    data:wa_faglflexa type ty_faglflexa.
                  S E L E C T I O N   S C R E E N                        *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-b01.
    SELECT-OPTIONS: s_year    FOR w_faglflexa-ryear,               "year
                    s_poper   FOR w_faglflexa-poper,               "posting period
                    s_acc     FOR w_faglflexa-racct DEFAULT 'OC01',"account no
                    s_code    FOR w_faglflexa-rbukrs.              "company code
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: w_profit  RADIOBUTTON GROUP pro DEFAULT 'X',
                w_pprfit  RADIOBUTTON GROUP pro.
    SELECTION-SCREEN END OF BLOCK b2.
                   I N C L U D E    P R O G R A M                        *
    INCLUDE ZFI_PC1. "Contains the subroutine definitions
                S T A R T   O F   S E L E C T I O N   E V E N T          *
    START-OF-SELECTION.
    *To get data for final table.....
      PERFORM setdata.
    To perform Output......
      PERFORM display_data.
    ***INCLUDE ZFI_PC1 .
    *&      Form  FETCH_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM setdata .
      IF w_profit = 'X'.
        PERFORM get_data. "to display data for profit center
      ELSE.
        PERFORM get_data1. "to display for partner profit center
      ENDIF.
    ENDFORM.                    " SETDATA
    *&      Form  GETDATA
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
    *selecting company code,accont no.......
      SELECT   a~rbukrs
               a~racct
               a~prctr
               a~ryear
               a~docnr
               a~pprctr
               a~tsl
               a~poper
               a~rassc
               b~stblg INTO TABLE gt_faglflexa
               FROM faglflexa AS a INNER JOIN bkpf AS b
               ON adocnr = bbelnr
               AND arbukrs = bbukrs
               AND aryear = bgjahr
               WHERE ryear IN s_year AND
                     poper IN s_poper AND
                     racct IN s_acc AND
                     rbukrs IN s_code AND
                     prctr IN ('0000099999', ' ').
    ENDFORM.                    " GET_DATA
    *&      Form  GETDATA1
          text
    -->  p1        text
    <--  p2        text
    FORM get_data1 .
    *selecting account.....
      SELECT item INTO TABLE gt_tf100
                             FROM tf100
                             WHERE itgrp = '0110'
                             OR itgrp = '1110'.
    *selecting company code,accont no.......
      SELECT a~pprctr
             a~tsl
             a~prctr
             a~ryear
             a~docnr
             a~racct
             a~rbukrs
             a~poper
             a~rassc
             b~stblg
             INTO  TABLE gt_faglflexa1
             FROM faglflexa AS a INNER JOIN bkpf AS b
               ON adocnr = bbelnr
               AND arbukrs = bbukrs
               AND aryear = bgjahr
             FOR ALL ENTRIES IN gt_tf100
             WHERE ryear IN s_year AND
                 poper IN s_poper AND
                 racct = gt_tf100-item AND
                 rbukrs IN s_code AND
                 pprctr IN ('0000099999', ' ').
    ENDFORM.                                                    " GET_DATA1
    *&      Form  DISPLAYDATA
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      IF NOT gt_faglflexa[] IS INITIAL.
        TRY.
            cl_salv_table=>factory( IMPORTING r_salv_table = gr_table CHANGING t_table = gt_faglflexa ).
          CATCH cx_salv_msg.
        ENDTRY.
        lr_aggregations = gr_table->get_aggregations( ).
        gr_functions = gr_table->get_functions( ).
        gr_functions->set_all( abap_true ).
        lr_aggregations->clear( ).
        lr_groups = gr_table->get_sorts( ) .
        lr_groups->clear( ).
        PERFORM column_name.
        TRY.
            lr_groups->add_sort(
           columnname = 'RBUKRS'
           position   = 1
           subtotal   = abap_true
           sequence   = if_salv_c_sort=>sort_up ).
            lr_groups->add_sort(
             columnname = 'RACCT'
             position   = 2
             subtotal   = abap_true
             sequence   = if_salv_c_sort=>sort_up )
            lr_groups->add_sort(
              columnname = 'PRCTR'
              position   = 3
              subtotal   = abap_true
              sequence   = if_salv_c_sort=>sort_up ).
             gr_filter->add_filter(
             columnname = 'RACCT'
             sign = 'I'
             option = 'NE'
             low = '34896' ).
    *CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
          CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
        ENDTRY.
       IF gr_columns->get_column( 'RACCT' ) NE '34896'   .
       IF  '34896' NE   gr_columns->get_column( 'RACCT' ) .
        wa_faglflexa-racct = gt_faglflexa-racct.
         IF wa_faglflexa-racct NE  '0000034896'.
       READ TABLE  gt_faglflexa INDEX sy-index INTO wa_faglflexa  .
        LOOP AT gt_faglflexa INTO wa_faglflexa.
          IF wa_faglflexa-racct NE  '0000034896'.
            TRY.
                lr_aggregations->add_aggregation( columnname = 'TSL' ).
              CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
            ENDTRY.
          ELSE.
            TRY.
                lr_aggregations->add_aggregation( columnname = 'TSL'
                                                 aggregation = '0' ).
              CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
            ENDTRY.
          ENDIF.
        ENDLOOP.
       APPEND wa_faglflexa TO gt_faglflexa.
        gr_display = gr_table->get_display_settings( ).
        gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
        gr_display->set_list_header( text-031 ).
        gr_table->display( ).
      ELSE.
        TRY.
            cl_salv_table=>factory( IMPORTING r_salv_table = gr_table CHANGING t_table = gt_faglflexa1 ).
          CATCH cx_salv_msg.
        ENDTRY.
        lr_aggregations = gr_table->get_aggregations( ).
        gr_functions = gr_table->get_functions( ).
        gr_functions->set_all( abap_true ).
        lr_aggregations->clear( ).
        lr_groups = gr_table->get_sorts( ) .
        lr_groups->clear( ).
        PERFORM column_name1.
        TRY.
            lr_groups->add_sort(
           columnname = 'PPRCTR'
           position   = 1
           subtotal   = abap_true
           sequence   = if_salv_c_sort=>sort_up ).
            lr_groups->add_sort(
             columnname = 'TSL'
             position   = 2
             subtotal   = abap_true
             sequence   = if_salv_c_sort=>sort_up ).
          CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
        ENDTRY.
        TRY.
            lr_aggregations->add_aggregation( columnname = 'TSL' ).
          CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
        ENDTRY.
        gr_display = gr_table->get_display_settings( ).
        gr_display->set_striped_pattern( cl_salv_display_settings=>true ).
        gr_display->set_list_header( text-031 ).
        gr_table->display( ).
      ENDIF.
    ENDFORM.                    " DISPLAY_DATA
    *&      Form  COLUMN_NAME
          text
    -->  p1        text
    <--  p2        text
    FORM column_name .
      gr_columns = gr_table->get_columns( ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RBUKRS' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-003 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RACCT' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-001 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'PRCTR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-005 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RYEAR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-006 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'DOCNR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-007 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'PPRCTR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-008 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'TSL' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-009 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'POPER' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-010 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RASSC' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-011 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'STBLG' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-012 ).
    ENDFORM.                    " COLUMN_NAME
    *&      Form  COLUMN_NAME1
          text
    -->  p1        text
    <--  p2        text
    FORM column_name1 .
      gr_columns = gr_table->get_columns( ).
      TRY.
          gr_column ?= gr_columns->get_column( 'PPRCTR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-008 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'TSL' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-009 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'PRCTR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-005 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RYEAR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-006 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'DOCNR' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-007 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RACCT' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-001 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RBUKRS' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-003 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'POPER' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-010 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'RASSC' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-011 ).
      TRY.
          gr_column ?= gr_columns->get_column( 'STBLG' ).
        CATCH cx_salv_not_found.
      ENDTRY.
      gr_column->set_long_text( text-012 ).
    ENDFORM.                    " COLUMN_NAME1

    Hi misra
    Check  this
    gr_sorts = gr_table->get_sorts( ).
      CLEAR: lv_text.
      TRY.
          gr_sorts->add_sort( columnname = 'ZBUKRS' subtotal = abap_true ).
          gr_sorts->add_sort( columnname = 'ZWERKS').
          gr_sorts->add_sort( columnname = 'ZMATNR' subtotal = abap_true ).
          gr_sorts->add_sort( columnname = 'ZLOT_NUMBER').
        CATCH cx_salv_not_found INTO err_not_found.
          lv_text = err_not_found->get_text( ).
        CATCH cx_salv_existing INTO err_existing.
          lv_text = err_existing->get_text( ).
        CATCH cx_salv_data_error INTO err_data.
          lv_text = err_data->get_text( ).
      ENDTRY.
    --- Add Aggregation to subtotal on ZQuantity, SAP Quantity and Delta -
      TRY.
          gr_agg = gr_table->get_aggregations( ).
          gr_agg->add_aggregation( 'ZQUANTITY' ).
          gr_agg->add_aggregation( 'ISTMN' ).
          gr_agg->add_aggregation( 'DELTA' ).
        CATCH cx_salv_not_found INTO err_not_found.
          lv_text = err_not_found->get_text( ).
        CATCH cx_salv_existing INTO err_existing.
          lv_text = err_existing->get_text( ).
        CATCH cx_salv_data_error INTO err_data.
          lv_text = err_data->get_text( ).
      ENDTRY.

  • Cost Center Report with Cost Element wise Subtotal

    Hi All,
    We have a requirement where customer wants a Cost Center report with Cost Element wise Subtotal and selection options required are Company Code, Cost Center, Cost Element.
    KSB1 solves the requirement, but when executed for 2 or more company codes it is taking 3 to 4 hours.
    The other alternative report we tried is S_ALR_87013611- Actual/Plan but this report gives debit and credit values in seperate columns.
    Please let me know if we can copy the report S_ALR_87013611 and change it using report writer to have the output by Cost Element wise total.
    Also please let me how we can increse the speed of KSB1 report.
    Thanks
    Satish

    for KSB1 Report the following is my suggestion
    1. Please go to the selection criteria for the cost elements and de select the secondary cost elements in the the exclude range and try running the report this is generate the report faster.
    2. also check the date range please give the date range for 3 t months and if you want to run for multiple company codes. if you want to execute it for longer periods say 9 months or 6 months generate the report in 2 to 3 installments and download them to your excel and consilidate them in excel for your analysis
    Best Regards,

  • Prior Year Sales vs. Prior Period Sales

    Using Crystal Reports XI, connecting to an Access Database.
    I have a report that compares 2007 to 2008 sales for the most recent 4 weeks.  It summarizes sales first by Item Class (group 3), then by Item Type (group 2), then by Region (group 1).  Some Classes of items have sales in both 2008 and 2007, but some don't.  For those Item Classes that have no 2007 sales, I want to show the most recent 4 weeks in 2008 vs. the 4 weeks just prior to that.  In other words, if the report is showing week 10 to 13 in the 2008 column, I want to show weeks 9 to 12 in the 2007 provided that there are no 2007 sales for that item class.
    I can do this easily enough for Item Class, however I am having trouble getting accurate sub-totals for Item Type and Region.
    What I have now is this formula to show Net Sales for "2007".  {Command.class} is Item Class.  @PriYr4wkSale is the real 2007 gross sales.  @Prev4wkSale is the week 9 to 12 gross sales.  @PriYr4wkSpl is the spoils, which I add to gross sales to get net.
    if Sum ({@PriYr4wkSale}, {Command.class}) > 0 then
        Sum ({@PriYr4wkSale}, {Command.class}) + Sum ({@PriYr4wkSpl}, {Command.class})
    else
        Sum ({@Prev4wkSale}, {Command.class}) + Sum ({@Prev4wkSpl}, {Command.class})
    If I change this to summarize over {@ItemType} I get erroneous data because {@PriYr4wkSale} is always positive, so the formula doesn't pick up sales for the Previous 4 wk period.
    Does anyone have any ideas for a formula I can place in the details section (and then subtotal by group) that will show the sales amount conditionally, based on whether or not an item has prior year sales?  The problem I've run into with this approach is that any given detail record (say in 2008) doesn't know if there were prior year sales or not).
    Edit: How can I make the post narrower, so it fits within one browser window, width-wise?
    Edited by: M Anderson on Jun 3, 2008 1:12 AM
    Edited by: M Anderson on Jun 3, 2008 1:13 AM

    Hi "M",
    I know when I've tried something similar, the problem was that the formula didn't work because it wasn't getting a result of "0" (i.e. no sales) but "null".
    Try:
    if not isnull(Sum ({@PriYr4wkSale}, {Command.class})) then...
    Heather

  • SD: Pricing: Subtotal, Alt Cal type, Requirements

    Dear All
    Can you please help providing details on functions of standard Subtotal and Alt Cal Types provided in SAP-SD Pricing.
    I mean:
    1.  Standard Subtotals like 2,3,5,G etc.
    2.  Alt Cal Types like  4,7 etc.
    3. Requirements Like 10, 70, 71, 4 etc.
    Any document details will be highly appreciated.
    Thanks
    Raghu A.

    Subtotal:
    u2022     The value of this field determines where the values of subtotals to be captured i.e. in which table and which field.
    u2022     Controls whether and in which fields condition amounts or subtotals (for example, a customer discount or the cost of a material) are stored.
    u2022     If the same fields are used to store different condition amounts, the system totals the individual amounts.
    u2022     These condition amounts or subtotals are used as a starting point for further calculations. You may, for example, want a subtotal of all the discounts included in the pricing of a sales order.
    Requirement:
    u2022     It is a routine that is written by an ABAP consultant according to the business requirement.
    u2022     By defining Requirement in condition technique we can restrict the access of condition type.
    u2022     To understand the concept, we will take the example of the Rebates. Rebates are to be included during the billing document processing and not in the sales document processing. As rebates are given on the delivered quantity and not on the ordered quantity (in case of cut-off period for rebates).
    u2022     For rebates we use the condition types BO01 to BO05, and in the Requirement column we give the value 24 which is "Only in Billing Document".
    u2022     This Requirement will ensure that these condition types will appear only during the billing document processing.
    u2022     If new Requirements are to be defined we follow the procedure given below.
    u2022     Go to T.Code: VOFM. - Maintain Requirements & Formulas
    u2022     Click on the "Requirements" in the top menu and then click on "pricing".
    u2022     We have a list of requirements, we can ask ABAP consultant to create new requirement based on the client requests.
    u2022     And we assign the application type like V - Sales/Distribution etc.
    AltCty - Condition formula for alternative calculation type:
    u2022     It is again a Routine that is written by ABAP Consultant.
    u2022     It is an alternative formula for the condition type that can be used instead of standard formulas.
    u2022     For example, let us take the Profit Margin which can be both + / - , so here this routine will help us in generating the value which can be either + or -. Profit margin is not a condition type so it cannot be classified as +ve or -ve in the V/06.
    u2022     Ex.: 950 0 Profit Margin 11.
    u2022     So we assign 11 - Profit Margin.
    u2022     If new routines are to be defined we follow the procedure given below.
    u2022     Go to T.Code: VOFM. - Maintain Requirements & Formulas
    u2022     
    u2022     Click on the "Formulas" and then on the "Condition Values".
    u2022     We have a list of routines, we can ask ABAP consultant to create new routines based on the client requests.
    u2022     And we assign the application type.
    AltCBV - Alternative formula for condition base value:
    u2022     Formula for determining the condition basis as an alternative to the standard.
    u2022     It is again a Routine that is written by ABAP Consultant.
    u2022     It is used as a basis to calculate value of the condition type instead of using it from the "FROM" column.
    u2022     Ex.: Freight - KF00.
    u2022     Freight is calculated based on weight, volume etc. and not on the base price. In pricing there is no entry of weight from which the value can be referred like we do for discounts using base price. We have to get the value from the Material master.
    u2022     In this column we can mention the value as 12 - Gross Weight or 13 - Net Weight.
    u2022     During pricing, the system will consider the value that is mentioned in this column and determine the freight based on this value.
    u2022     Suppose we have Net weight: 100 kgs and Gross Weight: 150 kgs. And if we mention 13 in this column then the Freight condition KF00 will be calculated using the weight as 100 kgs.

  • Grand Totals & Subtotal

    Hi All,
    How to display Grand Totals and Subtotals in the out put. Please let me know.
    Thanks,
    KN

    Hi KN,
          In order to display the sub total you need to restrict your key figure with respect to the concerned characteristic.
    Take an example of Top 20 Customers in which you want to display the Top 20 Customers along with their sales for a period specified and also the total sales for that period.
    Here in this example we can get the Subtotal which is the sales of period for Top 20 Customers and also the Grand Total which will include those top 20 customers along with remaing customers sales for that period
    For getting the Subtotal and Grand total in same report I will apply a condition on Sales for a period[0SALES]
    I will create a condtion for Key figure 0SALES with Operator Top N and Values 20  and on the characteristics Assignment Tab I will click on the Individual chars and char combinations Radio button and select fiscal year/period as my char.So that it will restrict my 0SALES for a period.
    same logic you can apply for getting subtotal and grand total.
    hope this helps..

  • Error while running a query-Input for variable 'Posting Period is invalid

    Hi All,
    NOTE: This error is only cropping up when I input 12 in the posting period variable selection. If I put in any other value from 1-11 I am not getting any errors. Any ideas why this might be happening?
    I am getting the following error when I try and run a query - "Input for variable 'Posting Period (Single entry, mandatory)' is invalid" - On further clicking on this error the message displayed is as follows -
    Diagnosis
    Variable Posting Period (Single Value Entry, Mandatory) is used as a lower limit (X) and an upper limit () in an interval selection. This limit has the value #.
    System Response
    Procedure
    Enter a different value for variable Posting Period (Single Value Entry, Mandatory). If the value of the other limit is determined by another variable, you can change its value also.
    Procedure for System Administration

    OK.
    Well, if the variable is not used in any interval selection, then I would say "something happened to it".
    I would make a copy of the query and run it to check if I get the same problem with period 12.
       -> If not, something is wrong in the original query (you can proceed as below, if changes to original are permitted).
    If so, then try removing the variable completely from the query and hardcode restriction to 12.
       -> If problem still persists, I would have to do some thinking.
    If problem is gone, then add the variable again. Check.
       -> If problem is back, then the variable "is sick". Only quick thing to do, is to build an identical variable and use that one.
    If problem also happens with the new variable, then it's time to share this experience with someone else and consider raising an OSS.
    Good luck!
    Jacob
    P.S: what fisc year variant are you using?
    Edited by: Jacob Jansen on Jan 25, 2010 8:36 PM

  • Issue with Period Control 03 for Depri key MSTL with 6446

    Hi Gurus,
    We want to use mid-month calculation for Dep. key MSTL using period control 03 (i.e. 03/03/03/03). We are also using 6446 as year-depedent Fiscal year (i.e. Jan and Dec 6 weeks other rest 4 weeks).  period control 03 is pro rata at mid period
    period 12 for 2009 start 11/14/09 ends 12/25/09
    period 1 for 2010 start   12/26/09 ends 02/05/10
    as per period control 03 mid month is Dec-04-2009 (setup in OAVH)
    When i acquire an asset on Dec-04-09, the dep start date is Nov-14-09 which is correct and all calculation is correct
    however when i acquire an asset on Dec-06-09 the dep start date is still Nov-14-09 which is not correct infact it should start dep from next month which will be Dec-26-09 (This is 1st period of Fiscal year 2010)
    As mentioned above we are using 6-4-4-6 fiscal year
    When acquiring an asset with mid month concept at year end we are facing problem in depri start date and hence calculation.
    The setting in OAVH for period control 03 are as below
    FV   Period Control     Desc.                             Year   Month   Day    Period    MidMonth
    NL        03              Pro rata at mid period          2009    12        4         12           ticked
    NL        03              Pro rata at mid period          2009    12        25       12           ticked
    NL        03              Pro rata at mid period          2009    12        31        1            ticked
    NL        03              Pro rata at mid period          2010    1          15        1            ticked
    Thanks in advance

    Deepak,
    Your period 12/2009 starts and ends between 11/14/09 ends 12/25/09. Now you acquire an asset on 12/4/2009. As per OAVH, you want depreciation calculation start mid-period. Then how is depreciation start date of Nov 14, 2009 for this case?
    Then you acquire an asset on Dec6, 2009. This, as per OAVH, falls into period 12/2009. Then why should the calculation start from period 1/2010 for this case?
    Thanks,
    Asheesh

  • Pension payment period record issue in Retiree Payroll

    Dear Experts,
    We are implementing Retiree payroll with new set of wagetypes and payroll area. Now requirement is that there needs to be a provision of recording the balance period of pension payment and further it should be displayed in the form of report. That means say employee has the eligibility of receiving pension from 01.12.1998 to 14.11.2015 and he has received it till  Oct, 2010, remaining balance period needs to be projected in month and days like 60.14/98.12 etc.
    Now please suggest how to achieve it, should we create a custom infotype for storing it or any other way is there.
    Thanks and regards
    Tan

    It is Indian payroll.
    Requirement is to store the balance period of pension payment, like if one employee is eligible to get pension ( as per our pension benefit scheme) for 10 years 3months 15 days since his retirement date and has already received for 36 months i.e. 3years, we need to store and display that he is eligible to get pension for another 7years 3months 15 days in 87.15 format (i.e. 7*12+3= 87months and 15days) on monthly basis.
    This will be also captured in a report later on.
    Please suggest
    Regards
    Tan

  • What causes cellular data usage to decrease if last reset has not changed? I reset every pay period cuz I do not have unlimited and was showing 125 mb sent/1.2g received. Now showing 98mb sent/980mb received. Last reset still shows same

        I reset my cellular data usage every month at the beginning of my billing period so that I can keep track of how much data I am using thru out the month. I do not have the unlimited data plan and have gone over a few times. It's usually the last couple days of my billing cycle and I am charged $10 for an extra gig which I barely use 10% of before my usage is restarted for new billing cycle. FYI, they do not carry the remainder of the unused gig that you purchase for $10 which I disagree with. But have accepted. Lol  Moving on.
        I have two questions. One possibly being answered by the other. 1. Is cellular data used when I sync to iTunes on my home computer to load songs onto my iPhone from my iTunes library(songs that already exist)? 2. What causes the cellular data usage readings in iPhone settings/general/usage/cellular usage to decrease if my last reset has not changed? It is close to end of my billing cycle and I have been keeping close eye. Earlier today it read around 180mb sent/1.2gb received. Now it reads 90mb sent/980 mb recieved. My last reset date reads the same as before. I don't know if my sync and music management had anything to do with the decrease but i didn't notice the decrease until after I had connected to iTunes and loaded music. I should also mention that a 700mb app automatically loaded itself to my phone during the sync process. Is cellular data used at all during any kind of sync /iPhone/iTunes management? Is the cellular data usage reading under iPhone settings a reliable source to keep track of monthly data usage? Guess turned out to be more than two questions but all related. Thanks in advance for any help you can offer me. It is information I find valuable. Sorry for the book long question.

    Is cellular data used at all during any kind of sync /iPhone/iTunes management? Is the cellular data usage reading under iPhone settings a reliable source to keep track of monthly data usage?
    1) No.
    2) It does provide an estimated usage, but it's not accurate. For accurate determination, you should check the remaining/used MBs from the carrier (most of the carriers provide this service for free).

  • Where we have to open and close posting periods in asset accounting

    hi sap gurus
      can anybody give where we have to open and close posting periods in asset accounting
    thank you
    venkatareddy

    Hi Venkatareddy,
    You make specifications for fiscal years and posting periods in the SAP R/3 System in Customizing for Financial Accounting. This is done in the fiscal year variant in the global parameters of the company code. These settings are, in general, also binding for Asset Accounting. The depreciation periods in Asset Accounting then correspond to the posting periods in Financial Accounting.<b> It is usually not necessary to create a separate fiscal year variant for Asset Accounting.</b>
    The period control in the depreciation key determines the start and end of depreciation when asset transactions are posted . The period control determines the relationship between the calendar period in which the asset transaction is posted and the depreciation period.
    These calendar periods are independent of the posting periods in Financial Accounting. The only restriction is that the beginning of the first calendar period and the end of the last calendar period defined in a period control have to match the start date and final date of the fiscal year in Financial Accounting.
    Kindly let me know if this useful for you

  • How to Open and Close Posting Periods in MM

    Hi,
    I have opened posting periods for 10/2008 first and by mistake even 11/2008 and 12/2008 using MMPV.
    Now when I am trying to do PGI from VL02N, the system says postings are only possible for 11/2008 and 12/2008.
    How to close these two periods and default to 10/2008.
    Please kindly help me to solve this issue.
    Regards,
    Gopi Krishna
    SAP QA Lead

    It is possible to re-open a previously closed period. However, it is NOT advisable to do so because the valuation data of the previous period could be affected.
    In general, it is only safe to reopen a previously closed period when no material postings have been done after the period shifting to the new period.
    If there has already been postings after the period shifting to the new period, reverting the period back will cause database inconsistencies in the history tables.
    If you decide to proceed with this process, you can use the program RMMMINIT, but, please review the documentation of this program first!! and the check the SAP notes 487381 (for the error message that you are receiving) and the 369637 (for an explanation about the inconsistencies that will be generated.
    Steps are as below;
    Go to Transaction Code SE38
    Enter program name RMMMINIT
    Execute or press F8 function button
    Enter your company code (From and To)
    Enter relevant date: Say 01/03/2008 for Mar. 2008 month to be opened as of now
    That means, user can post for the month of Feb 2008 as well as Mar. 2008
    Refer SAP Note No. 487381 for more details.
    As per SAP Notes 487381 ( If the periods are opened in advance in mmpv to again change it to current period the following process should be follow ), Go to Tcode MMPI, then go to menu bar and select system -> user profile->owndata.In that screen , under the parameters tab enter MMPI_READ_NOTE in Parameter ID field and enter, then under short description you will get Initialise period. Next Save.
    Again go to MMPI enter company code, period and year and execute.
    XXXXXXXXXXXXXXXXXX
    Other way of doing it is follow these steps( But try this method in Sand box Only):
    1. Go to OX18, and delete the plants assigned to your CO.Cd and save.
    2. Go to OMSY and change the posting period to the one u want and save.
    3.Go to OX18 and assign the plants you have deleted in step 1.and save.
    regards,
    indranil

  • Two intervals in Open and Close Posting Period (OB52)

    What is the purpose of the two intervals (period 1 and period 2) in Open and Close Posting Periods (transaction OB52)?

    Hi,
    Financial statements cannot be prepared on the last day of the accounting period... to find out the correct profit and to determine the correct financial positing... sometimes you may require to make some adjustment  to accounting records after the closing of the accounting year... like adjustments for expenses payable, income receivable, writting off bad debts ...etc. 
    For posting those transactions....period 2 is maintained ..which are also called as special periods... to make the postings in these periods ...special authorisation is required..... 
    Period 1 is for regular postings ...
    Radha

Maybe you are looking for

  • How to create a ROLAP Cube that has two fact tables.

    I want to know if it is possible to create a ROLAP Cube with two fact tables. Suppose that I have these two star schemas: The first star schema has only a measure and a time dimension. The time dimension has three levels (Year -> Month -> Day) The se

  • Can't save as pdf/a

    Starting from any pdf-document in wich I delete alle items (text, graphic) exept one text-item or starting from an pdf made in MS Word 2010 (containing simply the word Text) and then saving as a pdf-a, gives me always errors that the document couldn'

  • Hi-def playback is CHOPPY - 60 FPS to 29.97 FPS????

    Hi - I have a Powerbook G4, with 1.67 GHz, and 1.5 GB SDRAM. I have some AVCHD footage I converted using Voltaic, from the Panasonic HDC-SD9. Picture is great, color is great, but the playback in iMovie is choppy. Is it simply that my computer cannot

  • How to fill row colors in TableView

    Hi I have created a tableview and I need to fill different colors for the rows of the table.  How can I do this.  It would be helpful if some sample code is demonstrated. Regards, Vijay

  • Adjustment Inspector - Is there a super-preset?

    If I have a number of shots taken under similar lighting, I might want to tweak one of them and then use those settings for the other shots. I see it is possible to save presets of individual adjustment controls, but I cannot see any way to save a se