How to improve the write performance of the database

Our application is a write intense application, maybe will write 2M/second data to the database, how to improve the performance of the database? We mainly write to 5 tables of the database.
Currently, the database get no response and the CPU is 100% used.
How to tuning this? thanks in advance.

Your post says more by what is not provided than by what is provided. The following is the minimum list of information needed to even begin to help you.
1. What hardware (server, CPU, RAM, and NIC and HBA cards if any pointing to storage).
2. Storage solution (DAS, iSCSCI, SAN, NAS). Provide manufacturer and model.
3. If RAID which implementation of RAID and on how many disks.
4. If NAS or SAN how is the read-write cache configured.
5. What version of Oracle software ... all decimal points ... for example 11.1.0.6. If you are not fully patched then patch it and try again before asking for help.
6. What, in addition to the Oracle database, is running on the server?
2MB/sec. is very little. That is equivalent to inserting 500 VARCHAR2(4000)s. If I couldn't do 500 inserts per second on my laptop I'd trade it in.
SQL> create table t (
  2  testcol varchar2(4000));
Table created.
SQL> set timing on
SQL> BEGIN
  2    FOR i IN 1..500 LOOP
  3      INSERT INTO t SELECT RPAD('X', 3999, 'X') FROM dual;
  4    END LOOP;
  5  END;
  6  /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.07
SQL>Now what to do with the remaining 0.93 seconds. <g> And this was on a T61 Lenovo with a slow little 7500RPM drive and 4GB RAM running Oracle Database 11.2.0.1. But I will gladly repeat it using any currently supported version of the product.

Similar Messages

  • To improve the system performance of the code

    Please help me to improve the system performance of the following program. its very urgent
    report zsdr0125
              no standard page heading
    *         LINE-SIZE  170                                   " SIR 061880
              line-size  210                                   " SIR 061880
              line-count 58
              message-id zz.
    ** Report header ******************************************************
    ** Report name: Activity Costing Report
    ** Report id:   RO-01148
    ** Designed/Coded. Tori Chandler. Reporting Team.
    ** Date: March 01, 2000.
    ** Original SIR:  016113
    ** Application Area: V - Sales & Distribution  (OTC)
    ** Correction/Transport:  D10K951579
    ** Description:  It is normal business practice for logistics
    **               operations to charge business units for the activity
    **               incurred on their behalf.  This is consistent with
    **               activity based costing principles between BU and
    **               shared resources.  The activities involved are picking
    **               storage, shipping and receiving.  The purpose of this
    **               report is to provide data for the first 3.
    **      QRB2 - 03/13/2000 - Tracy, Antoine, Christian, Tori
    ** History:
    * 06/14/2001 SIR 032383 CTS                             Antoine Dailly
    * A plant (WERKS) can have several Distrib points (VSTEL)
    * SIGN = 032383
    * Modification History:
    * Date       Modified by  SIR       CTS          Description
    *11/14/2001  J.CAMPION   034606   D10K979189  Logistics Activity report
    * Logistics Activity reports
    * We added fields ship to customer and country and we also make another
    * total
    * QRB2 Tracy L. Obrien
    * Modification History:
    * Date       Modified by  SIR       CTS          Description
    *11/14/2001  J.CAMPION   37838   D10K982890      Select only
    *                                                material type HALB
    *06/12/2002  T OBrien    38784   D10K988181
    *        Allow option to get material weight from Master data or
    *        from the delivery.
    *  Modified by    SIR       CTS                         Date
    *  Jim Harwood    42730     D10K993119               10 Oct 2002
    * Description:  Code amended to default the Goods Issue Date range to
    * the previous month.  Also amended to print out the Select Options.
    *  Modified by    SIR       CTS                         Date
    *  Jim Harwood    44381     D10K994598               18 Nov 2002
    * Description:  Correct date range processing.  APPEND statement added
    * so that record is added ot internal table S_WADAT.  Also S_VKORG
    * removed as it was NO DISPLAY and nothing was assigned to it. It's use
    * in an SQL call may be causing the wrong optimization.
    *  Modified by    SIR       CTS                         Date
    *  Tori Chandler  45567     D10K995875               03 Jan 2003
    * Description:  Correct reporting of weights for non-pickable items
    *    when the Material Master Data radiobutton is selected. Also found
    *    from SIR 37838, that material type is hardcoded on the LIPS.  I
    *    created a new select option and the person needing the report
    *    can control if they want only HALB or all line items.  Also,
    *    because of this the delivery weight is obtain from header,
    *    changing to accumulate from LIPS to match which lines are selected
    *  QRB2:  1/15/2003:  Eileen, Jerome and Tori
    *{   INSERT         D11K901833                                        1
    *  Modified by    Sir             CTS                    Date
    *  Sue Kastan    48712/054042    D11K901833         28 Aug, 2003
    *  Fix overcounting of records from LIPS
    *}   INSERT
    *  Modified by    SIR       CTS                         Date          *
    *  Vijay Andea   061880    D11K918628               04/20/2006        *
    *                          D11K946194                                 *
    *  Description: Enhence ZSDR0125 Activity Cost Driver Report to allow *
    *  Analysis by Product Groupings.                                     *
    *}   INSERT
    *  Modified by            SIR       CTS                    Date       *
    *  Prakash Arunachalam  091510   D11K950288             09/26/2006    *
    *  Description: Correct Activity Cost report  - material weight       *
    *  calculation                                                        *
    *  Modified by            SIR       CTS                    Date       *
    *  Murali Krishna        301978    D50K903293            01/20/2008
    *  Description: Improve the system performance of this report and
    *               clean-up of code into various form routine
    * Table declaration.
    tables: likp,    " SD Document: Delivery Header Data
            lips,    " SD document: Delivery: Item data
            vepo,    " SD Document: Shipping Unit Item (Content)
            vekp,    " SD Document: Shipping Unit Header
            knvv,    " Customer Master Sales Data
            kna1,    " General Data in Customer Master            SIR 34606
            marm,    " Units of Measure
            mara,    " Material Master: General Data              SIR 38784
            t001l,   " Stge locs
            t001k,   " Valuation area
            tvswz,   " Shipping Points per Plant
            t134,    " Material types
            z0234.   " Alternative Unit of Measure
    *** Selection screen.
    selection-screen begin of block b1 with frame title text-001.
    parameters:     p_werks  like t001l-werks obligatory memory id wrk.
    select-options: s_lgort  for  t001l-lgort,
    *               S_VKORG  FOR  TVKO-VKORG NO-DISPLAY ," SIR 34606, 42730
    *               S_WADAT  FOR  LIKP-WADAT_IST OBLIGATORY NO-EXTENSION,
                    s_wadat  for  likp-wadat_ist no-extension,  " SIR 42730
                    s_mtart  for  t134-mtart,                   " SIR 45567
                    s_lfart  for  likp-lfart no-display no intervals.
    selection-screen skip 2.
    selection-screen comment 1(21) text-002.                    " SIR 38784
    parameters:     p_delwt  radiobutton group grp1,            " SIR 38784
                    p_mstwt  radiobutton group grp1.            " SIR 38784
    *--------------------------------------------------*Start of SIR 061880
    selection-screen skip 2.
    selection-screen comment 1(21) text-006.
    parameters:     p_voldl radiobutton group 2,     " Volume from Delivery
                    p_volmd radiobutton group 2.  " Volume from Master Data
    *-----------------------------------------------------End of SIR 061880
    selection-screen end of block b1.
    *--------------------------------------------------*Start of SIR 061880
    selection-screen begin of block b2 with frame title text-007.
    select-options: s_cbuun for knvv-kvgr1 no intervals,      " Customer BU
                    s_mbuun for mara-prdha+1(2) no intervals, " Material BU
                    s_lobus for mara-prdha+3(3) no intervals,         " LOB
                    s_pac1  for mara-prdha+6(3) no intervals.   " PAC1
    selection-screen end of block b2.
    *----------------------------------------------------*End of SIR 061880
    *---Type Declaration for Internal Tables------------------------------*
    types: begin of t_likp,
              vbeln      like likp-vbeln,  " delivery
              vstel      like likp-vstel,  " shipping point
              lfart      like likp-lfart,  " delivery type
              vkorg      like likp-vkorg,  " Sales organization
              kunag      like likp-kunag,  " sold-to party
              kunnr      like likp-kunnr,  " ship to party        SIR 34606
              btgew      like likp-btgew,  " Delivery weight
              gewei      like likp-gewei,  " Unit of weight
              anzpk      like likp-anzpk,  " Number of Packages   SIR 61880
              volum      like likp-volum,  " Delivery Volume      SIR 61880
              voleh      like likp-voleh,  " Volume Unit          SIR 61880
              vtwiv      like likp-vtwiv,  " Distribution channel
              spaiv      like likp-spaiv,  " Division
              wadat_ist  like likp-wadat_ist,  " actual goods issue date
              del_flg(1) type c,                            "(+) SIR 301978
           end of t_likp.
    types: begin of t_lips,
              vbeln      like lips-vbeln,  " delivery
              posnr      like lips-posnr,  " delivery line
              matnr      like lips-matnr,  " material
              lgort      like lips-lgort,  " storage location
              prodh      like lips-prodh,  " product hierarchy
              meins      like lips-meins,  " base UoM
              brgew      like lips-brgew,  " Material weight
              gewei      like lips-gewei,  " Unit of weight
              volum      like lips-volum,  " Material Volume      SIR 61880
              voleh      like lips-voleh,  " Volume Unit          SIR 61880
              lgmng      like lips-lgmng,  " actual delivery quantity
              komkz      like lips-komkz,  " Indicator for picking control
              mtart      like lips-mtart,  " Material type      " SIR 37838
              del_flg(1) type c,                            "(+) SIR 301978
           end of t_lips.
    types: begin of t_vepo,
              venum      like vepo-venum,  " shipping unit number
              vbeln      like vepo-vbeln,  " delivery
           end of t_vepo.
    types: begin of t_vekp,
              venum      like vekp-venum,  " shipping unit number
              brgew      like vekp-brgew,  " actual weight
              gewei_max  like vekp-gewei_max,  " unit of weight
              vpobjkey   like vekp-vpobjkey,   " key for assigned object
           end of t_vekp.
    types: begin of t_knvv,
              kunnr      like knvv-kunnr,  " customer number
              ktgrd      like knvv-ktgrd,  " acct assign group
              kvgr1      like knvv-kvgr1,  " customer group 1
           end of t_knvv.
    types: begin of t_kna1,                                     " SIR 34606
              kunnr      like kna1-kunnr,  " customer number    " SIR 34606
              land1      like kna1-land1,  " contry             " SIR 34606
           end of t_kna1.                                       " SIR 34606
    types: begin of t_marm,
              matnr      like marm-matnr,  " material
              meinh      like marm-meinh,  " Alt unit of measure     032383
              umrez      like marm-umrez,  " numerator
              umren      like marm-umren,  " denominator
           end of t_marm.
    types: begin of t_mara,                                     " SIR 38784
              matnr      like mara-matnr,  " material           " SIR 38784
              prdha      like mara-prdha,  " Product Hierarchy  " SIR 61880
              brgew      like lips-brgew,  " gross weight       " SIR 38784
              gewei      like mara-gewei,  " Unit of weight     " SIR 38784
              volum      like mara-volum,  " Volume             " SIR 61880
              voleh      like mara-voleh,  " Volume Unit        " SIR 61880
              del_flg(1) type c,                            "(+) SIR 301978
           end of t_mara.                                       " SIR 38784
    types: begin of t_tvswz,
              vstel      like tvswz-vstel, " shipping point
           end of t_tvswz.
    types: begin of t_z0234,                                        "032383
              vstel      like z0234-vstel, " shipping point          032383
              zpaluom    like z0234-zpaluom," pallet unit of measure 032383
              zcsuom     like z0234-zcsuom," Case unit of measure    032383
           end of t_z0234.                                          "032383
    types: begin of t_output_dt,
              wadat_ist    like likp-wadat_ist, " Goods issue date
              ktgrd        like knvv-ktgrd," acct assign group
              bu           like knvv-kvgr1," business unit
              kunnr        like kna1-kunnr," ship to location     SIR 34606
              land1        like kna1-land1," ship to location     SIR 34606
              d_btgew      like likp-btgew," delivery weight
              m_brgew      like lips-brgew," material weight
              a_brgew      like vekp-brgew," actual weight of ship unit
              num_del      type i,         " counter of deliveries
              num_pallets  type i,         " number of pallets
              num_cases    type i,         " number of cases
              num_loose    type i,         " loose quantity
              num_delln    type i,         " counter of delivery lines
    *         packages     like likp-anzpk," Number of Packages " SIR 61880
              packages(3)  type p,         " Number of Packages " SIR 61880
              volume       like lips-volum," Volume             " SIR 61880
              lobus(3)     type c,         " Line of Business   " SIR 61880
              pac1(3)      type c,                    " PAC1    " SIR 61880
           end of t_output_dt.
    types: begin of t_output_ag,
              ktgrd        like knvv-ktgrd," acct assign group
              bu           like knvv-kvgr1," business unit
              land1        like kna1-land1," country              SIR 34606
              d_btgew      like likp-btgew," delivery weight
              m_brgew      like lips-brgew," material weight
              a_brgew      like vekp-brgew," actual weight of ship unit
              num_del      type i,         " counter of deliveries
              num_pallets  type i,         " number of pallets
              num_cases    type i,         " number of cases
              num_loose    type i,         " loose quantity
              num_delln    type i,         " counter of delivery lines
    *         packages     like likp-anzpk," Number of Packages " SIR 61880
              packages(3)  type p,         " Number of Packages " SIR 61880
              volume       like lips-volum," Volume             " SIR 61880
              lobus(3)     type c,         " Line of Business   " SIR 61880
              pac1(3)      type c,                   " PAC1     " SIR 61880
           end of t_output_ag.
    types: begin of t_output_gs,                                " SIR 34606
              ktgrd        like knvv-ktgrd," acct assign group  " SIR 34606
              bu           like knvv-kvgr1," business unit      " SIR 34606
              d_btgew      like likp-btgew," delivery weight    " SIR 34606
              m_brgew      like lips-brgew," material weight    " SIR 34606
              a_brgew      like vekp-brgew," actual weight      " SIR 34606
              num_del      type i,         " counter of deliv   " SIR 34606
              num_pallets  type i,         " number of pallets  " SIR 34606
              num_cases    type i,         " number of cases    " SIR 34606
              num_loose    type i,         " loose quantity     " SIR 34606
              num_delln    type i,         " counter of deliv   " SIR 34606
    *         packages     like likp-anzpk, " Number of Package " SIR 61880
              packages(3)  type p,          " Number of Packages" SIR 61880
              volume       like lips-volum, " Volume            " SIR 61880
              lobus(3)     type c,          " Line of Business  " SIR 61880
              pac1(3)      type c,           " PAC1             " SIR 61880
           end of t_output_gs.                                  " SIR 34606
    *-------------------------------------------------* Begin of SIR 061880
    * Material Type
    types: begin of t_mtart,
           mtart like t134-mtart,                           " Material Type
           end of t_mtart.
    * Customer Business Unit.
    types: begin of t_kvgr1,
           kvgr1 like knvv-kvgr1,                        " Customer Group 1
           end of t_kvgr1.
    * sales Organization.
    types: begin of t_lgort,
           lgort like t001l-lgort,                     " Sales Organization
           end of t_lgort.
    *                                                   Begin of SIR 301978
    *      Header: Material Document
    types: begin of t_mkpf,
             vgart    type mkpf-vgart,
             xblnr    type likp-vbeln,
           end   of t_mkpf.
    *                                                     End of SIR 301978
    *---------------------------------------------------* End of SIR 061880
    *---Internal Tables---------------------------------------------------*
    data:  i_likp        type  t_likp occurs 0 with header line,
           i_temp_likp   type  t_likp occurs 0 with header line,
           v_likp        type  t_likp,
           i_lips        type  t_lips occurs 0 with header line,
           i_temp_lips   type  t_lips occurs 0 with header line,
           v_lips        type  t_lips,
           i_vepo        type  t_vepo occurs 0,
    *      V_VEPO        TYPE  T_VEPO,
           i_vekp        type  t_vekp occurs 0,
           v_vekp        type  t_vekp,
           i_knvv        type  t_knvv occurs 0 with header line,
           v_knvv        type  t_knvv,
           i_kna1        type  t_kna1 occurs 0,                 " SIR 34606
           v_kna1        type  t_kna1,                          " SIR 34606
           i_z0234       type  t_z0234 occurs 0,                "    032383
           v_z0234       type  t_z0234,                         "    032383
           i_z0234_uom   type  t_z0234 occurs 0,                "    032383
           v_z0234_uom   type  t_z0234,                         "    032383
           i_marm        type  t_marm occurs 0 with header line," SIR 61880
           i_marm_pallet type  t_marm occurs 0 with header line,
           v_marm_pallet type  t_marm,
           i_marm_case   type  t_marm occurs 0 with header line,
           v_marm_case   type  t_marm,
    *-------------------------------------------------* Begin of SIR 061880
    *      I_MARA        TYPE  T_MARA OCCURS 0,                 " SIR 38784
           i_mara1       type  t_mara  occurs 0 with header line,
           i_mtart       type  t_mtart occurs 0 with header line,
           i_kvgr1       type  t_kvgr1 occurs 0 with header line,
           i_lgort       type  t_lgort occurs 0 with header line,
           v_kvgr1       type  t_kvgr1,
    *---------------------------------------------------* End of SIR 061880
           v_mara        type  t_mara,                          " SIR 38784
           i_tvswz       type  t_tvswz occurs 0,
           v_tvswz       type  t_tvswz,                     "(+) SIR 301978
           i_output_dt   type  t_output_dt occurs 0,
           v_output_dt   type  t_output_dt,
           i_output_ag   type  t_output_ag occurs 0,
           v_output_ag   type  t_output_ag,
           i_output_gs   type  t_output_gs occurs 0,            " SIR 34606
           v_output_gs   type  t_output_gs,                     " SIR 34606
           i_mkpf        type  table of t_mkpf with header line."SIR 301978
    *** Data Declarations *
    data:  v_page(3)        type c,                          " Page Counter
           v_comp           like t001k-bukrs,       " zbsn0001 company code
           v_title(24)      type c,                 " zbsn0001 report title
           v_rpttyp         type c,                           " report type
           v_ok             type c,             " control While... endwhile
           v_diff_date      type p,                " days between selection
           v_werks          like t001l-werks,                       " plant
    *      v_z0234_zpaluom  like z0234-zpaluom,  " Pallet Unit of Measure
    *      v_z0234_zcsuom   like z0234-zcsuom,   " Case Unit of Measure
           v_palwto         type p decimals 6,                 " SIR 091510
    *       "like likp-btgew,       " Weight after conversion
           v_vekp_tabix     like sy-tabix,                  " index on read
           v_vekp_sum_brgew like vekp-brgew,                " actual weight
           v_pallet_qty     like lips-lgmng,        " calculated pallet qty
           v_pallet_integer type i,                       " true pallet qty
           v_case_qty       like lips-lgmng,          " calculated case qty
           v_case_integer   type i,                         " true case qty
           v_qty_not_pallets like lips-lgmng,                  " calculated
           v_num_pallets    like lips-lgmng,    " calculated nbr of pallets
           v_num_pallets_int type i,                  " true nbr of pallets
           v_num_cases      like lips-lgmng,      " calculated nbr of cases
           v_num_cases_int  type i,                     " true nbr of cases
           v_total_case_qty like lips-lgmng,                " case quantity
           v_loose_qty      type i,             " calculated loose quantity
    *-------------------------------------------------* Begin of SIR 061880
           v_volume         like lips-volum,      " Volume After Convertion
           v_cbuun          like knvv-kvgr1,                  " Customer BU
           v_mbuun          like knvv-kvgr1,                  " Material BU
           v_lobus(3)       type c,                      " Line of Business
           v_pac1(3)        type c,                                  " PAC1
           v_flag           type c.            " Flag Indicator for No Data
    *---------------------------------------------------* End of SIR 061880
    *                                                   Begin of SIR 301978
    * Ranges
    ranges : r_vstel for tvswz-vstel.
    *                                                     End of SIR 301978
    * Constants
    data:  c_uom(3)        type c value 'KG'.    " Kilogram Unit of Meas.
    data : c_vom like mara-voleh value 'M3'.   " Metter Cube.  " SIR 061880
    constants : c_wl(2) type c value 'WL'.                  "(+) SIR 301978
    * Initialization.
    initialization.
      s_lfart-sign   = 'I'.
      s_lfart-option = 'EQ'.
      s_lfart-low    = 'LF  '.
      append s_lfart.
      s_lfart-low    = 'NL  '.
      append s_lfart.
      s_lfart-low    = 'NLCC'.
      append s_lfart.
      s_lfart-low    = 'ZLFI'.
      append s_lfart.
    * AT SELECTION-SCREEN.
    at selection-screen.
    * SIR 42730 - If no Goods Issue Date has been specified in the
    *             Select Options set the range to the previous month.
      if s_wadat-low is initial.
        s_wadat-sign      = 'I'.
        s_wadat-option    = 'BT'.
        s_wadat-high      = sy-datum.              " Today's date
        s_wadat-high+6(2) = '01'.                  " First of this month
        s_wadat-high      = s_wadat-high - 1.      " End of last month
        s_wadat-low       = s_wadat-high.          " End of last month
        s_wadat-low+6(2)  = '01'.                  " First of last month
        append s_wadat.
      endif.     " SIR 42730 IF S_WADAT-LOW IS INITIAL.
      clear v_werks.                                        "(+) SIR 301978
    * Validate Plant/Storage Location from selection screen
      select werks up to 1 rows into v_werks from t001l
            where werks =  p_werks  and
                  lgort in s_lgort.
      endselect.
      if sy-subrc ne 0.
        message e045 with text-e01.
      endif.
    * Validate Storage Location
      if not s_lgort[] is initial.
        select lgort from t001l into table i_lgort where lgort in s_lgort.
        if sy-subrc ne 0.
          message e045 with text-e09.
        endif.
      endif.
    * Validate date range.  do not allow more that 31 days
      if not s_wadat-high is initial.
        v_diff_date = s_wadat-high - s_wadat-low.
        if v_diff_date >= '31'.
          message e045 with text-e02.
        endif.
      endif.
    *-------------------------------------------------* Begin of SIR 061880
    * Validation for Material Type in Selection Screen
      if not s_mtart[] is initial.
        select mtart from t134 into table i_mtart where mtart in s_mtart.
        if sy-subrc ne 0.
          message e045 with text-e07.
        endif.
      endif.
    at selection-screen on block b2.
    * Validation for Material Business Unit and Customer Business Unit.
      if s_cbuun-low is not initial and s_mbuun-low is not initial.
        message e045 with text-e05.
      endif.
    * Validation for Possible combinations of Material BU, Line of Business
    * and PAC1
      if ( s_mbuun-low is not initial and s_lobus-low is not initial
                                    and s_pac1-low is not initial )
      or ( s_mbuun-low is not initial and s_lobus-low is not initial )
      or ( s_lobus-low is not initial and s_pac1-low is not initial )
      or ( s_mbuun-low is not initial and s_pac1-low is not initial ).
        message e045 with text-e06.
      endif.
    * Validation for Customer Business Unit.
      if not s_cbuun[] is initial.
        select kvgr1 from tvv1 into table i_kvgr1 where kvgr1 in s_cbuun.
        if sy-subrc ne 0.
          message e045 with text-e08.
        endif.
    *    free: i_kvgr1.
      endif.
    *---------------------------------------------------- End of SIR 061880
    * TOP-OF-PAGE
    * Top of the page routine to print the headers and columns
    top-of-page.
      format color col_heading on.
      if v_rpttyp = 'D'.
        v_title = text-h01.
      else.
        v_title = text-h02.
      endif.
      perform zbsn0001_standard_header     " Standard Report Heading Form
               using v_comp v_title 'U' v_page.
      skip.
      if v_rpttyp = 'D'.
        perform write_dtlvl_headings.
      else.
        perform write_aglvl_headings.
      endif.
    *       FORM WRITE_DTLVL_HEADINGS                                     *
    *   for date detail level, print the column headers                   *
    form write_dtlvl_headings.
      write: /001 text-h03,                " Acct
              038 text-h04,                " ------ P I C K I N G ------
              105 text-h05,                " ----- S H I P P I N G -----
             /001 text-h06,                " Group
              007 text-h07,                " Date
              017 text-h08,                " BU
              021 text-h17,                " ship to party            34606
              030 text-h18,                " country
              039 text-h09,                " Pallets
              057 text-h10,                " Cases
              075 text-h11,                " Loose
              093 text-h12,                " Lines
              105 text-h13,                " Material Kg
              124 text-h16,                " Delivery Kg
              143 text-h14,                " Actual Kg
              161 text-h15,                " Deliveries
    *----------------------------------------------------Start of SIR 61880
              173 text-h20,                " Packages
              189 text-h21,                " Volume
              201 text-h22,                " LOB
              207 text-h23.                " PAC1
    *-----------------------------------------------------*End of SIR 61880
      skip.
    endform.                               " end of write_dtlvl_headings.
    *       FORM WRITE_AGLVL_HEADINGS                                     *
    *      for account group detail level, print the column headers       *
    form write_aglvl_headings.
      write: /001 text-h03,                " Acct
              038 text-h04,                " ------ P I C K I N G ------
              105 text-h05,                " ----- S H I P P I N G -----
             /001 text-h06,                " Group
              017 text-h08,                " BU
              030 text-h18,                " country              SIR 34606
              039 text-h09,                " Pallets
              057 text-h10,                " Cases
              075 text-h11,                " Loose
              093 text-h12,                " Lines
              105 text-h13,                " Material Kg
              124 text-h16,                " Delivery Kg
              143 text-h14,                " Actual Kg
              161 text-h15,                " Deliveries
    *---------------------------------------------------*Start of SIR 61880
              173 text-h20,                " Packages
              189 text-h21,                " Volume
              201 text-h22,                " LOB
              207 text-h23.                " PAC1
    *-----------------------------------------------------*End of SIR 61880
      skip.
    endform.                               " end of write_aglvl_headings.
    *-------------------------- SUBBROUTINES -----------------------------*
    include zbsn0001.      " Include to print all Standard Report Titles
    include zsdn0004.      " Print the Select Options
    *** MAIN SELECTION.                                                   *
    start-of-selection.
      refresh:  i_likp, i_temp_likp, i_lips, i_temp_lips, i_vepo,
                i_vekp, i_knvv, i_marm_pallet, i_marm_case, i_tvswz,
                i_output_dt, i_output_ag, i_mara1.
      clear:    v_likp, v_lips, v_vekp, v_knvv, v_mara,
                v_marm_pallet, v_marm_case, v_output_dt, v_output_ag.
      v_rpttyp = 'D'.
    * SIR 42730 - Echo the Select Options to the output listing and print
    *             the Goods Issue Date range being used.
      write: /,/.     " SIR 43730 - Skip a couple of lines to centre it.
      perform zsdn0004_print_select_options using sy-cprog ' '.
      if s_wadat-high is initial.
        write: /,/, text-003, 34 s_wadat-low.
      else.
        write: /,/, text-003, 34 s_wadat-low, 44 text-004, 47 s_wadat-high.
      endif.
      new-page.
    * Main Processing.                                                    *
      perform get_data.
      if not i_lips[] is initial.
        perform create_output.
      endif.
    * END-OF-SELECTION
    end-of-selection.
    *-------------------------------------------------* Start of SIR 061880
    *   PERFORM WRITE_REPORT.
      if not i_output_dt[] is initial and not i_output_ag[] is initial and
                                          not i_output_gs[] is initial.
        perform write_report.
      else.
        skip 2.
        write:/ text-e03.
        skip 2.
        uline.
        clear: v_flag.
      endif.
    *---------------------------------------------------* End of SIR 061880
    *       FORM GET_DATA                                                 *
    * build all of the internal tables needed for the report              *
    * selects on t001k, z0234, likp, lips, vepo, vekp, knvv & marm, mara  *
    form get_data.
      perform get_data_t001k.                                  " SIR 301978
      perform get_data_tvswz.                                  " SIR 301978
      if sy-subrc = 0.                     " Build shipping point range
        perform get_data_Z0234.                                " SIR 301978
        if sy-subrc ne 0.
          v_flag = 'X'.
    *      stop.
        else.
          sort i_z0234 by vstel.                                   " 032383
        endif.
    *                                                  Begin of  SIR 301978
    *   The data retrievalfrom LIKP has been modified for performance
    *   reasons
        perform get_data_mkpf.                                 " SIR 301978
        if sy-subrc eq 0.
    *     Deleting data other than Goods issued for delivery
          delete i_mkpf where vgart ne c_wl.
          sort i_mkpf by xblnr.
        endif.
    *   Deleting the data from the internal table i_likp by comparing
    *   shipping point
        r_vstel-sign = 'I'.
        r_vstel-option = 'EQ'.
        clear : v_tvswz.
        loop at i_tvswz into v_tvswz.
          r_vstel-low = v_tvswz-vstel.
          append r_vstel.
        endloop.
        if not i_mkpf[] is initial.
          perform get_data_likp.                             " SIR 301978
        endif.
        if sy-subrc = 0.
          delete i_likp where not lfart in s_lfart.
    *                                                  End    of SIR 301978
    *     Get data for the delivery lines
          if not i_likp[] is initial.
            perform get_data_lips.                         " SIR 301978
    *                                                  Begin of SIR 301978
            if i_lips[] is initial.
              v_flag = 'X'.
              message i089 with text-i02.
              leave list-processing.
            endif.                    " Return code for LIPS select
    *                                                     End of SIR 301978
          endif.
    *-------------------------------------------------* Begin of SIR 061880
    *     Get Data From MARA (Material Master) to Read Material Weight and
    *     Material Voluem from Master Data.
          if not i_lips[] is initial.
    *                                                   Begin of SIR 301978
    *       Delete the duplicate material from delivery item table
            i_temp_lips[] = i_lips[].
            sort i_temp_lips by matnr.
            delete adjacent duplicates from i_temp_lips comparing matnr.
            perform get_data_mara.                         " SIR 301978
            if sy-subrc = 0.
              sort i_mara1 by matnr.
              clear i_temp_lips.
              refresh i_temp_lips.
    *                                                     End of SIR 301978
            else.
              v_flag = 'X'.
              message i089 with text-i01.
              leave list-processing.
            endif.
          endif.
    *     Filter I_LIPS and I_MARA1 When Either material BU or Line of
    *     Business (LOB) or PAC1 are not left Balnk
          perform filter_data_for_prdha.
    *     Get data for the sold-to customer
          perform i_knvv_fill_data.
    *    Filter I_LIKP & I_LIPS & I_MARA for Cust-BU, When Cust-Bu is not
    *    left Blank.
          perform filter_likp_lips_mara_custbu.
    *---------------------------------------------------- End of SIR 061880
    *-------------------------------------------------* Begin of SIR 034606
    *     Get data for the ship to party
          i_temp_likp[]  = i_likp[].
          sort i_temp_likp by kunnr.
          delete adjacent duplicates from i_temp_likp comparing kunnr.
          perform get_data_kna1.                             " SIR 301978
          if sy-subrc = 0.
            sort i_kna1 by kunnr.
          endif.
    *---------------------------------------------------* End of SIR 034606
        else.
          v_flag = 'X'.
          message i089 with text-i04.
          leave list-processing.
        endif.                               " return code to LIKP select
    *    endif.                                                " SIR 061880
        free: i_temp_likp.
      endif.                               " return code for TVSWZ select
    * Process table LIPS
      if not i_lips[] is initial.
        i_temp_lips[] = i_lips[].
        sort i_temp_lips by vbeln.
        delete adjacent duplicates from i_temp_lips comparing vbeln.
    *   Get actual weight
        perform get_data_vepo.                                 " SIR 301978
        if sy-subrc = 0.
          sort i_vepo by venum.
          delete adjacent duplicates from i_vepo comparing venum.
          perform get_data_vekp.                               " SIR 301978
          sort i_vekp by vpobjkey.
        endif.
        free:  i_vepo, i_temp_lips.
        i_temp_lips[] = i_lips[].
        sort i_temp_lips by matnr.
        delete adjacent duplicates from i_temp_lips comparing matnr.
    *   Get Units of Measure for Material
        perform read_data_from_marm.                           " SIR 061880
    *                                                   Begin of SIR 032383
        i_z0234_uom = i_z0234.
        sort i_z0234_uom by zpaluom.
        delete adjacent duplicates from i_z0234_uom comparing zpaluom.
    *                                                   End   of SIR 032383
        clear i_marm_pallet.                                   " SIR 061880
        refresh  i_marm_pallet.                                " SIR 061880
        loop at i_z0234_uom into v_z0234_uom.             "LOOP Z0234 032383
    *-------------------------------------------------* Begin of SIR 061880
    *     Get Alternative Unit of Measure for Pallets
          perform i_marm_pallet_fill.
        endloop.                                      "ENDLOOP Z0234 032383
    ** get alternative UoM for pallets
    *      SELECT MATNR                     " material
    *             MEINH                     " Alt unit of measure  " 032383
    *             UMREZ                     " numerator
    *             UMREN                     " denominator
    **     into table i_marm_pallet                                " 032383
    *      APPENDING TABLE I_MARM_PALLET                            "032383
    *      FROM MARM
    *      FOR ALL ENTRIES IN I_TEMP_LIPS
    *      WHERE MATNR = I_TEMP_LIPS-MATNR  AND
    **           meinh = v_z0234_zpaluom.                          " 032383
    *            MEINH = V_Z0234_UOM-ZPALUOM.                      " 032383
    *---------------------------------------------------* End of SIR 061880
        sort i_marm_pallet by matnr meinh.
        free i_z0234_uom.                                           "032383
        i_z0234_uom = i_z0234.                                      "032383
        sort i_z0234_uom by zcsuom.                                 "032383
        delete adjacent duplicates from i_z0234_uom comparing zcsuom."32383
        clear i_marm_case.                                     " SIR 061880
        refresh i_marm_case.                                   " SIR 061880
        loop at i_z0234_uom into v_z0234_uom.            "LOOP Z0234 032383
    *-------------------------------------------------* Begin of SIR 061880
    *     Get Alternative Unit of Measure for Cases
          perform i_marm_case_fill.
        endloop.                                      "ENDLOOP Z0234 032383
    *---------------------------------------------------* End of SIR 061880
        sort i_marm_case by matnr meinh.
      else.
        v_flag = 'X'.
        message i089 with text-i02.
    *      leave list-processing.
      endif.                               " table LIPS is empty
    endform.                               " get_data
    *       FORM CREATE_OUTPUT                                            *
    * process internal table LIPS, for each delivery/delivery lines create*
    * an output record and collect into i_output internal table.  Fields  *
    * used for header are goods issue date, acct assign, BU for customer, *
    * total weight, total weight for shipping unit and count of           *
    * deliveries, the remaining fields will have a value of zero for the  *
    * collect.  For each delivery line, fields used are goods issue date, *
    * acct assign, BU for material, number of pallets, number of cases,   *
    * loose quantity and number of delivery lines.  The remaining header  *
    * fiels will be zero for the collect.                                 *
    form create_output.
    *-------------------------------------------------* Begin of SIR 061880
      sort i_mara1 by matnr.
      sort i_lips by vbeln posnr matnr.
      sort i_likp by vbeln.
      sort i_z0234 by vstel.
      sort i_knvv by kunnr.
      sort i_kna1 by kunnr.
      sort i_vekp by vpobjkey.
      sort i_marm_pallet by matnr meinh.
      sort i_marm_case by matnr meinh.
    * LOOP AT I_LIPS INTO V_LIPS.
      loop at i_lips.
        clear v_lips.
        v_lips = i_lips.
    *---------------------------------------------------* End of SIR 061880
        at new vbeln.
          perform collect_header_data.
        endat.
        if not v_lips-komkz is initial.                         " SIR 45567
          perform collect_item_data.
        endif.                                                  " SIR 45567
      endloop.
    endform.                               " create_output
    *       FORM COLLECT_HEADER_DATA                                      *
    * Fields used for header are goods issue date, acct assign,           *
    * BU for customer, total weight, total weight for shipping unit       *
    * and count ofdeliveries, the remaining fields will have a value of   *
    * zero for the collect.                                               *
    form collect_header_data.
      clear:  v_likp, v_knvv, v_vekp, v_vekp_sum_brgew.
      v_ok = 'Y'.
      read table i_likp into v_likp with key vbeln = v_lips-vbeln
                                                   binary search.
      if sy-subrc = 0.                                         " SIR 061880
        clear v_z0234.                                      "(+) SIR 301978
        read table i_z0234 into v_z0234                              "32383
             with key vstel = v_likp-vstel                           "32383
             binary search.                                          "32383
        read table i_knvv into v_knvv with key kunnr = v_likp-kunag
                                                     binary search.
        if sy-subrc ne 0.
          select single ktgrd kvgr1 into (v_knvv-ktgrd, v_knvv-kvgr1)
            from knvv where kunnr = v_likp-kunag  and
                            vkorg = v_likp-vkorg  and
                           vtweg = '01' and          " intercompany values
                           spart = '01'.             " intercompany values
        endif.
        clear v_kna1.                                           " SIR 34606
        read table i_kna1 into v_kna1                           " SIR 34606
           with key kunnr = v_likp-kunnr                        " SIR 34606
           binary search.                                       " SIR 34606
        read table i_vekp into v_vekp
           with key vpobjkey(10) = v_likp-vbeln
           binary search.
        if sy-subrc = 0.
          v_vekp_tabix = sy-tabix.
          while v_ok = 'Y'.
            if v_vekp-gewei_max ne c_uom.
              perform z_unit_conversion
                using v_vekp-brgew v_vekp-gewei_max c_uom v_palwto.
              v_vekp_sum_brgew = v_vekp_sum_brgew + v_palwto.
            else.
              v_vekp_sum_brgew = v_vekp_sum_brgew + v_vekp-brgew.
            endif.
            v_vekp_tabix = v_vekp_tabix + 1.
            read table i_vekp into v_vekp
               index v_vekp_tabix.
            if sy-subrc = 0.
              if v_vekp-vpobjkey(10) ne v_likp-vbeln.
                v_ok = 'N'.
              endif.
            else.
              v_ok = 'N'.
            endif.
          endwhile.
        endif.
      endif.                                                   " SIR 061880
    * populate output tables
      clear: v_output_dt, v_output_ag,v_output_gs.              " SIR 34606
      v_output_dt-wadat_ist = v_likp-wadat_ist.
      v_output_dt-ktgrd     = v_knvv-ktgrd.
      v_output_ag-ktgrd     = v_knvv-ktgrd.
      v_output_gs-ktgrd     = v_knvv-ktgrd.                     " SIR 34606
    *-------------------------------------------------* Begin of SIR 061880
    *  V_OUTPUT_DT-BU        = V_KNVV-KVGR1.
    *  V_OUTPUT_AG-BU        = V_KNVV-KVGR1.
    *  V_OUTPUT_GS-BU        = V_KNVV-KVGR1.                    " SIR 34606
    * Populate Business Unit,Line of Busness and PAC1 Values in Header Data
      perform get_busunit_lobus_pac1_data1.
    *---------------------------------------------------* End of SIR 061880
      v_output_dt-kunnr = v_kna1-kunnr.                         " SIR 34606
    * V_OUTPUT_AG-KUNNR = V_KNA1-KUNNR.                         " SIR 34606
      v_output_dt-land1 = v_kna1-land1.                         " SIR 34606
      v_output_ag-land1 = v_kna1-land1.                         " SIR 34606
      v_output_dt-a_brgew     = v_vekp_sum_brgew.
      v_output_ag-a_brgew     = v_vekp_sum_brgew.
      v_output_gs-a_brgew     = v_vekp_sum_brgew.               " SIR 34606
      if s_mbuun[] is initial and                               " SIR 61880
         s_lobus[] is initial and                               " SIR 61880
         s_pac1[] is  initial.                                  " SIR 61880
        v_output_dt-num_del   = 1.
        v_output_ag-num_del   = 1.
        v_output_gs-num_del   = 1.                              " SIR 34606
    *-------------------------------------------------* Begin of SIR 061880
    * Number of Packages
        v_output_dt-packages   = v_likp-anzpk.
        v_output_ag-packages   = v_likp-anzpk.
        v_output_gs-packages   = v_likp-anzpk.
      else.
        clear: v_output_dt-num_del,
               v_output_ag-num_del,
               v_output_gs-num_del,
               v_output_dt-packages,
               v_output_ag-packages,
               v_output_gs-packages.
      endif.
    *---------------------------------------------------* End of SIR 061880
      collect v_output_dt into i_output_dt.
      collect v_output_ag into i_output_ag.
      collect v_output_gs into i_output_gs.                     " SIR 34606
    endform.                               " collect_header_data
    *       FORM COLLECT_ITEM_DATA                                        *
    * For each delivery line, fields used are goods issue date,           *
    * acct assign, BU for material, number of pallets, number of cases,   *
    * loose quantity and number of delivery lines.  The remaining header  *
    * fiels will be zero for the collect.                                 *
    form collect_item_data.
      clear:  v_pallet_qty,      v_pallet_integer,
              v_case_qty,        v_case_integer,
              v_num_pallets,     v_num_pallets_int,
              v_num_cases,       v_num_cases_int,
              v_qty_not_pallets, v_total_case_qty, v_loose_qty.
      read table i_marm_pallet into v_marm_pallet
                 with key matnr = v_lips-matnr
                          meinh = v_z0234-zpaluom binary search."32382
      if sy-subrc = 0.
        v_pallet_qty = v_marm_pallet-umrez / v_marm_pallet-umren.
    * round down partial pallets
        v_pallet_integer = v_pallet_qty - '.499'.
      endif.
      read table i_marm_case into v_marm_case
                  with key matnr = v_lips-matnr
                           meinh = v_z0234-zcsuom binary search."32382
      if sy-subrc = 0.
        v_case_qty = v_marm_case-umrez / v_marm_case-umren.
    * round down partial cases
        v_case_integer = v_case_qty - '.499'.
      endif.
      if v_pallet_integer > 0.
        v_num_pallets     = v_lips-lgmng / v_pallet_integer.
        v_num_pallets_int = v_num_pallets - '.499'.
      endif.
      v_qty_not_pallets = v_lips-lgmng -
                          ( v_num_pallets_int * v_pallet_integer ).
      if v_case_integer > 0.
        v_num_cases     = v_qty_not_pallets / v_case_integer.
        v_num_cases_int = v_num_cases - '.499'.
      endif.
      v_total_case_qty     = v_num_cases_int * v_case_integer.
      if v_qty_not_pallets = v_total_case_qty.
        v_loose_qty = 0.
      else.
        v_loose_qty = 1.
      endif.
    * populate output tables
      clear: v_output_dt, v_output_ag, v_output_gs.             " SIR 34606
      v_output_dt-wadat_ist   = v_likp-wadat_ist.
      v_output_dt-ktgrd       = v_knvv-ktgrd.
      v_output_ag-ktgrd       = v_knvv-ktgrd.
      v_output_gs-ktgrd       = v_knvv-ktgrd.                   " SIR 34606
      v_output_dt-kunnr = v_kna1-kunnr.                         " SIR 34606
    * V_OUTPUT_AG-KUNNR = V_KNA1-KUNNR.                         " SIR 34606
      v_output_dt-land1 = v_kna1-land1.                         " SIR 34606
      v_output_ag-land1 = v_kna1-land1.                         " SIR 34606
    *-------------------------------------------------* Begin of SIR 061880
    *  V_OUTPUT_DT-BU          = V_LIPS-PRODH+1(2).
    *  V_OUTPUT_AG-BU          = V_LIPS-PRODH+1(2).
    *  V_OUTPUT_GS-BU          = V_LIPS-PRODH+1(2).             " SIR 34606
    * Populate Business Unit,Line of Business and PAC1 Values for Item Data.
      perform get_busunit_lobus_pac1_data2.
      if V_OUTPUT_DT-BU is initial.
       clear V_OUTPUT_DT.
       exit.
      endif.
    *---------------------------------------------------* End of SIR 061880
    * get delivery weight from delivery lines instead of header " SIR 45567
      if v_lips-gewei = c_uom.
        v_output_dt-d_btgew  = v_lips-brgew.
        v_output_ag-d_btgew  = v_lips-brgew.
        v_output_gs-d_btgew  = v_lips-brgew.                    " SIR 34606
      else.
        perform z_unit_conversion
             using v_lips-brgew v_lips-gewei c_uom v_palwto.
        v_output_dt-d_btgew  = v_palwto.
        v_output_ag-d_btgew  = v_palwto.
        v_output_gs-d_btgew  = v_palwto.                        " SIR 34606
      endif.
    * Get material weight from delivery (LIPS)(IF P_DELWT = 'X')" SIR 38784
      if p_delwt = 'X'.                                         " SIR 38784
        if v_lips-gewei = c_uom.
          v_output_dt-m_brgew  = v_lips-brgew.
          v_output_ag-m_brgew  = v_lips-brgew.
          v_output_gs-m_brgew  = v_lips-brgew.                  " SIR 34606
        else.
          perform z_unit_conversion
               using v_lips-brgew v_lips-gewei c_uom v_palwto.
          v_output_dt-m_brgew  = v_palwto.
          v_output_ag-m_brgew  = v_palwto.
          v_output_gs-m_brgew  = v_palwto.                      " SIR 34606
        endif.
      else.                                                     " SIR 38784
    * Get material weight from Master data (MARA)               " SIR 38784
        read table i_mara1 into v_mara                          " SIR 38784
                               with key matnr = v_lips-matnr    " SIR 38784
                               binary search.                   " SIR 38784
        if v_mara-gewei = c_uom.                                " SIR 38784
          v_output_dt-m_brgew  = v_mara-brgew * v_lips-lgmng.   " SIR 38784
          v_output_ag-m_brgew  = v_mara-brgew * v_lips-lgmng.   " SIR 38784
          v_output_gs-m_brgew  = v_mara-brgew * v_lips-lgmng.   " SIR 38784
        else.                                                   " SIR 38784
          perform z_unit_conversion                             " SIR 38784
               using v_mara-brgew v_mara-gewei c_uom v_palwto.  " SIR 38784
          v_output_dt-m_brgew  = v_palwto * v_lips-lgmng.       " SIR 38784
          v_output_ag-m_brgew  = v_palwto * v_lips-lgmng.       " SIR 38784
          v_output_gs-m_brgew  = v_palwto * v_lips-lgmng.       " SIR 38784
        endif.                                                  " SIR 38784
      endif.                                                    " SIR 38784
    *-------------------------------------------------* Begin of SIR 061880
    * To Get the Volume Data.
      perform get_volume_data.
    *---------------------------------------------------* End of SIR 061880
      v_output_dt-num_pallets = v_num_pallets_int.
      v_output_ag-num_pallets = v_num_pallets_int.
      v_output_gs-num_pallets = v_num_pallets_int.              " SIR 34606
      v_output_dt-num_cases   = v_num_cases_int.
      v_output_ag-num_cases   = v_num_cases_int.
      v_output_gs-num_cases   = v_num_cases_int.                " SIR 34606
      v_output_dt-num_loose   = v_loose_qty.
      v_output_ag-num_loose   = v_loose_qty.
      v_output_gs-num_loose   = v_loose_qty.                    " SIR 34606
    *{   INSERT         D11K901833                                        1
    * Sir 054042/48712 insert code to put in 0 instead of 1 for collect
    * value for delivery lines
      if v_lips-lgmng = 0.
        v_output_dt-num_delln   = 0.
        v_output_ag-num_delln   = 0.
        v_output_gs-num_delln   = 0.
      else.
    * end of insert for 054042/48712
    *}   INSERT
        v_output_dt-num_delln   = 1.
        v_output_ag-num_delln   = 1.
        v_output_gs-num_delln   = 1.          

    Since this is your first post, let me clue you in. This forum is meant for asking very short and specific questions. For example, if you've asked, how could you improve a particular one SELECT statement, I'm sure many people would have helped you.
    But you cannot seriously expect someone on this forum to spend his/her time and review such a long program. For this people are normally getting paid, you know.

  • How to record receipt write off for the PO receipt ?

    How to record receipt write off for the PO receipt ?

    You can refer this link
    http://docs.oracle.com/cd/A60725_05/html/comnls/us/po/rcvacc07.htm
    thanks

  • How to improve query & loading performance.

    Hi All,
    How to improve query & loading performance.
    Thanks in advance.
    Rgrds
    shoba

    Hi Shoba
    There are lot of things to improve the query and loading performance.
    please refer oss note :557870 : Frequently asked questions on query performance
    also refer to
    weblogs:
    /people/prakash.darji/blog/2006/01/27/query-creation-checklist
    /people/prakash.darji/blog/2006/01/26/query-optimization
    performance docs on query
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/064fed90-0201-0010-13ae-b16fa4dab695
    This is the oss notes of FAQ on query performance
    1. What kind of tools are available to monitor the overall Query Performance?
    1. BW Statistics
    2. BW Workload Analysis in ST03N (Use Export Mode!)
    3. Content of Table RSDDSTAT
    2. Do I have to do something to enable such tools?
    Yes, you need to turn on the BW Statistics:
    RSA1, choose Tools -> BW statistics for InfoCubes
    (Choose OLAP and WHM for your relevant Cubes)
    3. What kind of tools is available to analyze a specific query in detail?
    1. Transaction RSRT
    2. Transaction RSRTRACE
    4. Do I have an overall query performance problem?
    i. Use ST03N -> BW System load values to recognize the problem. Use the number given in table 'Reporting - InfoCubes:Share of total time (s)' to check if one of the columns %OLAP, %DB, %Frontend shows a high number in all Info Cubes.
    ii. You need to run ST03N in expert mode to get these values
    5. What can I do if the database proportion is high for all queries?
    Check:
    1. If the database statistic strategy is set up properly for your DB platform (above all for the BW specific tables)
    2. If database parameter set up accords with SAP Notes and SAP Services (EarlyWatch)
    3. If Buffers, I/O, CPU, memory on the database server are exhausted?
    4. If Cube compression is used regularly
    5. If Database partitioning is used (not available on all DB platforms)
    6. What can I do if the OLAP proportion is high for all queries?
    Check:
    1. If the CPUs on the application server are exhausted
    2. If the SAP R/3 memory set up is done properly (use TX ST02 to find bottlenecks)
    3. If the read mode of the queries is unfavourable (RSRREPDIR, RSDDSTAT, Customizing default)
    7. What can I do if the client proportion is high for all queries?
    Check whether most of your clients are connected via a WAN connection and the amount of data which is transferred is rather high.
    8. Where can I get specific runtime information for one query?
    1. Again you can use ST03N -> BW System Load
    2. Depending on the time frame you select, you get historical data or current data.
    3. To get to a specific query you need to drill down using the InfoCube name
    4. Use Aggregation Query to get more runtime information about a single query. Use tab All data to get to the details. (DB, OLAP, and Frontend time, plus Select/ Transferred records, plus number of cells and formats)
    9. What kind of query performance problems can I recognize using ST03N
    values for a specific query?
    (Use Details to get the runtime segments)
    1. High Database Runtime
    2. High OLAP Runtime
    3. High Frontend Runtime
    10. What can I do if a query has a high database runtime?
    1. Check if an aggregate is suitable (use All data to get values "selected records to transferred records", a high number here would be an indicator for query performance improvement using an aggregate)
    2. o Check if database statistics are update to data for the Cube/Aggregate, use TX RSRV output (use database check for statistics and indexes)
    3. Check if the read mode of the query is unfavourable - Recommended (H)
    11. What can I do if a query has a high OLAP runtime?
    1. Check if a high number of Cells transferred to the OLAP (use "All data" to get value "No. of Cells")
    2. Use RSRT technical Information to check if any extra OLAP-processing is necessary (Stock Query, Exception Aggregation, Calc. before Aggregation, Virtual Char. Key Figures, Attributes in Calculated Key Figs, Time-dependent Currency Translation) together with a high number of records transferred.
    3. Check if a user exit Usage is involved in the OLAP runtime?
    4. Check if large hierarchies are used and the entry hierarchy level is as deep as possible. This limits the levels of the hierarchy that must be processed. Use SE16 on the inclusion tables and use the List of Value feature on the column successor and predecessor to see which entry level of the hierarchy is used.
    5. Check if a proper index on the inclusion table exist
    12. What can I do if a query has a high frontend runtime?
    1. Check if a very high number of cells and formatting are transferred to the Frontend (use "All data" to get value "No. of Cells") which cause high network and frontend (processing) runtime.
    2. Check if frontend PC are within the recommendation (RAM, CPU MHz)
    3. Check if the bandwidth for WAN connection is sufficient
    and the some threads:
    how can i increse query performance other than creating aggregates
    How to improve query performance ?
    Query performance - bench marking
    may be helpful
    Regards
    C.S.Ramesh
    [email protected]

  • Why is the GTX470/480 giving me the same performance as the old GTX 285?

    Hello
    Just love Adobe CS5 but still has some questions?
    Starting this thread because I would like to know why Fermi series is not fully utilized inside Adobe?
    For example, why is the GTX470/480 giving me the same performance as the old GTX 285?
    Is this problem at Adobe or Nvidia or both?
    Will this change in the future upcoming update from Adobe/Nvidia?
    Best regards
    Mikael

    Hello my Adobe friends, I love Adobe so don't get me wrong here:-)
    This is my system:
    Intel i7 920
    Asus P6T Deluxe V2 (X58 chipset)
    Corsair 12GB (1600MHz)
    Adaptec 3085 raid card with 4 x 1000GB Seagate in a raid 5
    Nvidia GTX470 with the latest driver
    AJA Kona LHi
    C disk Intel SSD G2 with Windows 7 Ultimate 64bit with latest driver
    Adobe CS5 with al the latest update inkl 5.0.2.
    Just read this from dvinfo Adobe and our friend Harm Millaard, so I can not be that wrong about it?
    "Currently MPE is still in it's infancy and CUDA Toolkit 3.1 has just appeared.
    What does that mean?
    First of all that at this moment in time there is no performance difference noticeable between a GTX-285 and a GTX-480, tested on the same system. This despite more than double the cores and double the width of the memory bus of the 480 over the 285.
    At this moment the conclusion may be that the 460 is the most attractively priced MPE card with the same performance as the 480.
    However, it is to be expected that when MPE get's more mature, it will use available cores more efficiently. Just like the threading on certain processes in CS5 that is far from optimal, causing much more latency in the communication between CPU - RAM - GPU - VRAM and back, especially on hexa cores.
    Threading is a major factor for performance gains, both in the CPU and in the GPU. Therefore I expect that in time the 470 or 480 will be a much better choice than the 460".
    Best Regards
    Mikael

  • How to improve af:popup performance and decrease the popup opening time?

    Hi All,
    I am trying to open a popup on mouse over of af:commandImageLink. Popup is opening properly but its taking quite some time for loading and opening. As I am opening af:menu component which is enclosed in af:popup on mouse over of af:commandLink I need memu to be opened immediately as soon as user places mouse over commandImageLink component.
    Is there any way we can decrease the popup opening time?
    Below is code snippet using for command Link and popup:
    Step1:
    <af:commandImageLink text="#{aaa.Data}" binding="#{navigationUtilBean.DataMenu}" icon="/images/MenuArrow_final.png"
    iconPosition="trailing">
    <af:showPopupBehavior popupId="::DataPopup"
    triggerType="mouseOver"
    align="afterStart"/>
    <af:clientListener method="onMouseOver" type="mouseOver" />
    </af:commandImageLink>
    Step2:
    <af:popup id="DataPopup" contentDelivery="immediate" animate="false" clientComponent="true"
    launcherVar="source" eventContext="launcher">
    <af:menu>
    <af:group>
    <af:commandMenuItem icon="/images/DropDownMenuArrow.png" text="#{aaa.Data}" inlineStyle="width:100px;"
    action="#{navigationUtilBean.conTimeIntervalAction}"
    actionListener="#{halfHSubDataSelectionBC.fetcAAHData2Accounts}"
    />
    </af:group>
    <af:group>
    <af:commandMenuItem text="#{aaa.NON_Data}" icon="/images/DropDownMenuArrow.png"
    action="#{navigationUtilBean.nonTimeIntervalAction}"
    actionListener="#{nonAASubDataSelectionBC.fetchNonAADataAccounts}" />
    </af:group>
    </af:menu>
    <af:clientListener method="popupClosedListener" type="popupClosed" />
    <af:serverListener type="serverPopupClosed" method="#{navigationUtilBean.serverPopupClosedListener}" />
    </af:popup>
    Edited by: 940044 on Jun 12, 2012 3:04 AM

    Hi,
    Welcome to OTN.
    As per the tag doc,
    The "mouseOver" or "mouseHover" event types have a built in 500-millisecond launch delay that is implicitly canceled if a "mouseOut" event is triggered for the same component within the delay period.http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showPopupBehavior.html
    I don't think you can change that 500 millisecond delay.
    -Arun

  • How can I save/write data on the hard disc of the Real-Time System?

    I would like to acquire huge size of data via LabView Real-Time System.
    Since data is so huge, I am now thinking that it might be good idea to
    write/save data on the hard disc of the Real-Time System first and then
    transfer the data file to a data processing PC using FTP etc.
    If you know how to save/write data on the hard disc of the Real-Time System
    (Ver. 7.1), please let me know.
    Thanks,

    Just to add to Aitortxo's good answer,
    Since you have only one Drive ( C:\) on your RT, just keep monitering the availible disc space.
    After every few set of file writes keep transferring Backups delete these files, so that you  keep C:\ drive space for running your applications.
    Regards

  • How to measure work centre performance in the pp point and pm pinot of view

    Dear Guru`s,
    how to evaluate the work centre performance in the pp,pm point?
    how to evaluate the OEE (overall equipment efficieny)?
    can anybody suggest that, if there is any transactions are avialable to get the reports or any process is to be followed to evaluate these?.
    regards,

    hi
    you can evaluate the PM work center using t-codes
    CR05 - Work Center List
    CR06 - Cost Center Assignment
    CR07 - Work Center Capacity
    CR08 - Work Center Hierarchy
    with this you can get the requirment,available and overlaod of the capacity
    OEE cannot be directly calculated you can develop the custom based program to calulate the one with available input,( available hrs,down time hrs)
    regards
    thyagarajan

  • How well does MacBook air Perform with the sims 2?

    I don't know how you apple lovers did this to me but..  God, after yeas of hating Mac for no appearent reason and favoring microsoft, worshiping Bill gates someone handed me an iPhone and it was love at first touch. I'm sorry Bill I can no longer resist apple's incredible products! Time to get my first apple computer! Bottom line I love the sims 2 and wish to have a laptop that plays it easily. I've got my eyes on the latest MacBook pro, is it captable? The bigger issue is the price.. One thousand dollars is already a ton of money but amazingly I'm willing To spend just that but two thousand dollars is out of the question.. I need a MacBook of any sort that will play the sims 2 at least and a decent screen resolution.. I'm probably better off with a windows vista. Prove me wrong!

    I have several other Macromedia applications - but not Air. But if the other applications are an indication, boot is going to be slow (around a minute); Air's dependence on Flash will guarantee relatively slow performance. As you know, most other applications boot in seconds.
    Your best solution would be to download the free part of the programs to determine if you find the performance acceptable.

  • How is the graphics performance with the HD4000 GPU forced on

    How folks....
    I am wondering if anyone here is running there rMBP with the HD4000 GPU forced on (using gfxCardStatus.)
    I always run with the integrated GPU on my Late 2011 MBP 15 (the GPU performance is adequate for me this way with the HD3000.)
    Since there are a lot more pixels to drive on the rMBP, I wonder if the scrolling, screen switching, going to mission control and back, etc. suffers when using the integrated GPU only. I wonder if anyone is willing to give this a try? This might also fix the graphics corruptions problem you guys have been seeing when coming back from sleep with the rMBP.
    gfxCardStatus download link: http://codykrieger.com/gfxCardStatus (v 2.2.1 supports Mountain Lion as well as the Retina MBP.)
    Regards,
    Karan

    I've got a 1.8 with upgraded RAM and have had no problems outputting to my 720p display. Some previous posts have stated that doing 1080i with a compressed feed is the only thing that is too much and you need the new model for that.

  • Help with how to read and write files to the applets server

    I am writing a form that requires some data to be written serverside(not on the host machine) and I also need to be able to read from those same files.
    Can anyone provide any help?
    I looked into signing but it seems, to me, that signing is for when you are going to be modifying files on the host...

    brianb7590 wrote:
    Would I use that to refer to the file like I would with a regular application?Nope. It's pretty complicated. You've got to set something up on the server to accept requests, get all the data and then save files somewhere and on the client side you've got to make the connection and send the data.
    Edited by: tjacobs01 on Apr 13, 2009 5:49 PM

  • How to improve slow PowerPivot performance when adding/modifying measures, calculated columns or Relationships?

    I have been using PowerPivot for a couple of months now and whilst it is extremely quick when pulling in data to populate Pivot Tables, it is extremely slow to make the following kind of changes to the Data Model:
    - Add a Measure / Calculated Field
    - Add a Calculated Column
    - Rename a Calculated Field
    - Re-name a Calculated Column
    - Modify a relationship
    - Change a tables properties
    - Update a table
    In the status bar of excel I get a very quick 'calculating', then it spends a lot of time 'reading data',
    then it 'finalises' after which nothing is in the status bar but it still takes approx. 45 seconds before the program becomes responsive again. This waiting time does not change depending on the action, it is the same if I rename a
    column as it is if I add a new measure.
    My question is what affects performance of these actions and how do I improve it?
    To give you an idea of where my data comes from, I have:
    - 7 tables that feed into the Data Model directly from within the workbook which contains the data model itself. These are a combination of static tables and tables that connect to a MySQL database.
    - 6 separate workbooks which contain static data that is updated manually periodically (copied and pasted from another source)
    - 5 separate workbooks which contain dynamic tables that are linked to our MySQL database and update when opened.
    Now I realise that this is probably where my issue is, however I have no idea how to fix it. You do not seem to be able to connect to a MySQL database directly within the PowerPivot window itself so there is no way to generate and update tables without
    first creating them either in a worksheet or separate workbook (as far as I know).  If I try to create all of the tables directly within the single workbook containing the Data Model I get performance and crashing issues hence why I separate tables into
    individual workbooks.
    Any advice on how to improve performance would be tremendously appreciated. I'm new and keen to learn, I'm aware this set-up is far from best practice.
    Hardware wise I am using:
    - Windows 8 64-bit
    - Excel 2013 64-bit
    - Intel Core i7 processor
    - 6 GB Ram
    Thanks,
    James

    Darren,
    I think the point I was making is its in memory, geez... BTW what do all applications do when they run out of paged memory,  if PowerPivot is using all available memory then wouldn't this force the other applications to use Virtual or essentially write
    back and forth to the disks? I think Virtual memory white to disk ??, lol Also, there are parts if the architecture of Excel 2013 that when importing data into PowerPivot require memory and when working in SharePoint the PowerPivot data is cached to disk
    unless recently refreshed... But this conversation isn't help the James who asked the question and as much as I would love to continue its become a little boring..
    Hi James,
    If you download one the ODBC MySQL Connectors
    http://dev.mysql.com/downloads/connector/odbc/ and I believe yours is the first one for x64 systems and connect directly to the data you should be able to reduce the number of workbooks your opening and if you notice in the following graphic these
    connection are automatically refreshed by default, the parts in red are the differences between PowerPivot 2010 and 2013
    You should notice a lot of improvement especially when refreshing data please let us know how it goes...
    After registering the ODBC Driver
    Click Add. on the User-DSN sheet, choose the “MySQL ODBC 5.x driver”, fill in the credentials, choose a database (from the select menu) and a data source name and you’re done.
    Back in Excel you go on the PowerPivot section of the ribbon and open the PowerPivot window  (the green icon on the left side). In the ‘Home’ section of that window you will see a small gray cylindrical symbol (the international
    symbol for “database”) which will suggest to you different data sources to choose from. Take the one where it says “ODBC”.
    In the next dialog you click on create, choose the adapter, and then Ok. Back in the assistant you can check the connection and proceed.
    Now you have the choice between importing the data from tables using the import assistant or Query depends on your skillset..
    Cheers,
    Ivan
    Ivan Sanders <a href="http://www.linkedin.com/in/iasanders">My LinkedIn </a> , <a href="http://msmvps.com/blogs/ivansanders">My Blog</a>, <a href="http://twitter.com/iasanders"> @iasanders</a>,
    <a href="http://shop.oreilly.com/product/0790145372703.do">BI in SP2013</a>, <a href="http://sharepointdemobuilds.codeplex.com">SP2013 Content Packs</a>.

  • How to improve ODS archiving performance ?

    Hello,
    We are having a huge ODS with nearby 800 millions records. We are
    planning to archive this ODS as soon as possible. We've begun to
    archive the ODS month by month, but as you can imagine the write/delete
    (SARA) process is very slow (full table scan).
    We have done a test with 7 million records to delete :
    It took us :
    2 hours : SARA Write process (create archive files)
    12 hours : SARA Delete process (execute delete program)
    Our ODS contains 45 millions records per month, we can launch the archive jobs in our production environnement only during the week end.
    It will take us months
    to complete our archiving scenario.
    How can we improve the archiving process ?
    We don't really need the data that are beyond 18 months, is there a
    better way to delete those data : selective deletion ?
    Thank you in advance for your answers.
    Business Information Warehouse 3.0B
    Message was edited by:
            ramos alexandro

    Hi,
    When you are running archiving process...queries might not run or will have bad performance...even a lock can happen...so..Just a idea,
    As you said..you require only...Last 18 months data for Query..
    So Create/make a new Shadow ODS ZSDO0002 ..should have similar Charateristics and KF.
    Then  make full Load from Your ODS(which you have to archive)..with selection in Infopackage for last 18 months only.
    Make a INIT.
    Then Latest Delta should come to this..ODS (ZSDO0002)...not to your old ODS.
    Now, Copy the Queries from your old ODS to new OLD...with RSZC
    Now archive your old ODS.
    Regards,
    San!
    If helpful assign points

  • Macbook Pro 1.1 how to improve read/write speed

    Hello,
    I am looking to improve the read/write performance of a 2006 2.16 Intel Core Duo Macbook Pro with 2gb RAM (the max), that I use on a specific job in a specific workflow.
    In the workflow there are three retouchers using three different MBPs and transferring files via Ethernet network to a fourth MBP (the one in question) which is used as a dropbox, if you like.
    So the MBP in question has no applications running. Files are saved to it and opened from it and saved back to it.
    How can I improve read/write speed on this MBP under these conditions?
    Would installing an SSD be the answer? Or is it really a processor issue and there's nothing to be done? I figure RAM doesn't really come into it, but in any case 2GB is the max this model can accept.
    Many thanks in advance.

    An SSD would definitely improve read/write speed. However, depending on capacity needed, are you sure you want to sink the money into this machine? Start here:
    http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/

  • How to improve Bluetooth Audio Performance in OS X?

    I have a MacBook Pro 13 with retina display that is just over 1 years old; I love it! It runs OS 10.10.1.
    I connected a pair of Powerbeats2 wireless headphones via bluetooth and noticed the volume at max setting was half as loud as my iPhone6+ and more so than my iPad 2.
    Are there terminal settings to improve sound performance of bluetooth on the MacBook Pro? What are they?
    How can I read default Bluetooth settings? As a matter of reference, I did download and update the firmware on the PowerBeats...

    Thank you KC, I did in fact find that page and read it.  I think I understand something new now.  LPX treats stereo busses as a single name.  Like Bus 1 can actually be stereo if set to be so.  That is what was so confusing to me, coming from the world of Digital Performer where they specifically show Bus 1-2 to mean a stereo pair.   Logic Pro definitely handles several conventions differently, so I'm currently riding the learning curve!
    One thing still confusing me.  I've set all my tracks to output from a common bus.   I've set that bus to be the input bus to a new stereo audio track.  But I don't seemt o be able to control input level.  No matter how much I reduce the aux or master level, the audio track still records super hot!  I'm sure I'm overlooking something very obvious, but I can't think of another control other than the associated aux or the master bus levels that would control input level into an audio track...   Ideas?
    TIA,
    Greg

Maybe you are looking for

  • Use of global currencies in configuration

    Our site would only like to see their information in the local currency. We have no need for multiple global currencies. We configured the ETL with nulls in the three global currency fields, but notice that all the out of the box dashboards are going

  • Document splitting & new GL function

    Dear All, I need document for document splitting & new GL function. It is urgent. My email ID is [email protected] Please help. Thanks Gov

  • HTTP Questions

    We have a scenario where an external system is going to communicate with us by sending an XMl message via HTTPS. Now my question is... if we use the HTTP Adapter then what do we need to do to enable HTTPS. Do we just need to create a HTTPS port on th

  • Story iPhone appliacation updated: Version 1.2

    Hi Everyone, We have updated the Story iPhone application with the latest login components. Now the latest update is available on App Store. Please go forward and update the app on your iPhones. Thanks Sonal (Adobe Story Team)

  • HT1212 How can I authorize my computer?

    I cannot play music from my phone on my computer because my computer is "Not authorized" how can I fix this?