Pagewise summation

Hi
I have items in my main window, which will spill over to multiple pages. If that happens user wants summation such as
broght forward and carry forward. Can somebody help me how can I do that? Steps/sample code would be higly appriciated. Do I need to do changes in driver program or in script only?  How can I identify page break has happened? never done this.
Thanks in advance

Hi
You could actually do it with the help of SUMMING command. In SAP documentation they have given about that. In case still if you don't get the idea,  refer to the following code snippets.
In your SAP SCRIPT at variable window window write a sub routine, say WRITE_FR and call that in your driver program. In sap script, text element, as i said write a sub-routine.
///SAMPLE CODE///
/:define &SUM_TAB-TOT&
/:PERFORM SUM IN ZVA_SCRIPT(name of your program).
/:USING existing_field
/:CHANGING &SUM_TAB-TOT&
/:ENDPERFORM.
And in your driver program,
///SAMPLE CODE
TOTAL = 0.
LOOP AT PO_ITEMS WHERE EBELN = PO_MAIN-EBELN.
  PERFORM WRITE_FR USING 'MAIN' 'ITEMS'.
  TOTAL = TOTAL + PO_ITEMS-NETWR.
ENDLOOP.
PERFORM WRITE_FR USING 'TOTAL' 'TOTAL'.
FORM WRITE_FR(name of sub routine that you created in script) USING VALUE(WIND) VALUE(TELEM).
where WIND and TELEM are the text symbols.
CALL FUNCTION 'WRITE_FORM'
  EXPORTING
    ELEMENT                         = TELEM
   FUNCTION                       = 'SET'
   TYPE                           = 'BODY'
    WINDOW                          = WIND
IMPORTING
   PENDING_LINES                  =
  EXCEPTIONS
    ELEMENT                        = 1
    FUNCTION                       = 2
    TYPE                           = 3
    UNOPENED                       = 4
    UNSTARTED                      = 5
    WINDOW                         = 6
    BAD_PAGEFORMAT_FOR_PRINT       = 7
    SPOOL_ERROR                    = 8
    CODEPAGE                       = 9
    OTHERS                         = 10
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  LEAVE PROGRAM.
ENDIF.
ENDFORM.
Regards
Vinodh
Edited by: Vinodh_AN on Nov 18, 2010 2:18 PM

Similar Messages

  • Summation of a field in ALV report

    Hi,
    I hv created an ALV Report. But i m not getting the summation sign in the Application Toolbar. What can be the problem? I am trying to find out the sum of the the field NETWR in table VBAK.
    Thanks,
    Mohit.

    See the ALV function module used  by  you and  me  ... the  below  program gives the summation  icon  in the  alv bar .
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-totals_only        = 'X'.
    *  gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
    *                                         "click(press f2)
    *  gd_layout-zebra             = 'X'.
    *  gd_layout-group_change_edit = 'X'.
    *  gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
    *            i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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.
    endform.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    reward  points if it is usefull
    Girish

  • How to find summation inside a loop?

    Hi Experts,
    Please refer following code:
    for (int i=0 ; i<wdContext.nodeWorklist().size() ; i++){
      wdContext.nodeWorklist().setLeadSelection(i);
      categoryElement = wdContext.createCategoriesElement();
      category_1Element = wdContext.createCategories_1Element();
      wbs = wdContext.currentWorklistElement().getReciever_Wbs_Element();
      sum_hrs = wdContext.currentWorklistElement().getSum_Hours();
      sum_hrs = sum_hrs.replaceAll(",",".");
      if( sum_hrs != null && sum_hrs.trim().length()>0)
      d = Double.parseDouble(sum_hrs) ;
      d1 = d + 0;
      categoryElement.setCategoryText(wbs);
      categoryElement.setSeries1Value(d);
      category_1Element.setSeries1Value(d1);
      wdContext.nodeCategories().addElement(categoryElement);
      wdContext.nodeCategories_1().addElement(category_1Element);
      wbs = "";
    I have to find summation of sum_hrs. I don't know how to go about it. I have tried using following line. However it is not working.
      d1 = d + 0;
    Suppose wdContext.nodeWorklist().size() = 4. In this case the loop will executed four times. Suppose in four cases sum_hrs are 2,3,5 and 2. I have to find the summation of 235+2 = 12.
    Can you please help me in modifying the code in such a way that 235+2 = 12 operation is getting executed.
    Thanks,
    S

    Hello,
    Please check following code.
    for (int i=0 ; i<wdContext.nodeWorklist().size() ; i++){
    wdContext.nodeWorklist().setLeadSelection(i);
    categoryElement = wdContext.createCategoriesElement();
    double finalSum =0.0;
    category_1Element = wdContext.createCategories_1Element();
    wbs = wdContext.currentWorklistElement().getReciever_Wbs_Element();
    sum_hrs = wdContext.currentWorklistElement().getSum_Hours();
    sum_hrs = sum_hrs.replaceAll(",",".");
    if( sum_hrs != null && sum_hrs.trim().length()>0)
    d = Double.parseDouble(sum_hrs) ;
    finalSum=finalSum+d;
    categoryElement.setCategoryText(wbs);
    categoryElement.setSeries1Value(d);
    category_1Element.setSeries1Value(d1);
    wdContext.nodeCategories().addElement(categoryElement);
    wdContext.nodeCategories_1().addElement(category_1Element);
    wbs = "";
    Ashutosh

  • Key figure summation for KF IN different cube of a MP

    Hi,
       I need to design a report on a Multiprovider. MP is based on two Cube Cube1 and Cube2.
       Cube 1 has field item and key figure total quatity.  Cube 2 has field item and key figure  quatity1.
       I need a report which will show
                      Item  quantity1  Total quantity   Percentage
    Percentage = (quantity1/total quantity)*100.
    I am surprised that percentage is X, though other two KF has value.
    Is it the case that it is not possible to make summation, subtraction or any opeartion between two KF in different cube.
    Could you please guide how to create percentage between two KF in different cube in a MP.
    Regards
    Deep

    Hey Deep,
    First confirm me what I understand... First you created a Mp which contains both KFs... Total quantity and Quantity one then in BEx query designer you created report in which you created a formula named "Percentage" and formula was (quantity1/totalquantity)*100... and in analyzer you are getting X instead of values. Then first try to check the properties of Formula (Percentage) in BEx query designer if decimal places etc are implemented and correct and second check if analyzer is reading these values as CHAR or Keyfigures and that you can check if there is a green arrow on left corner of each cell on both column's individual cells. If the green arrow kinda symbol is present there then it means that analyzer is not reading the values as CHAR thats why it is not doing any operation on both columns. Check these and let me know.

  • Key Figure Summation in Result Row with Cumulation Ticked

    Hi,
    I have a Bex question regarding the summation rows. 
    I need a Year To Date amount and a Period To Date amount in the report.  However, there is no Year To Date key figure available in the cube.  So in order to calculate YTD, I'm using the PTD key figure and have Cumulated box ticked mark in Bex. 
    All looks fine across columns per Vendor.  But the results row for the Cumulative Balance is always equal to the results row for Period Balances.  I believe this is because the same key figure is used, and it is only reading the amounts in the cube - not the ones calculated on the fly. 
    Does anyone know how to correct the results row for a cumulated key figure? 
    Regards,
    Rhonnie

    You have to create two restricted KF; one is PTD restricted to period; the second is PTD restricted in a period range from 01.yyyy to current period.
    Hope it helps.
    Regards

  • Help with Aggregation Summation into DSO

    Hi, I have a question about Key Figure Aggregation Summation in transformation rules into a DSO from 2LIS_11_VAITM.
    Currently had an old order for Order Qty of 600 pcs.  Recent request came in to change it to 400.  After Delta our Order Qty was -200.  The Rule is for Summation and I figure it should work like 600 + -600 +400 = 400, but that is not what happened.  It's almost like the rule considered the original order qty to be 0 and when the -600 and +400 delta came in they get summarized to get the -200.  Does it have anything to do with the change logs only having recent last 30 days available?
    Can anyone tell me what is wrong here?

    Kennet:
        Could you please provide more details? For example:
    - Is the problem (differences on the Key Figure values) at the DSO level or at the Cube level?
    - Does your DataSource version have DSO capability? (please refer to SAP Note 440416 - "BW OLTP: Correction report for change of delta process").
    - If your DataSource supports "ABR" extraction, Does the Data on the PSA looks ok? (After / Before and Reverse images).
    - Have you enhanced the DataSource to include Custom Fields? If so, Does the ABAP Routine uses the SORT command?
    - Do you update the DSO with the 2LIS_11_VAITM DataSource only? or Do you use another DataSource to send data to the same DSO?
    - Have you considered changing the Rules to "Overwrite" instead of "Summation"?
    - What fields are included as part your DSO Key?
    - Do you have the ROCANCEL field mapped to 0STORNO / 0RECORDMODE InfoObjects?
    Regards,
    Francisco Milán.
    Edited by: Francisco Milan on Jul 1, 2010 9:13 AM

  • Impact of Delta Records on Key Figure Summation in DSO

    Hi experts,
    I have a key figure with aggregation type "summation" in a DSO. I would like to know the impact of delta records on the key figure.
    E.g.
    source DSO
    doc_id (key) | doc_pos | type | amount
    4711 | 1 | A | 100 USD
    4711 | 2 | B | 20 USD
    target DSO
    doc_id (key) | amount
    4711 | 120 USD
    If the first record is modified ("type" from A to C) as follows and delta-loaded to target DSO:
    4711 | 1 | C | 100 USD
    This will lead to incorrect amount:
    target DSO
    doc_id (key) | amount
    4711 | 220 USD
    How can I handle this situation?
    Thanks in advance.
    Regards,
    Meng

    Hi..
    I believe one document number and document Item will have only one type.
    Like 4711      1    should have only one type ( A / B / C).
    If the above assumption is true then just remove Doc Type from Key field of source DSO.
    Then From Source to Target Change Log table can handle this.
    Regards
    Anindya

  • Key Figues - SUMMATION in Expert Routine

    Hi All,
    Is there any to way to have to aggregation of Key Figures as "Summation" in Expert Routine??
    Please let me know if there is any work around for this..
    Thanks,
    Kapil

    This type of routine is only intended for use in special cases. You can use the expert routine if there are not sufficient functions to perform a transformation. The expert routine should be used as an interim solution until the necessary functions are available in the standard routine.
    Hi Kapil,
          You can use expert routine to program the transformation yourself without using the available rule types. You must implement the message transfer to the monitor yourself.
         If you have already created transformation rules, the system deletes them once you have created an expert routine.
         If the target of the transformation is a DataStore object, key figures are updated by default with the aggregation behavior Overwrite (MOVE). So i think expert routine aggregation does not work for transformation to the standard DSO.
    For more details:
    [https://forums.sdn.sap.com/click.jspa?searchID=13078965&messageID=2823817]
       Hope it helps you.
    Regards,
    Yokesh

  • Summation

    Hi
    I have a cube which holds the records.
    I am loading from this cube to DSO.
    Cube has example fields:
    Record 1 is f1=10, f2=20, f3=30, f4=50 and key figure k1= 0.5
    Record 2 is f1=10, f2=20, f3=30, f4=50 and key figure k1= 0.5
    All f1 to f5 are in key fields of DSO.
    Now in DSO result will be
    f1=10, f2=20, f3=30, f4=50 and key figure k1= 1 ( Getting summed up )
    This should not happen...I have used overwrite as well in transfer rule.
    Please suggest any solution...

    Hi,
    In simple terms , if your DataSource is having these two fields
    F1           F2             F3              F4             F5   KF
    10           20             30              40             50   0.5
    10           20             30              40             50   0.5
    Then Your InfoCube will be having only one record
    F1           F2             F3              F4             F5   KF
    10           20             30              40             50   1.0
    Because your InfoCube is having only 'Summation' in the keyfigures properties. So if there is a same combination for F1 ... F5 then keyfigure will get summed up. If you generate report based on this combination you will always get 1 instead of 0.5 ,0.5
    But if your DataSource is having this combination for the second record
    F1           F2             F3              F4             F5   KF
    10           25             30              40             50   0.5
    then there will be two records available in your InfoCube. So your issue is here in the InfoCube ,not in the DSO .Your DSO will work fine without any issues for the overwrite functionality.
    Hope it clears your two issues
    Thanks.

  • Summation button in ALV report is giving shortdump

    Dear All,
    I have developed a ALV report. The report is a simple ALV report (Using REUSE_ALV_GRID_DISPLAY). When I am pressing the summation button at the top, it is giving a shortdump. The reason I have found out is the no. of columns are very large (45 to 50). Can anyone suggest how to handle this situation?
    Best wishes,
    Atanu

    Hi atanu,
    then you can use DO_SUM = 'X' (for the field which you want to sum option) in the fieldcat , this will try to sum while display it self.i mean in list display it will show the totals also.
    then you need not to explicitly click on SUM button.
    Regards
    vijay

  • ALV Summation button is not working when GRID layout is specified

    Hi,
    I have created a report with Field: ALV Grid Layout. When i dont select anything in ALV GRID Layout. and execute the report. The outout is displayed in ALV Grid. and if i select amt column and PRESS SUMMATION button. im getting the total. Thats fine.
    When i select any of the saved layout in ALV Grid Layout field.and run the report, the output is geeting displayed. and if i select amt column and press SUMMATION Button, im getting info message in the popup saying "Desired operation cant be performed for Column 'amt'"
    Whts te problem ?
    Thanks in Advance.
    Jhovee.

    PART-II
    FORM f_display_data.
      TYPE-POOLS: slis.                    " ALV Global types
    DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = 'VBAK'.
        ls_fieldcat-do_sum      = &2.
        ls_fieldcat-cfieldname  = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        ls_sort-subtot    = &2.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_layout   TYPE slis_layout_alv.
      m_fieldcat 'VKORG' ''  ''.
      m_fieldcat 'KUNNR' ''  ''.
      m_fieldcat 'VBELN' ''  ''.
      m_fieldcat 'NETWR' 'X' 'WAERK'.
      m_fieldcat 'WAERK' ''  ''.
      m_sort 'VKORG' 'X'.                  " Sort by vkorg and subtotal
      m_sort 'KUNNR' 'X'.                  " Sort by kunnr and subtotal
      m_sort 'VBELN' ''.                   " Sort by vbeln
      ls_layout-cell_merge = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
               t_outtab    = gt_vbak.
    ENDFORM.                               " F_DISPLAY_DATA

  • How to display pagewise total in Oracle reports?

    Hi,
    I want to display pagewise total in all pages as well as report total at the last page of the report.
    I have tried Reset at : Page, Print on : All pages
    But nothing is working.
    Please suggest what else I need to set to achieve the requirement
    Thanks in Advance
    Sudeep

    Create a user parameter for line count and another to hold the value of total at end of page,
    create formula column in your query group, where the column to be summarised exists,
    See how many lines of records/transaction can be printed on your page, count them in a formula column and when the printable record been retrived assign the total to
    the user parameter you have created.
    set the property 'PRINT OBJECT ON' to 'ALL BUT LAST PAGE'
    put you summary item just below this field and set the property 'PRINT OBJECT ON' to 'LAST PAGE', the final total will be displayed on last page.

  • Error opening a Manage Report template with Formulas and Summation

    Hi Expert,
    My j2ee web application is setup is such a way that when there is NO connectivity to the Crystal Report Server XI, it will use the Crystal Report for Eclipse functionality and opening report templates located in the relative path - This works fine.
    But when there is a connectivity to the CMS Server, I have this error when opening a manage report in Crystal Report Server XI that contains formulas and summations. But for other reports like chart and listings no problem.
    This code triggers the error:
    ReportClientDocument clientDoc = reportAppFactory.openDocument(infoObject,0, java.util.Locale.US);
    I found out there's a conflict between CR libraries  for Eclipse and libraries for RAS Enterprise Server XI.
    How can I solve this issue so that I can support the two scenarios - with or without CMS connectivity, I can still view reports.
    Error Stack Trace:
    com.crystaldecisions.sdk.occa.managedreports.ras.internal.a: Cannot open report document. - Unable to connect to the server: gdcextrp.RAS.rptappserver. cause:com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: gdcextrp.RAS.rptappserver.-- Error code:-2147467259 Error code name:failed detail:Cannot open report document. - Unable to connect to the server: gdcextrp.RAS.rptappserver. The exception originally thrown was com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Unable to connect to the server: gdcextrp.RAS.rptappserver.-- Error code:-2147467259 Error code name:failed at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source) at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
    Hoping for your answers.
    Regards,
    Rulix Batistil

    You must isolate the CR4E and RAS SDK jars using separate classloaders - simplest is have separate apps, if rolling your own class loaders is out of project scope.
    They do not work together.
    Sincerely,
    Ted Ueda

  • Key Figure's Result Summation and SUMGT

    Goal: I need to capture the report’s  Results for KF1 and KF2 to use it in the same report for further calculations. However, the report should include into Results calculations only the records that have KF1 or KF2 with values greater than 0.
    Potential Solution: Create a Formula that uses Function SUMGT (or SUMCT, SUMRT) on the desired key figures and use conditions at the query level.
    KF1 Property:     Calculate Result As SUMMATION
    KF2 Property:     Calculate Result As SUMMATION
    Report with No Conditions:
    Year      KF1     SUMGT’KF1’     KF2     SUMGT’KF2’
    2001     10        70                         10        90
    2002     20        70                         20        90
    2003     0          70                         30        90
    2004     40        70                         30        90
    Result   70        70                         90        90
    Report with Conditions:
    KF1 > 0
    or
    KF2 > 0
    Year     KF1     SUMGT’KF1’     KF2     SUMGT’KF2’
    2001    10         70                        10         90
    2002    20         70                        20         90
    2004    40         70                        30         90
    Result  70         70                        60         90
    Problem: When Conditions apply the SUMGT (as well as SUMCT and SUMRT) do not take them into consideration and includes in its calculations the excluded records as well.
    Questions:
    1. How can I make SUMGT (or any of the other tow) return a result that take into consideration the specified conditions?  For KF2 the Result should be 60 and NOT 90.
    2. Is there any other way I can capture the Results for KF1 and KF2 when the above specified conditions are implemented?

    I think No of repair days is a characteristic..
    What you can do is create a formula variable with user input. User will enter no of repair days in it.
    Now create a variable on no of repair days of type customer exit.
    In the exit read the value of the formula variable and assign it to that variable.
    Restrict your key figure no of completed orders with that variable...

  • Unable to carry out calculation of keyfigure with it's total summation taken on keyfigure

    Hi,
    For a requirement, we are trying to calculate division of a keyfigure with it's total summation of key figure.
    For example:
    Sales Office
    Order Reason
    Invoice Volume
    MRV Volume
    % of MRV Volume to total invoice volume
    % of MRV Volume to total MRV volume
    1504
    A1
    10
    2
    (2/90) = 2.22
    (2/27) = 7.40
    A2
    5
    3
    3.33
    11.11
    A3
    20
    10
    11.11
    37.03
    A4
    30
    5
    5.55
    18.51
    A5
    25
    7
    7.77
    25.92
    Total
    90
    27
    30
    100
    Here, Sales office and order reason are dimensions.
    Invoice volume and MRV volume are key figures.
    Following are the formula used to calculate other two keyfigures.
    % of MRV Volume to total invoice volume =  MRV Volume / Total ( Invoice Volume ) * 100
    % of MRV Volume to total   = MRV Volume / Total ( MRV Volume) * 100
    Kindly help us to get calculation of above two keyfigures to be carried out through BEx query designer.
    I tried out aggregation at order reason on Invoice volume, MRV Volume by creating two new formula keyfigures with the aggregation, but couldn't get desired output.
    Regards,
    Antony Jerald.

    Hi Antony,
    Use the same formula for these two keyfigures in BEx with SUMGT instead of Total.
    % of MRV Volume to total invoice volume =  MRV Volume / SUMGT ( Invoice Volume ) * 100
    % of MRV Volume to total   = MRV Volume / SUMGT ( MRV Volume) * 100
    Regards,
    Srilakshmi B

Maybe you are looking for

  • Mailto: link no longer works

    After working tfor the years the code for adding a email link no longer works. What's going on? For example this piece of code worked fine for years <a href="mailto:[email protected]">Email</a>. Now when I try to use the link my email programs opens

  • How to make a table of annual data from a table of quarterly data?

    I've got a table of quarterly data. I'd like to create a table of annual data, where each cell has the sum of the four cells for the four quarters that make up a calendar year. I can do this by pasting a formula into every 4th cell of a second column

  • File Browser Bug in Windows 8.1

    Hi, When one starts copy paste to a folder, file explore displays copying and shows status such as 24% copied in the situation where it is FORBIDDEN to copy anything without permission ! Whereas Windows 7.1 showed "preparing to copy" which was right!

  • How do I list all of the table names in my excel database

    I am writing code for an electronic sales board display in my office. unfortunatly the datasource that is available to me is an excel file that is updated by the sales manager every day. each sales persons information is listed in a different tab and

  • Using Templates In DW?

    I'm still a newbie...    Is using the templates in Dreamweaver a bit (for lack of a bad word) "Lazy"?  I have been coding my own layouts with CSS so far but was curious how good or bad making use of the pre-made DW templates are?