Report Performance - Summary Fields Setting

I have a report data model with 3 groupings. Summary fields are needed for each group. There are 2 approaches for me to have the summary values :
1. i can set the data source of each summary field to be the corresponding column of my based Q_1 selection statement, and then set the "Reset At" for different data groups.
2. On the other hand, i can set the data source to be the summary field of the inner data group.
Could anyone tell me which method can give me a better performance? I want the report to run faster.

Puvan,
I figured out the problem myself. It is not a version issue.
I was using a sum function on a decode expression in the sql command. The % total was applied on that sum expression. Every time I was reopening the report the sum expression was getting created in a new group.
When I gave an alias for the sum(decode(xyz)) expression it is working fine now.
I would still consider that as an issue with Reports Developer.
FYI...
Ritendra.

Similar Messages

  • Report delimiteddata option. How to hide summary fields.

    Hi,
    I have a report which has Summary Items
    eg:
    Department: Production
    Name Salary
    John 1000
    Jack 2000
    Total 3000
    Department: Quality
    Name Salary
    Harry 1200
    Sally 800
    Total 2000
    This is how it comes in PDF format.
    Now I want to show the same report in Excel format also. Here I want it to be plain data without any formatting and Summary Items (Total field) as below
    Department Name Salary
    Production John 1000
    Production Jack 2000
    Quality Harry 1200
    Quality Sally 800
    I tried delimiteddata option. However the report comes as below
    Department Total Name Salary
    Production 3000 John 1000
    Production 3000 Jack 2000
    Quality 2000 Harry 1200
    Quality 2000 Sally 800
    How can I remove the column Total ??
    Thanks in Advance
    Regards
    Sajan

    Hi Sajan,
    Go to the property inspector of the summary field.
    Under XML settings, exclude from XML tag set it to Yes
    Best Regards
    Rajesh

  • Using Summary Fields from Detail to Master Report

    Hello guys, I have a Report with Master-Detail Relationship where Detail have a Summary Field named TOTAL_PRODUCT that sum the total of products in a sell. The unique function of detail report is sum the total of products in a sell, in report we have this structure:
    ID -
    DATE OF SELL -
    VENDOR NAME -
    CUSTOMER NAME -
    TOTAL OF PRODUCTS
    This Field in report TOTAL OF PRODUCTS only can be calculated with Detail Table, how can i do it ?

    I'll have a exemple with some data :
    ID/     DATE OF SELL/     VENDOR NAME/     CUSTOMER NAME/      TOTAL OF PRODUCTS
    1/     23/08/2011/             JONH MARK/              MAX FOX/              100
    2/     31/08/2011/             JONH MARK/              CRYSTIE LABORY/  20
    This Column named TOTAL OF PRODUCTS only be calculated with the Detail information, i need to sum all of products in detail table, but how can i do it in Crystal ?
    Edited by: Ronaldo Lanhellas on Aug 31, 2011 4:22 PM

  • Summary fields in the JSP report

    I created a JSP report using Oracle 9i Reports Developer using report wizard. It has a %Total field on one of the columns.
    It is running good for the first time. But when I am closing and reopening the report the Summary column is showing a null value in the source column. And it would not run the report.

    Puvan,
    I figured out the problem myself. It is not a version issue.
    I was using a sum function on a decode expression in the sql command. The % total was applied on that sum expression. Every time I was reopening the report the sum expression was getting created in a new group.
    When I gave an alias for the sum(decode(xyz)) expression it is working fine now.
    I would still consider that as an issue with Reports Developer.
    FYI...
    Ritendra.

  • Summary field of subreport used in main report formula calculation

    I have a summary field in a subreport that I want to use in a calculation of a percentage using a second summary field in the main report as the denominator.  How do I do this in a new formula?

    Thank You Ian Waterman,...
    Couple of questions:
    Where you say "... in subreport
    @ eval
    whileprinting records;
    shared number x:=your summary
    Am I correct that this is to be a new formula created in the subreport design?
    What should I put for the "x" in the formula?
    Should the "your summary" be:  "DistinctCount of Activated_Survey.Seq.Incident"  which I have showing in the Report Footer of the subreport?
    Where in the subreport should I place the formula?  Can it be hidden?
    Where you say "In subreport header..."
    @reset
    whileprintingrecords;
    shared number x:=0
    Am I correct that this is to be a new formula created in the subreport design?
    What should I put for the "x" in the formula?
    Where in the subreport should I place the formula?  Can it also be hidden?
    Where you say "In the main report in section after subreport..."
    I have the subreport sitting up in the main Report Header as I only want the subreport summary field showing. 
    In the subreport, I have the Report Header and Details section hidden.
    @calc
    whileprintingrecords;
    (shared number x / main report summary) * 100
    Am I correct that this is to be a new formula in the main report?
    However, what I need to have happen is that the main report summary field of: "Count of Answered_Survey.Seq.Incident" needs to be divided by the subreport summary field of "DistinctCount of Activated_Survey.Seq.Incident" * 100.
    What do I modify in the formula?
    Thanks.

  • Selection criteria are not applied to summary fields on group footers.

    I wonder if anyone can help me with this problem.  I am using Crystal reports version 11.2, and my data source is a Sql Server view.
    The records on the view have a date field, and I have selected all records within a given date range in "Selection Formulas".
    The records are then grouped, and the Crystal summary facility used to summarise number fields on the group footers.
    So for example, if my view contains four records, one with field "amount" = 2, one with field "amount" = 8, one with field "amount" = 6, one with field "amount" = 3, but only the first two records are within the valid date range, you would expect to see the first two records listed out at detail level, then field "amount" summarised at group level, with a summarised value of 10.
    ie ....                record1                      2
                           record2                      8   
                           group level total         10
    This works fine when I run the report using Crystal's "print preview" facility.  However, when the report is run from within an application written in C#.NET, the selection criteria are not applied to the summary field, so you get ..
                           record1                      2
                           record2                      8   
                           group level total          19
    I tried putting the date selection criteria at both record and group level, but that did not work.
    I googled the problem and found an article explaining that Crystal first performs the record-level selection, then it creates the groups and totals up any summary fields, and only then does it apply the group-level selection criteria, which can lead to problems like the one I have described above.  However, since I have put my date selection criteria at both record and group level, I do not understand why I still get the problem.
    In one report I got round this problem by creating a formula that returned zero if the record date was outside of the valid date range, and returned the number field to be summarised if the date was valid, then summarising that formula, instead of summarising the number field directly.
    In other reports I created one formula to set a shared variable as zero, then another formula to accumulate it at detail record level, then another formula to display the variable at the group footer.  In other words, I did not bother with the Crystal summary facility at all, but created my own summary facility.
    While googling the problem to see what other people did in this situation, I noticed that most fixes used variations of the "shared variables and formulae" fix to get round the problem.
    The problem is that I have lots of complex reports and it will take ages to replace the summarised fields with shared variables and formulae.  The reports were initially tested with "Print Preview" so we did not notice this problem until the C#.Net application was ready to use them.  And I can't believe that you are simply meant to ignore the summary facility and re-invent the wheel by doing it all manually.
    Please tell me that there is something simple that I have been doing wrong!!!  If I have not given enough information for you to answer, please let me know.
    Thanks,
    Anne-Marie

    Hi, Anne-Marie;
    You may be running into a common issue that is docuemented here:
    [SelectionFormula|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333833393335%7D.do]
    Regards,
    Jonathan
    Edited by: Jonathan Parminter on Mar 16, 2009 8:03 AM

  • Functions in Calculation and Summary Fields

    Hi,
    I'll give a bit of background to my situation before describing the advice I'm looking for here.
    I am experienced Mac user and I have used AW a fair bit in the past, but since I've been working in a job which has Windows machines and uses a complex custom-written relational database for its main tool, I use it less often than I did, so I am a little rusty. It is the shortcomings of the complex relational database (which I do not have admin rights to) that has led me back to AW and its database module.
    Essentially, I am a complaints investigator, and the relational database provided by my employer is used to keep track of correspondence and various metadata associated with the investigation of the complaint. However, although it is called a Complaints Management System (CMS), it does not help me manage my caseload very well. I've previously tried to create an Excel spreadsheet that would help me manage my work, but it is not a database (or I am not sufficiently skilled with Excel) and I cannot get it to provide me with what I want.
    So, my problems.
    I have complaints (cases) assigned to me to investigate. These cases have differing priorities, which means differing time limits for completion of the investigation. The priorities and time limits are set out below:
    J (jurisdictional issues) - time limit = 1 month
    D (discretion not to investigate) - time limit = 3 months
    1 - time limit = 4 months
    2 - time limit = 6 months
    3 - time limit = 12 months
    The priority field in my AW DB is currently a 'pop-up menu' field, but I could change this to another type if this would be advisable.
    I have a date-type field in which I enter the date the complaint was received. I have an calculation-type field in which I calculate the age of the complaint using the function:
    =(NOW()-'DateReceived')
    This returns an age in days, which I input into a separate calculation field that divides the result of 'age in days' by 30, to give a rough approximation of the number of months old the complaint is (If AW has an equivalent to Excel's 'workdays' variable, I'd love to hear about it). This latter field is the one that I display in the main data entry view of the database.
    Given the priority assigned to the complaint, and the age of it, I am either 'On Target' or 'Over Target' for completing the investigation.
    Each month I have a meeting with my manager to review progress, and since the reports that can be extracted from the CMS are not very useful for this purpose, I want my AW database to help me generate reports that can form the basis of discussion in these meetings.
    Part A of My Query
    At present, I have a manually operated field, in the form of a pop-up menu, to indicate for each record (complaint) whether I am over or on target for completion of the investigation. I would like to make this a calculated field, so that the database keeps track of this for me automatically. Unfortunately, I'm either too dense, or not good enough with the syntax of AW functions, to be able to write a function which essentially does the following:
    IF 'Priority'=1 AND 'Age in Months'<4 THEN 'On Target' ELSE 'Over Target'
    - and then repeats that for the other priority possibilities.  It seems likely that the 'IF' function is what I'm after, but I haven't been able to get the syntax right to combine 'Priority' and 'Age in Months' in the format spelt out in the AW help, which is:
    =IF(logical,true value,false value)
    Getting the syntax of one part of this function right would be a good start. However, I suspect that I have a larger problem, in that I have 5 priorities to measure against and I need the overall calculation (that produces the 'On Target' or 'Over Target' results) to report in one result field. This means nesting the functions that look at the 5 priorities and 5 age limits. I've tried and failed to get the syntax of such nesting right, so advice on this is doubly welcome.
    Unfortunately, I have a sneaking suspicion that unless the answer is much more concise than I imagine it to be, there will be an additional problem: AW appears to have a character limit for the length of a function string in a calculation field which may be too short for my needs.  If you think this is an issue but that it can be solved through the use of intermediate fields (which don't need to be displayed in the main 'data entry' layout), I'm happy to give that a shot.
    Part B of my Query
    Even if the problem above cannot be solved, and I have to manually enter whether a complaint is 'On Target' or 'Over Target', I have a separate but related question for the reports I have to present to my manager.
    On these reports, I would like to have a summary at the top of the first page (in a grand-summary part, I assume) which gives a count of how many complaints are 'On Target' or 'Over Target' for each priority. Below that is a sub-summary part, ordered by the type of action that must next be taken in the investigation. (Getting that right may be a subject of a separate post at a later date.) The report must, of course, only report on those complaints that are still being investigated ('open complaints') and not those which have been completed ('closed complaints'). So, I need a function in a summary field which will present an accurate count of the number of open complaints that are 'on target' for priority J (with separate summary fields that do the same thing for priorities D, 1, 2, and 3), and a separate set of summary fields that will present a count of open complaints that are 'over target' for each type of priority.
    It might look a bit like this table below, with figures from the summary fields populating the cells in the third row:
    Priority
    J
    D
    1
    2
    3
    In / Out of Target
    In
    Out
    In
    Out
    In
    Out
    In
    Out
    In
    Out
    Number of Complaints
    My guess is that it is easier to have the summary field simply count all the complaints that are on or over target for a given priority, regardless of whether they are open or closed, since the report could be based on a saved search (match) which strips out all closed complaints. But if I'm off-beam with that idea, I'm happy to have another way of cracking this nut.
    Many thanks in advance to any Community members that take the time to try and help me with this.
    Andrew
    PS Cross posted in AWUG forum too, if people prefer to answer there.

    Hi Andrew,
    Part A:
    I've done some restating of the question, and distributed the calculations among several fields, not all of which need to be included on the visible layout. Other than formatting the Date fields and moving the 'Completed Date' field and its label, I've left this in the default "Layout 1" produced by AppleWorks.
    Field List:
    Priority: Popup menu with six items: 00, J, D, 1, 2, 3  Defaults to 00
    TL (time limit in months): Calculation:  CHOOSE('Priority',0,1,3,4,6,12)
    Received: Date. Option: Automatically insert today's date (ie. Date Record created) (may be edited)
    Target Date: Calculation:
    DATE(YEAR('Received')+INT(MONTH('Received')+'TL')/12,MOD(MONTH('Received')+'TL', 12),DAY('Received'))
    Remaining (Days): Calculation: INT('Target Date'+1-NOW())  (see revision below)
    Completed: Checkbox. Set default value to Unchecked.
    Completed Date: Date: Entered manually
    OnTarget: Calculation: IF('Completed',IF('Completed Date'<'Target Date',"On Target","Over"),IF(INT(NOW())>'Target Date',"Over","On Target"))
    The On Target field shows the current status of the case while still open, and the state on the closing date when it was closed.
    Having done that, I was unhappy with the Remaining field continuing to calculate an ever larger negative number after the case had been closed. Hence this revision below:
    Remaining: Calculation: IF('Completed','Target Date'-'Completed Date',INT('Target Date'+1-NOW()))
    Shows the number of days remaining while the case is open, the days remaining at completion if the case has been marked Completed and the completion date entered.
    Rsults (and some further formatting of the Layout) below.
    Part B:
    You will need Subsummary parts when sorted on Completed and on On Target. Fields can appear on  a Layout only once, so each subsummary part will need a separate Summary type field for each field to be summarized.
    Regards,
    Barry

  • Display Performance Summary for the last one hour

    We use Oracle Enterprise Manager 10G Grid Control. In the Targets -> Hosts -> Performance tab, how do I create a view that shows the performance summary every hour. The View Data dropbox has only the following options :
    Real Time : 30 Second Refresh
    Real Time: Manual Refresh
    Refresh Last 24 hours
    Refresh Last 7 days
    Refresh last 30 days
    I want to setup a custom option so we can run the report for whatevery period we want like hourly.

    What about
    creating a Group, include those hosts that interest you
    select the Group you created
    Launch the Dashboard (Button at right top)
    Select Customize (Right Top)
    Set proper refresh rate, metrics etc.
    Regards
    Rob
    http://oemgc.wordpress.com

  • ALV report using the field catalog

    which is the quickest way to generate an ALV report using the field catalog merge.  without needing to build the field catalog manually .
    is it easier to create a structure and passe it in the field catalog merge .  if yes can i have an example plzzzz

    hI
    Supports the creation of the field catalog for the ALV function modules
    based either on a structure or table defined in the ABAP Data
    Dictionary, or a program-internal table.
    The program-internal table must either be in a TOP Include or its
    Include must be specified explicitly in the interface.
    The variant based on a program-internal table should only be used for
    rapid prototyping since the following restrictions apply:
    o Performance is affected since the code of the table definition must
    always be read and interpreted at runtime.
    o Dictionary references are only considered if the keywords LIKE or
    INCLUDE STRUCTURE (not TYPE) are used.
    If the field catalog contains more than 90 fields, the first 90 fields
    are output in the list by default whereas the remaining fields are only
    available in the field selection.
    If the field catalog is passed with values, they are merged with the
    'automatically' found information.
    Below is an example ABAP program which will populate a simple internal table(it_ekpo) with data and
    display it using the basic ALV grid functionality(including column total). The example details the main
    sections of coding required to implement the ALV grid functionality:
                             Data declaration
                             Data retrieval
                             Build fieldcatalog
                             Build layout setup
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    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

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    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,
      line_color(4) TYPE c,     "Used to store row color attributes
    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.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      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-edit             = 'X'
      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-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-info_fieldname =      'LINE_COLOR'.
    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_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               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.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • Summary field printing on the first line when it supposed to prin last page

    i have created manual report. in the end of the report i have summay columns. wheni run in oracle reports it perfectly shows the grand totle. when i generate to file (PDF) thegrand total print on the first line. can some one tell me wht is it printig on the first line when it supposed to print on the last page. i tried print object on Last Page. it is still same.

    You may have hit this side effect of page protect (all copied from the Help):
    Description The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page. Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page.
    Note: Using Page Protect may cause objects below the page protected object(s) to appear above the page protected object(s).
    Solution:
    If Page Protect causes an object to be moved to the next logical page when formatting, an object alongside the page protected object may or may not be moved as well. If the object alongside the page protected object is not anchored (implicitly or explicitly) to the page protected object, and that object can fit in the space where the page protected object could not fit, the object will print on that logical page. Otherwise, the object will be moved along with the page protected object to the next logical page.
    (To say it simply: anchor the summary field explicitly).

  • Report Performance - timeout short dump

    Hello Experts,
    i am trying to improve the performace of a report that was developed long time ago.
    Issues i found:
    1. The report has many select...Endselect combinations, and selects inside the loop statements.
    2. Most of the selects have the addition 'into corresponding fields of' for selecting a few fields, without  the table addition.
    3.  Also few selects have the 'select * from'  syntax.
    data: begin of itab occurs 0,
              f1,
              f2
              f3.....
              fn,          
            end of itab.
    Ex: loop at itab.
             select f1 f2 f3 from table1
                   into corresponding fields of itab1.
               collect itab1.
             endselect.
              select f4 f5 from table2
                  into corresponding fields of itab2.
               endselect.
          endloop.
    All this leeds to performace issues.
    i have checked ST05, and i have got the details of the error.
    My question is which one of the reasons i mentioned above are a major factor in delaying the report performance?
    Which one of the above should i conetrate first to get the long runtime down? My goal is to keep my changes to the minimum and improve the performance. Please advise.

    > My question is which one of the reasons i mentioned above are a major factor in delaying the report
    > performance?
    Don't ask people for guesses, if you can see the facts!
    Run the SQL Trace several times, and use go to 'Trace List' -> 'Summarize Trace by SQL Statement'
    => Shows you total DB time and time per statement (all executions), the problems are on top of the list.
    Check ABAP, detail, and explain!
    Read more here:
    /people/siegfried.boes/blog/2007/09/05/the-sql-trace-st05-150-quick-and-easy
    Siegfried

  • Report Performance degradation

    hi,
    We are using around 16 entities in crm on demand R 16which includes both default as well as custom entites.
    Since custom entities are not visible in the historical subject area , we decided to stick to the real time reporting.
    Now the issue is , we have total 45 lakh record in these entites as a whole.We have reports where we need to retrieve the data across all the enties in one report.Intially we tested the reports with lesser no of records...the report performance was not that bad....but gradually it has degraded as we loaded more n more data over a period of time.The reports now takes approx 5-10 min and then finally diaplays an error msg.Infact after creating a report structure in Step 1 - Define Criteria......n moving to Step 2 - Create Layout it takes abnormal amount of time to display.As far as reports are concerned, we have built them using the best practice except the "Historical Subject Area Issue".
    Ideally for best performance how many records should be there one entity?
    What cud be the other reasons for such a performance?
    We are working in a multi tenant enviroment
    Edited by: Rita Negi on Dec 13, 2009 5:50 AM

    Rita,
    Any report built over the real-time subject areas will timeout after a period of 10 minutes. Real-time subject areas are really not suited for large reports and you'll find running them also degrades the application performance.
    Things that will degrade performance are:
    * Joins to other dimensions
    * Custom calculations
    * Number of records
    * Number of fields returned
    There are some things that just can't be done in real-time. I would look to remove joins from other dimensions e.g. Accounts/Contacts/Opportunities all in the same report. Apply more restrictive filters, e.g. current week/month to reduce the number of records required. Alternatively have very simple report, extract to excel and modify from there. Hopefully in R17 this will be added as a feature but it seems like you're stuck till then
    Thanks
    Oli @ Innoveer

  • Report Performance for GL item level report.

    Hi All,
    I have a requirements to get GL line items
    report based on GL Line items so have created data model like 0FI_GL_4->DSO-> cube and tested everything is fine but when execute in production the report performance is very bad.
    Report contains document number, GL act, comp.code, posting date objects.
    I have decided to do as follows to improve reporting performance
    ·         Create Aggregate on Document, GL characteristic
    ·         Compression.
    Can I do aggregates 1st then do the compression.
    Please let me know if I missing out anything.
    Regards,
    Naani.

    Hi Naani,
    First fill the Aggrigates then do Compression,run SAP_INFOCUBE_DESIGN Check the size of Dimension maintain Line item, High cordinality to the dimension, Set Cahe for query in RSRT,
    Try to reduce Novigational Attr in report. Below document may help you.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6071ed5f-1057-2e10-deb6-d3426fec0219?QuickLink=index&…
    Regards,
    Jagadeesh

  • Bad reporting performance after compressing infocubes

    Hi,
    as I learned, we should compress requests in our infocubes. And since we're using Oracle 9.2.0.7 as database, we can use partitioning on the E-facttable to still increase reporting performance. So far all theory...
    After getting complaints about worse reporting performance we tested this theory. I created four InfoCubes (same datamodel):
    A - no compression
    B - compression, but no partitioning
    C - compression, one partition for each year
    D - compression, one partition for each month
    After loading 135 requests and compressing the cubes, we get this amount of data:
    15.6 million records in each cube
    Cube A: 135 partitions (one per request)
    Cube B:   1 partition
    Cube C:   8 partitions
    Cube D:  62 partitions
    Now I copied one query on each cube and with this I tested the performance (transaction rsrt, without aggregates and cache, comparing the database time QTIMEDB and DMTDBBASIC). In the query I selected always one month, some hierarchy nodes and one branch.
    With this selection on each cube, I expected that cube D would be fastest, since we only have one (small) partition with relevant data. But reality shows some different picture:
    Cube A is fastest with an avg. time of 8.15, followed by cube B (8.75, +8%), cube C (10.14, +24%) and finally cube D (26.75, +228%).
    Does anyone have an idea what's going wrong? Are there same db-parameters to "activate" the partitioning for the optimizer? Or do we have to do some other customizing?
    Thanks for your replies,
    Knut

    Hi Björn,
    thanks for your hints.
    1. after compressing the cubes I refreshed the statistics in the infocube administration.
    2. cube C ist partitioned using 0CALMONTH, cube D ist partitioned using 0FISCPER.
    3. here we are: alle queries are filtered using 0FISCPER. Therefor I could increase the performance on cube C, but still not on D. I will change the query on cube C and do a retest at the end of this week.
    4. loaded data is joined from 10 months. The records are nearly equally distributed over this 10 months.
    5. partitioning was done for the period 01.2005 - 14.2009 (01.2005 - 12.2009 on cube C). So I have 5 years - 8 partitions on cube C are the result of a slight miscalculation on my side: 5 years + 1 partion before + 1 partition after => I set max. no. of partitions on 7, not thinking of BI, which always adds one partition for the data after the requested period... So each partition on cube C does not contain one full year but something about 8 months.
    6. since I tested the cubes one after another without much time between, the system load should be nearly the same (on top: it was a friday afternoon...). Our BI is clustered with several other SAP installations on a big unix server, so I cannot see the overall system load. But I did several runs with each query and the mentioned times are average times over all runs - and the average shows the same picture as the single runs (cube A is always fastest, cube D always the worst).
    Any further ideas?
    Greets,
    Knut

Maybe you are looking for

  • Supplier collaboration with SNC

    Hi Gurus, We intend to use Supplier collaboration with SNC, where plant will share component plan with supplier and supplier will comeback with constrained component plan and based on which plant will modify production plan. These are the steps we ha

  • Coloring a Font with a RGB etc. without adding the color to the document swatches.

    Is there a way of coloring a font with a RGB, Lab or CMYK color without adding the color to the document swatches. The only way I know is to add a color to the swatches or use one that already exists. like    app.selection[0].characters[0].fillColor=

  • Clamshell mode using air mouse?

    Hi guys, is it possible to use an iphone with air mouse to control a macbook pro when in clamshell mode? I have the mac linked up to the tv and just want to use it for videos and youtube etc....so no real need for a full blue tooth mouse/keyboard set

  • SQLJ connection to SQLServer

    Hello, Is it possible using SQLJ to connect to sqlserver? When I try, I am getting error: java.lang.IllegalArgumentException: SQLJ programs translated with the option -codegen=oracle must be run under Oracle JDBC 9.0.0 or higher. If the Oracle JDBC d

  • HT201441 why can't my iphone4s be statr

    what can i do?