Performance issues kindly give your suggestions

hai
i have master table for vehicle table name is VEHICLE. this table is the main table, this is having records (80 lakhs)
Engine has two tables ( ENGINE(master) and ENGINE_SUB( Details for engine) ( less number of records 200 records only)
Like wise GEAR has two tables ( GEAR (master) and GEAR_SUB( details for gear) ( less number of records 200 records only)
For me the query will get framed in RUNTIME
IF User select ( ENGINE='ENG-001' and GEAR='GEAR-001') then the query get framed in "WHERE" part is as below
(ENGINE.COL1='ENG-001'
ENGINE.COL2=VEHICLE.COL1
ENGINE.COL1=ENGINE_SUB.COL1
ENGINE_SUB.COL2=VEHICLE.COL2)
AND
( GEAR.COL1='GEAR-001'
GEAR.COL2=VEHICLE.COL1
GEAR.COL1=GEAR_SUB.COL1
GEAR_SUB.COL2=VEHICLE.COL2)Upto here there is no problem at all
PERFORMANCE COMES ONLY WHEN IF USER SELECT ( ENGINE='ENG-001' OR GEAR='GEAR-001') then the query get framed in "WHERE" part is as below
(ENGINE.COL1='ENG-001'
ENGINE.COL2=VEHICLE.COL1
ENGINE.COL1=ENGINE_SUB.COL1
ENGINE_SUB.COL2=VEHICLE.COL2)
OR 
( GEAR.COL1='GEAR-001'
GEAR.COL2=VEHICLE.COL1
GEAR.COL1=GEAR_SUB.COL1
GEAR_SUB.COL2=VEHICLE.COL2)this is taking much time to process. even 2 hours.
Index information
both the column of VEHICLE is indexed. VEHICLE has 80 lakhs record while other table has only 200 records. i dont have indexes in engine and gear tables.
So kindly help me
Waiting
S

... /* next block should be left outer joined */
AND ENGINE.COL2=VEHICLE.COL1
AND ENGINE.COL1=ENGINE_SUB.COL1
AND ENGINE_SUB.COL2=VEHICLE.COL2
... /* next block should be left outer joined */
AND GEAR.COL2=VEHICLE.COL1
AND GEAR.COL1=GEAR_SUB.COL1
AND GEAR_SUB.COL2=VEHICLE.COL
... /* where condition from the user */
AND (ENGINE.COL1='ENG-001' or GEAR.COL1='GEAR-001')
Hai
the above query u framed will give wrong number of results. AND (ENGINE.COL1='ENG-001' or GEAR.COL1='GEAR-001')
Because
1) if ur giving OR condition like above then ENGINE_SUB.COL2 and GEAR_SUB.COL2 has direct join with VEHICLE. then the result will be wrong. both these columns joins with VEHICLE irrespective of each other.
then it should be like this AND GEAR_SUB.COL2=VEHICLE.COL or GEAR_SUB.COL2=VEHICLE.COL
Hope you get my point
S

Similar Messages

  • Oracle 10g configuration Kindly give your suggestions

    Hi Gurus,
    I am an oracle developer. Planning to switch myself as ORACLE DBA. it is very intersting to study the oracle internal. i need to have some practical analysis.
    Kindly help me for below queries
    1) Planning to install Oracle enterprise edition. kindly tell me the configuration details for installing oracle 10g or oracle 9i in the laptop. I need the RAM configuration and DISK memory configuration requirment details.
    2) Laptop is better or desktop?
    Kindly give me your advise and tips that will be veryhelpfull for me as ORACLE dba.
    kINDLY REPLY
    s

    oraclehema wrote:
    Hi Gurus,
    I am an oracle developer. Planning to switch myself as ORACLE DBA. it is very intersting to study the oracle internal. i need to have some practical analysis.
    Kindly help me for below queries
    1) Planning to install Oracle enterprise edition. kindly tell me the configuration details for installing oracle 10g or oracle 9i in the laptop. Why start your learning on a de-supported version? Start with 11.2.0.1
    I need the RAM configuration and DISK memory configuration requirment details.All the requirements are listed in the fine Installation Guide
    >
    2) Laptop is better or desktop?
    Oracle doesn't care
    Kindly give me your advise and tips that will be veryhelpfull for me as ORACLE dba.
    As others have said, the best recommendation is to download either VMplayer (free from VMware) or VMworkstation (about US$185 from VMware, but with better management tools than the free version) or VirtualBox (free from Oracle, but not quite as easy to work with as VMware). With any of these tools you can create a virtual machine on your laptop/desktop. On that virtual machine you can install Oracle Linux (free from Oracle). Once you have that built, you can download and install any Oracle product you want -- includeing Database Enterprise Edition -- free from Oracle for self-study purposes.
    kINDLY REPLY
    sPS:
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:
    Go to tahiti.oracle.com.
    Drill down to your product and version.
    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>
    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab you will find the complete documentation library.
    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.
    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.
    Do the same with the SQL Reference Manual.
    Do the same with the Utilities manual.
    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.
    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.
    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.
    PPS:
    Why are you considering making this change? There will always be more jobs for developers than for DBAs. What is your motivation? Please don't tell me it's because of the money.
    Edited by: EdStevens on Aug 1, 2012 7:04 AM

  • Hi all,I am planning to buy apple air or pro laptop for my office use,kindly give ur suggestions,will it work structural design software like staad pro ETAB,cad in apple laptops?

    Hi all,I am planning to buy apple air or pro laptop for my office use,kindly give ur suggestions,will it work structural design software like staad pro ETAB,cad in apple laptops?

    Hi VigneshCivil,
    Thank you for using Apple Support Communities. 
    Without knowing the specification requirements of the applications you will be using, I can't give you a specific recommendation. But I have provided you with the specifications of the two screen sizes of both the MacBook Pro Retina and the MacBook Air to compare with the requirements of your apps. One caution I would provide is not to go with the bare minimums required for the app, doing that would not give you optimum performance. 
    MacBook Pro (Retina, 15-inch, Mid 2014) - Technical Specifications
    MacBook Pro (Retina, 13-inch, Mid 2014) - Technical Specifications
    MacBook Air (13-inch, Early 2014) - Technical Specifications
    MacBook Air (11-inch, Early 2014) - Technical Specifications
    Regards,
    Jeff D. 

  • Interview Question Asked by SANGHI....kindly give me suggestion

    Dear friends,
    I recently faced an Interview in some organization....and they have asked me a question for which I cud not able to answer them properly...Kindly give me some sugesstion/solution for the following question..so that I can answer it properly the nxt time..
    Q. Suppose in our Organization if u are working as a DBA...and u are taking Physical Backup's (not logical) every week....and the organization is efforting a lot of amount on backup's for which the organization is spending a huge amount....??? as a DBA what can u suggest and how will u reduce the cost effect..
    Hope every body understood the question...Kindly reply
    Srinivas..

    A physical backup is any sort of backup of the physical database files, which basically means anything other than an export of the database. There are a substantial number of ways to take a physical backup-- hot and cold, using RMAN, using custom scripts, etc. so the situation described isn't particularly clear.
    That said, my first question would be "What parts of your backup process are accounting for most of your cost?" If they are taking cold backups, perhaps the cost is related to the downtime-- there may be opportunity costs to not having systems available 24x7 and they may be buying more hardware to complete their batch processes in time once the database is back up. If they have custom-written scripts to do hot backups, perhaps those scripts aren't particularly robust, so the DBA's have to spend a lot of time hand-holding the process. In that case, moving to RMAN might save some time and effort. From their initial description, there isn't enough information to provide a useful answer-- they need to provide additional background/ explanation.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Regarding performance issue in SELECT - need suggestions

    Moderator message - use a more informative subject in future - having two or more posts with the same subject isn't helpful
    Hi All could you plese send me the alternative code for this select quesy:
    form read_data_from_GIPD.
      select * from zbacks_gipd
        where failf = '2'
          and recno in recno.
        clear tab.
        clear result_total. "reset the record counter
        tab-werks = zbacks_gipd-WERKS.         "plant
        tab-aufnr = zbacks_gipd-AUFNR.         "production order no.
        tab-matnr = zbacks_gipd-MATNR.         "material
        tab-erdat = zbacks_gipd-BUDAT.         "transaction date
        tab-recno = zbacks_gipd-recno.
        TAB-MENGE = zbacks_gipd-menge.         "qty
        TAB-USAFL = zbacks_gipd-usafl.         "usage/consumption ind.
    *          TAB-EXPCD            "Expenses code
        TAB-SAKNR = zbacks_gipd-saknr.         "G/L account number
        TAB-IDNUM = zbacks_gipd-idnum.         "BACKS identification no.
        TAB-KUNNR = zbacks_gipd-kunnr.         "Customer Number
        TAB-USACD = zbacks_gipd-usacd.         "usage code
        TAB-ORDCD = zbacks_gipd-ordcd.         "order code
        TAB-LOSTY = zbacks_gipd-losty.         "loss type
        TAB-COTAX = zbacks_gipd-cotax.         "consumption tax
        TAB-MWSKZ = zbacks_gipd-mwskz.         "tax code
        tab-runum = zbacks_gipd-runum.         "running number
        tab-failf = zbacks_gipd-failf.     "failure flag
        tab-msgnr = zbacks_gipd-failf.     "failure flag
        tab-matdoc = zbacks_gipd-docm1.    "material doc
    * BEGIN OF SR#20293 WITH DEVK955638
    *    tab-msgtx = 'Repost 2nd step'.
        tab-msgtx = 'Repost 2nd step'(057).
    *   END OF SR#20293 WITH DEVK955638
    *    tab-erdat_raw = tab-erdat. "keep the MM/DD/YYYY format
    *    CONCATENATE TAB-ERDAT+6(4) TAB-ERDAT+0(2) TAB-ERDAT+3(2)
    *           INTO TAB-ERDAT.
         concatenate tab-erdat+4(2) '/'
                     tab-erdat+6(2) '/'
                     tab-erdat+0(4)
                   into tab-erdat_raw.
    *Process only a particular set of usage indicator first
        if tab-usafl = p_usafl.
          APPEND TAB.
          result_total = result_total + 1. "Increase the record counter
        endif.
      endselect.
    * BEGIN OF SR#20293 WITH DEVK955638
    *  write: / 'Re-processing records for usage indicator', p_usafl.
      write: / 'Re-processing records for usage indicator'(056), p_usafl.
    * END OF SR#20293 WITH DEVK955638
    endform.
    Note : how can i avoid the select endselect statement , here he move data from database table to internal table .
    Edited by: Julius Bussche on Jan 19, 2009 1:52 PM
    Please use code tags
    Edited by: Matt on Jan 19, 2009 4:46 PM

    Hi,
         Declare an Internal table with zbacks_gipd type,
         Move the records into that table based on conditions,
         Then loop that internal table, and fill tab internal table.
    form read_data_from_GIPD.
    Types : begin of ty_zbacks_gipd.
                 include structure zbacks_gipd.
    Types : end of ty_zbacks_gipd.
    Data : it_zbacks_gipd type table of ty_zbacks_gipd,
                 wa_zbacks_gipd type ty_zbacks_gipd.
    select * from zbacks_gipd into table it_zbacks_gipd
           where  failf = '2'
          and recno in recno.
    loop at it_zbacks_gipd into wa_zbacks_gipd.
    clear tab.
        clear result_total. "reset the record counter
        tab-werks = wa_zbacks_gipd-WERKS.         "plant
        tab-aufnr = wa_zbacks_gipd-AUFNR.         "production order no.
        tab-matnr = wa_zbacks_gipd-MATNR.         "material
        tab-erdat = wa_zbacks_gipd-BUDAT.         "transaction date
        tab-recno = wa_zbacks_gipd-recno.
        TAB-MENGE = wa_zbacks_gipd-menge.         "qty
        TAB-USAFL = wa_zbacks_gipd-usafl.         "usage/consumption ind.
    *          TAB-EXPCD            "Expenses code
        TAB-SAKNR = wa_zbacks_gipd-saknr.         "G/L account number
        TAB-IDNUM = wa_zbacks_gipd-idnum.         "BACKS identification no.
        TAB-KUNNR = wa_zbacks_gipd-kunnr.         "Customer Number
        TAB-USACD = wa_zbacks_gipd-usacd.         "usage code
        TAB-ORDCD = wa_zbacks_gipd-ordcd.         "order code
        TAB-LOSTY = wa_zbacks_gipd-losty.         "loss type
        TAB-COTAX = wa_zbacks_gipd-cotax.         "consumption tax
        TAB-MWSKZ = wa_zbacks_gipd-mwskz.         "tax code
        tab-runum = wa_zbacks_gipd-runum.         "running number
        tab-failf = wa_zbacks_gipd-failf.     "failure flag
        tab-msgnr = wa_zbacks_gipd-failf.     "failure flag
        tab-matdoc = wa_zbacks_gipd-docm1.    "material doc
    * BEGIN OF SR#20293 WITH DEVK955638
    *    tab-msgtx = 'Repost 2nd step'.
        tab-msgtx = 'Repost 2nd step'(057).
    *   END OF SR#20293 WITH DEVK955638
    *    tab-erdat_raw = tab-erdat. "keep the MM/DD/YYYY format
    *    CONCATENATE TAB-ERDAT+6(4) TAB-ERDAT+0(2) TAB-ERDAT+3(2)
    *           INTO TAB-ERDAT.
         concatenate tab-erdat+4(2) '/'
                     tab-erdat+6(2) '/'
                     tab-erdat+0(4)
                   into tab-erdat_raw.
    *Process only a particular set of usage indicator first
        if tab-usafl = p_usafl.
          APPEND TAB.
          result_total = result_total + 1. "Increase the record counter
        endif.
    endloop.
    endform.
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Jan 19, 2009 6:48 PM

  • Performance Issue For Opening And Closing Balance In FBL1N/3N/5N

    Dear experts,
                        I Am Having Requirement to Bring Opening And Closing Balance In FBL1N, FBL3N, FBL5N.
    For This requirement I Used BADI : FI_ITEMS_CH_DATA~CHANGE_ITEMS, below is my Code For FBL1N, And I've Done the same For 3N/5N...With Related BAPI
    *   IF SY-TCODE = 'FBL1N'.
    *    LOOP AT ct_items INTO gs_items.
    *      CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
    *        EXPORTING
    *          date      = gs_items-budat
    *          days      = '01'
    *          months    = '00'
    *          signum    = '-'
    *          years     = '00'
    *        IMPORTING
    *          calc_date = lv_date.
    *      CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
    *        EXPORTING
    *          companycode        = gs_items-bukrs
    *          vendor             = gs_items-konto
    *          keydate            = lv_date
    **   BALANCESPGLI       = ' '
    **   NOTEDITEMS         = ' '
    ** IMPORTING
    **   RETURN             =
    *        TABLES
    *          keybalance         =  lv_obal.
    *      CALL FUNCTION 'BAPI_AP_ACC_GETKEYDATEBALANCE'
    *        EXPORTING
    *          companycode        = gs_items-bukrs
    *          vendor             = gs_items-konto
    *          keydate            = gs_items-budat
    **   BALANCESPGLI       = ' '
    **   NOTEDITEMS         = ' '
    ** IMPORTING
    **   RETURN             =
    *        TABLES
    *          keybalance         = lv_cbal
    *      READ TABLE lv_cbal INTO gs_cbal INDEX 1.
    *      gs_items-cbal = gs_cbal-lc_bal.
    *      READ TABLE lv_obal INTO gs_obal INDEX 1.
    *      gs_items-obal = gs_obal-lc_bal.
    *      MODIFY ct_items FROM gs_items TRANSPORTING obal cbal.
    *      CLEAR: gs_items,gs_obal,gs_cbal.
    *    ENDLOOP.
    *   ENDIF.
    So, Above Code Causing Me the Performance Issue, Kindly Suggest Me the Solution..
    Regards,
    uday.

    Hi Uday,
    I am sending you the code i used for the creation a Zreport based on FBL5N. Please check if it can of any help.
    *& Report  ZFBL5N                                                      *
    REPORT  zfbl5n_new  .
    TABLES : bsid,knc1,lfc1.
    TYPE-POOLS: slis.
    TYPES: BEGIN OF ty_bsid,
              bukrs TYPE bsid-bukrs,
              kunnr TYPE bsid-kunnr,
              belnr TYPE bsid-belnr,
              buzei TYPE bsid-buzei,
              bldat TYPE bsid-bldat,
              blart TYPE bsid-blart,
              bschl TYPE bsid-bschl,
              shkzg TYPE bsid-shkzg,
              dmbtr TYPE bsid-dmbtr,
              augdt TYPE bsid-augdt,
              augbl TYPE bsid-augbl,
              zuonr TYPE bsid-zuonr,
              sgtxt TYPE bsid-sgtxt,
              zfbdt TYPE bsid-zfbdt,
              zterm TYPE bsid-zterm,
              zbd1t TYPE bsid-zbd1t,
              zbd2t TYPE bsid-zbd2t,
              zbd3t TYPE bsid-zbd3t,
              kkber TYPE bsid-kkber,
              bstat TYPE bsid-bstat,
              umskz TYPE bsid-umskz,
            END OF ty_bsid.
    TYPES: BEGIN OF ty_bsik,
             bukrs TYPE bsik-bukrs,
              lifnr TYPE bsik-lifnr,
              belnr TYPE bsik-belnr,
              buzei TYPE bsik-buzei,
              bldat TYPE bsik-bldat,
              blart TYPE bsik-blart,
              bschl TYPE bsik-bschl,
              shkzg TYPE bsik-shkzg,
              dmbtr TYPE bsik-dmbtr,
              augdt TYPE bsik-augdt,
              augbl TYPE bsik-augbl,
              zuonr TYPE bsik-zuonr,
              sgtxt TYPE bsik-sgtxt,
               zfbdt TYPE bsik-zfbdt,
    *         KKBER TYPE bsik-kkber,
              zterm TYPE bsik-zterm,
               zbd1t TYPE bsik-zbd1t,
              zbd2t TYPE bsik-zbd2t,
              zbd3t TYPE bsik-zbd3t,
              bstat TYPE bsid-bstat,
              umskz TYPE bsid-umskz,
            END OF ty_bsik.
    TYPES: BEGIN OF ty_final,
              belnr TYPE bsid-belnr,
    *         buzei TYPE bsak-buzei,
              bldat TYPE bsid-bldat,
              blart TYPE bsid-blart,
              chq TYPE bsid-zuonr,
              debit TYPE bsid-dmbtr,
              credit TYPE bsid-dmbtr,
              txt TYPE bsid-sgtxt,
              date TYPE bsid-zfbdt,
              kkber TYPE bsid-kkber,
              zterm TYPE bsid-zterm,
              augbl TYPE bsid-augbl,
              augdt TYPE bsid-augdt,
              flag TYPE c,
            END OF ty_final.
    TYPES : BEGIN OF gs_openbal,
              bukrs TYPE bapi3007_2-comp_code,
              kunnr TYPE bapi3007_2-customer,
              dmbtr TYPE bapi3007_2-lc_amount,
             END OF gs_openbal.
    DATA: it_bsid TYPE STANDARD TABLE OF ty_bsid,
           it_bsik TYPE STANDARD TABLE OF ty_bsik,
           it_final TYPE STANDARD TABLE OF ty_final.
    DATA: wa_bsid TYPE ty_bsid,
           wa_bsik TYPE ty_bsik,
           wa_final TYPE ty_final.
    DATA: w_days TYPE t5a4a-dlydy,
           w_month TYPE t5a4a-dlymo,
           w_year TYPE t5a4a-dlyyr,
           w_date TYPE p0001-begda,
           w_name1 TYPE kna1-name1,
           w_ort01 TYPE kna1-ort01,
           w_lifnr TYPE kna1-lifnr,
           w_dmbtr1 TYPE bsid-dmbtr,
           w_dmbtr2 TYPE bsid-dmbtr,
           w_dmbtr3 TYPE bsad-dmbtr,
           w_dmbtr4 TYPE bsad-dmbtr,
           w_opbal TYPE bsid-dmbtr,
           w_credit TYPE bsik-dmbtr,
           w_debit TYPE bsik-dmbtr,
           w_clobal TYPE bsik-dmbtr,
           w_credit1 TYPE bsik-dmbtr,
           w_debit1 TYPE bsik-dmbtr,
           w_clobal1 TYPE bsik-dmbtr.
    DATA: ld_yrper LIKE rwcoom-fiscper,
           kunnr LIKE kna1-kunnr,
           x_norm TYPE c,
           x_park,
           x_apar,
           x_merk,
           ok_code(4),
           wa_x001 LIKE x001,
           return LIKE bapireturn,
           line_count LIKE sy-loopc,
           number_of_records TYPE i,
           xindex LIKE sy-tabix,
           open LIKE knc1-um01s,
           temp(20),
           close LIKE knc1-um01s,
           gjahr LIKE bsid-gjahr,
           period LIKE bkpf-monat,
           f(1),
           v_char(2),
           closec(20),
           openc(20),
           debit LIKE bapi3007_2-lc_amount,
           credit LIKE debit.
    DATA : v_dmbtr LIKE bsid-dmbtr.
    *DATA : tot_debit LIKE t_ar-debit,
    *       tot_credit LIKE t_ar-credit.
    DATA : t_kna1 LIKE kna1 OCCURS 1  WITH HEADER LINE,
            t_knb1 LIKE knb1 OCCURS 10 WITH HEADER LINE.
    DATA ibsid LIKE bsid OCCURS 0 WITH HEADER LINE.
    DATA ibsad LIKE bsad OCCURS 0 WITH HEADER LINE.
    DATA ibsik LIKE bsik OCCURS 0 WITH HEADER LINE.
    DATA ibsak LIKE bsak OCCURS 0 WITH HEADER LINE.
    DATA : it_fieldcat_alv   TYPE slis_t_fieldcat_alv,
            wa_fieldcat_alv     TYPE slis_fieldcat_alv,
            is_layout_alv  TYPE slis_layout_alv,
            wa_layout_alv  TYPE slis_layout_alv,
            it_list_top_of_page TYPE slis_t_listheader,
            it_events TYPE slis_t_event,
            wa_events TYPE LINE OF slis_t_event.
    DATA : BEGIN OF ibukrs OCCURS 0,
               bukrs LIKE t001-bukrs,
              END OF ibukrs.
    DATA : BEGIN OF ikunnr1 OCCURS 0,
              kunnr LIKE knc1-kunnr,
             END OF ikunnr1.
    DATA : BEGIN OF ikunnr OCCURS 0,
               kunnr LIKE knc1-kunnr,
               bukrs LIKE t001-bukrs,
               lifnr LIKE lfc1-lifnr,
              END OF ikunnr.
    DATA: it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    DATA:    r_bschl TYPE RANGE OF bschl,
              wa_bschl LIKE LINE OF r_bschl.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS : p_kunnr TYPE bsid-kunnr OBLIGATORY,
                  p_bukrs TYPE bsid-bukrs OBLIGATORY.
    SELECT-OPTIONS: so_budat FOR bsid-budat .
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : p_normal AS CHECKBOX,
                  p_spl    AS CHECKBOX,
                  p_vendor AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK b2.
    PERFORM get_data.
    PERFORM process_data.
    *PERFORM calculate_openbal. " Commented by anish
    PERFORM calculate_open_bal.
    PERFORM calculate_closing_bal.
    PERFORM build_catalog_sort USING it_sort.
    PERFORM reuse_alv_events_get .
    PERFORM display_data.
    *&      Form  GET_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_data .
       SELECT bukrs kunnr belnr buzei bldat blart bschl shkzg dmbtr augdt augbl zuonr sgtxt zfbdt zterm zbd1t zbd2t zbd3t kkber
         bstat umskz FROM bsid
         INTO TABLE it_bsid
         WHERE bukrs = p_bukrs
          AND kunnr = p_kunnr
          AND budat IN so_budat.
       SELECT bukrs kunnr belnr buzei bldat blart bschl shkzg dmbtr augdt augbl zuonr sgtxt zfbdt zterm zbd1t zbd2t zbd3t kkber
        bstat umskz FROM bsad
        APPENDING TABLE it_bsid
        WHERE bukrs = p_bukrs
         AND kunnr = p_kunnr
         AND budat IN so_budat.
       SELECT SINGLE name1 ort01 lifnr FROM kna1
         INTO (w_name1 , w_ort01 , w_lifnr)
         WHERE kunnr = p_kunnr.
       IF p_vendor IS NOT INITIAL.
         SELECT bukrs lifnr belnr buzei bldat blart bschl shkzg dmbtr augdt augbl zuonr sgtxt zfbdt zterm zbd1t zbd2t zbd3t
         bstat umskz   FROM bsik
         APPENDING TABLE it_bsik
         WHERE bukrs = p_bukrs
           AND lifnr = w_lifnr
           AND budat IN so_budat.
         SELECT bukrs lifnr belnr buzei bldat blart bschl shkzg dmbtr augdt augbl zuonr sgtxt zfbdt zterm zbd1t zbd2t zbd3t
         bstat umskz  FROM bsak
        APPENDING TABLE it_bsik
        WHERE bukrs = p_bukrs
          AND lifnr = w_lifnr
          AND budat IN so_budat.
       ENDIF.
       SORT it_bsid BY bschl.
       DELETE  it_bsid WHERE bschl = '04'.
       DELETE  it_bsid WHERE bschl = '07'.
       DELETE  it_bsid WHERE bschl = '17'.
       DELETE  it_bsid WHERE bschl = '34'.
       DELETE  it_bsid WHERE bschl = '27'.
       DELETE  it_bsid WHERE bschl = '37'.
       SORT it_bsik BY bschl.
       DELETE  it_bsik WHERE bschl = '04'.
       DELETE  it_bsik WHERE bschl = '07'.
       DELETE  it_bsik WHERE bschl = '17'.
       DELETE  it_bsik WHERE bschl = '34'.
       DELETE  it_bsik WHERE bschl = '27'.
       DELETE  it_bsik WHERE bschl = '37'.
    ENDFORM.                    " GET_DATA
    *&      Form  PROCESS_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM process_data .
       DATA:okay       TYPE c VALUE space.
       w_month = '00'.
       w_year = '00'.
       SORT it_bsid BY bldat .
       LOOP AT it_bsid INTO wa_bsid.
         PERFORM check_item_ok  USING p_normal
                                      p_spl
                                      p_vendor
    *                               x_park
                                      wa_bsid
                                CHANGING okay.
         CHECK okay = 'X'.
         wa_final-belnr = wa_bsid-belnr.
         wa_final-bldat = wa_bsid-bldat.
         wa_final-blart = wa_bsid-blart.
         wa_final-txt = wa_bsid-sgtxt.
         wa_final-kkber = wa_bsid-kkber.
         wa_final-zterm = wa_bsid-zterm.
         wa_final-augbl = wa_bsid-augbl.
         wa_final-augdt = wa_bsid-augdt.
         wa_final-flag = 'C'.
         IF wa_bsid-blart = 'DZ'.
           wa_final-chq = wa_bsid-zuonr.
         ENDIF.
         IF wa_bsid-shkzg = 'S'.
           wa_final-debit = wa_bsid-dmbtr.
         ELSEIF wa_bsid-shkzg = 'H'.
           wa_final-credit = wa_bsid-dmbtr.
         ENDIF.
         w_credit = w_credit + wa_final-credit.
         w_debit = w_debit + wa_final-debit.
    ****** Net due  date
         IF wa_bsid-zbd1t IS NOT INITIAL.
           w_days = wa_bsid-zbd1t.
         ELSEIF wa_bsid-zbd2t IS NOT INITIAL.
           w_days = wa_bsid-zbd2t.
         ELSEIF wa_bsid-zbd3t IS NOT INITIAL.
           w_days = wa_bsid-zbd3t.
         ENDIF.
         IF w_days IS INITIAL.
           wa_final-date = wa_bsid-zfbdt.
         ELSE.
           CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
             EXPORTING
               date      = wa_bsid-zfbdt
               days      = w_days
               months    = w_month
               signum    = '+'
               years     = w_year
             IMPORTING
               calc_date = w_date.
           wa_final-date = w_date.
         ENDIF.
         APPEND wa_final TO it_final.
         CLEAR: w_days , w_date , wa_final .
       ENDLOOP.
       IF it_bsik IS NOT INITIAL.
         CLEAR: w_days , w_date.
         SORT it_bsik BY bldat.
         LOOP AT it_bsik INTO wa_bsik.
           wa_final-belnr = wa_bsik-belnr.
           wa_final-bldat = wa_bsik-bldat.
           wa_final-blart = wa_bsik-blart.
           wa_final-txt = wa_bsik-sgtxt.
    *    wa_final-kkber = wa_bsik-kkber.
           wa_final-zterm = wa_bsik-zterm.
           wa_final-augbl = wa_bsik-augbl.
           wa_final-augdt = wa_bsik-augdt.
           wa_final-flag = 'V'.
           IF wa_bsik-blart = 'DZ'.
             wa_final-chq = wa_bsik-zuonr.
           ENDIF.
           IF wa_bsik-shkzg = 'S'.
             wa_final-debit = wa_bsik-dmbtr.
           ELSEIF wa_bsik-shkzg = 'H'.
             wa_final-credit = wa_bsik-dmbtr.
           ENDIF.
           w_credit1 = w_credit1 + wa_final-credit.
           w_debit1 = w_debit1 + wa_final-debit.
    *******  Net Due date
           IF wa_bsik-zbd1t IS NOT INITIAL.
             w_days = wa_bsik-zbd1t.
           ELSEIF wa_bsik-zbd2t IS NOT INITIAL.
             w_days = wa_bsik-zbd2t.
           ELSEIF wa_bsik-zbd3t IS NOT INITIAL.
             w_days = wa_bsik-zbd3t.
           ENDIF.
           IF w_days IS INITIAL.
             wa_final-date = wa_bsik-zfbdt.
           ELSE.
             CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
               EXPORTING
                 date      = wa_bsik-zfbdt
                 days      = w_days
                 months    = w_month
                 signum    = '+'
                 years     = w_year
               IMPORTING
                 calc_date = w_date.
           ENDIF.
           wa_final-date = w_date.
           APPEND wa_final TO it_final.
           CLEAR: wa_final.
         ENDLOOP.
       ENDIF.
    ENDFORM.                    " PROCESS_DATA
    *&      Form  DISPLAY_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_data .
       wa_fieldcat_alv-fieldname = 'BELNR'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-003.
       wa_fieldcat_alv-outputlen = '11'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'BLDAT'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-004.
       wa_fieldcat_alv-outputlen = '13'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'BLART'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-005.
       wa_fieldcat_alv-outputlen = '02'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'CHQ'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-006.
       wa_fieldcat_alv-outputlen = '09'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'DEBIT'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-007.
       wa_fieldcat_alv-outputlen = '15'.
       wa_fieldcat_alv-do_sum = 'X'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'CREDIT'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-008.
       wa_fieldcat_alv-outputlen = '15'.
       wa_fieldcat_alv-do_sum = 'X'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'TXT'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-009.
       wa_fieldcat_alv-outputlen = '50'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'DATE'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-010.
       wa_fieldcat_alv-outputlen = '12'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'KKBER'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-011.
       wa_fieldcat_alv-outputlen = '04'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'ZTERM'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-012.
       wa_fieldcat_alv-outputlen = '13'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'AUGBL'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-013.
       wa_fieldcat_alv-outputlen = '15'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'AUGDT'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-seltext_l = text-014.
       wa_fieldcat_alv-outputlen = '17'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       wa_fieldcat_alv-fieldname = 'FLAG'.
       wa_fieldcat_alv-tabname = 'IT_FINAL'.
       wa_fieldcat_alv-tech = 'X'.
       APPEND wa_fieldcat_alv TO it_fieldcat_alv.
       CLEAR wa_fieldcat_alv.
       CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program             = sy-repid
          is_layout                      = wa_layout_alv
          it_fieldcat                    = it_fieldcat_alv
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
          it_sort                        = it_sort
          it_events                      = it_events
          i_save                            = 'A'
         TABLES
           t_outtab                       = it_final
        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.
    *  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    *    EXPORTING
    *      i_callback_program                = sy-repid
    *     i_callback_top_of_page            = 'TOP_OF_PAGE'
    *      is_layout                         = wa_layout_alv
    *      it_fieldcat                       = it_fieldcat_alv
    *      it_sort                           = it_sort
    ***   I_DEFAULT                         = 'X'
    **      i_save                            = 'A'
    ***   IT_EVENTS                         =
    *     TABLES
    *       t_outtab                          = it_final
    *    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_DATA
    *&      Form  TOP_OF_PAGE
    *       Header at top of page.
    FORM top_of_page.
       SKIP 1.
       WRITE: AT 35 'Account Statement from' , so_budat-low , 'to' , so_budat-high.
       SKIP 2.
       WRITE: AT /5 'CUSTOMER:' , p_kunnr.
       WRITE: AT 35 'Name:' , w_name1.
       WRITE: AT /5 'Company:' , p_bukrs.
       WRITE: AT 35 'City:' , w_ort01.
       SKIP 1.
       WRITE: AT /5 'Opening Balance as on' , so_budat-low , '   ' ,  w_opbal LEFT-JUSTIFIED.
       SKIP 2.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  END_OF_PAGE
    *       Footer at End of page.
    FORM end_of_page.
       SKIP 2.
       IF so_budat-high IS NOT INITIAL.
         WRITE: AT 5 'Closing Balance as on' , so_budat-high , '   ' ,  w_clobal LEFT-JUSTIFIED.
       ELSE.
         WRITE: AT 5 'Closing Balance  ' , w_clobal LEFT-JUSTIFIED.
       ENDIF.
    ENDFORM.                    "end_of_page
    *&      Form  CALCULATE_OPENBAL
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM calculate_openbal .
       DATA:v_gjahr       TYPE bsid-gjahr.
       DATA: v_period LIKE  t009b-poper,v_monat LIKE t001-periv.
       CALL FUNCTION 'FI_PERIOD_DETERMINE'
              EXPORTING
                   i_budat        = so_budat-low
                   i_bukrs        = p_bukrs
    *           I_PERIV        = ' '
    *           I_GJAHR        = 0000
    *           I_MONAT        = 00
    *           X_XMO16        = ' '
              IMPORTING
                   e_gjahr        = v_gjahr
    *            e_monat        = v_monat
                   e_poper        = v_period.
       IF sy-subrc NE 0.
       ENDIF.
       DATA: f_date LIKE sy-datum.
       CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
         EXPORTING
           i_gjahr  = v_gjahr
           i_monmit = 00
           i_periv  = 'V3'
           i_poper  = v_period
         IMPORTING
           e_date   = f_date.
       period = v_period - 1.
       gjahr = v_gjahr.
       DATA wa_kna1 LIKE kna1.
       CALL FUNCTION 'READ_KNA1'
         EXPORTING
           xkunnr         = p_kunnr
         IMPORTING
           xkna1          = wa_kna1
         EXCEPTIONS
           key_incomplete = 1
           not_authorized = 2
           not_found      = 3
           OTHERS         = 4.
       IF sy-subrc <> 0.
         MESSAGE w023(zwww).
         CALL SCREEN 0010.
       ENDIF.
       MOVE-CORRESPONDING wa_kna1 TO t_kna1.
       APPEND t_kna1.
       SELECT kunnr FROM kna1 INTO TABLE ikunnr1
         WHERE kunnr = p_kunnr.
       SELECT bukrs FROM t001 INTO TABLE ibukrs
        FOR ALL ENTRIES IN t_knb1
        WHERE bukrs = t_knb1-bukrs.
       LOOP AT ikunnr1.
         LOOP AT ibukrs.
           ikunnr-kunnr = ikunnr1-kunnr.
           ikunnr-bukrs = ibukrs-bukrs.
           READ TABLE t_kna1 WITH  KEY kunnr = ikunnr1-kunnr.
           ikunnr-lifnr = t_kna1-lifnr.
           APPEND ikunnr.
         ENDLOOP.
       ENDLOOP.
       DELETE ikunnr WHERE bukrs NE p_bukrs.
       LOOP AT ikunnr.
         CLEAR: knc1,lfc1,f.
         IF NOT ( ikunnr-kunnr IS INITIAL ) AND NOT ( p_vendor IS INITIAL ).
           SELECT SINGLE * FROM lfc1
                  WHERE gjahr = gjahr AND bukrs = ikunnr-bukrs
                                      AND lifnr = ikunnr-lifnr.
         ENDIF.
         SELECT SINGLE * FROM knc1
           WHERE gjahr = gjahr AND bukrs = p_bukrs
                 AND kunnr = p_kunnr.
         IF sy-subrc = 0.
           CASE period .
             WHEN 12.
               open = knc1-umsav +
               knc1-um01s - knc1-um01h + knc1-um02s - knc1-um02h +
               knc1-um03s - knc1-um03h + knc1-um04s - knc1-um04h +
               knc1-um05s - knc1-um05h + knc1-um06s - knc1-um06h +
               knc1-um07s - knc1-um07h + knc1-um08s - knc1-um08h +
               knc1-um09s - knc1-um09h + knc1-um10s - knc1-um10h +
               knc1-um11s - knc1-um11h + knc1-um12s - knc1-um12h.
               IF NOT ( lfc1 IS INITIAL ).
                 open = open + lfc1-umsav +
                 lfc1-um01s - lfc1-um01h + lfc1-um02s - lfc1-um02h +
                 lfc1-um03s - lfc1-um03h + lfc1-um04s - lfc1-um04h +
                 lfc1-um05s - lfc1-um05h + lfc1-um06s - lfc1-um06h +
                 lfc1-um07s - lfc1-um07h + lfc1-um08s - lfc1-um08h +
                 lfc1-um09s - lfc1-um09h + lfc1-um10s - lfc1-um10h +
                 lfc1-um11s - lfc1-um11h + lfc1-um12s - lfc1-um12h.
               ENDIF.
             WHEN 11.
               open = knc1-umsav +
               knc1-um01s - knc1-um01h + knc1-um02s - knc1-um02h +
               knc1-um03s - knc1-um03h + knc1-um04s - knc1-um04h +
               knc1-um05s - knc1-um05h + knc1-um06s - knc1-um06h +
               knc1-um07s - knc1-um07h + knc1-um08s - knc1-um08h +
               knc1-um09s - knc1-um09h + knc1-um10s - knc1-um10h +
               knc1-um11s - knc1-um11h.
               IF NOT ( lfc1 IS INITIAL ) .
                 open = open + lfc1-umsav +
                 lfc1-um01s - lfc1-um01h + lfc1-um02s - lfc1-um02h +
                 lfc1-um03s - lfc1-um03h + lfc1-um04s - lfc1-um04h +
                 lfc1-um05s - lfc1-um05h + lfc1-um06s - lfc1-um06h +
                 lfc1-um07s - lfc1-um07h + lfc1-um08s - lfc1-um08h +
                 lfc1-um09s - lfc1-um09h + lfc1-um10s - lfc1-um10h +
                 lfc1-um11s - lfc1-um11h.
               ENDIF.
             WHEN 10.
               open = knc1-umsav +
               knc1-um01s - knc1-um01h + knc1-um02s - knc1-um02h +
               knc1-um03s - knc1-um03h + knc1-um04s - knc1-um04h +
               knc1-um05s - knc1-um05h + knc1-um06s - knc1-um06h +
               knc1-um07s - knc1-um07h + knc1-um08s - knc1-um08h +
               knc1-um09s - knc1-um09h + knc1-um10s - knc1-um10h .
               IF NOT ( lfc1 IS INITIAL ) .
                 open = open + lfc1-umsav +
                 lfc1-um01s - lfc1-um01h + lfc1-um02s - lfc1-um02h +
                 lfc1-um03s - lfc1-um03h + lfc1-um04s - lfc1-um04h +
                 lfc1-um05s - lfc1-um05h + lfc1-um06s - lfc1-um06h +
                 lfc1-um07s - lfc1-um07h + lfc1-um08s - lfc1-um08h +
                 lfc1-um09s - lfc1-um09h + lfc1-um10s - lfc1-um10h.
               ENDIF.
             WHEN 9.
               open = knc1-umsav +
               knc1-um01s - knc1-um01h + knc1-um02s - knc1-um02h +
               knc1-um03s - knc1-um03h + knc1-um04s - knc1-um04h +
               knc1-um05s - knc1-um05h + knc1-um06s - knc1-um06h +
               knc1-um07s - knc1-um07h + knc1-um08s - knc1-um08h +
               knc1-um09s - knc1-um09h .
               IF NOT ( lfc1 IS INITIAL ) .
                 open = open + lfc1-umsav +
                 lfc1-um01s - lfc1-um01h + lfc1-um02s - lfc1-um02h +
                 lfc1-um03s - lfc1-um03h + lfc1-um04s - lfc1-um04h +
                 lfc1-um05s - lfc1-um05h + lfc1-um06s - lfc1-um06h +
                 lfc1-um07s - lfc1-um07h + lfc1-um08s - lfc1-um08h +
                 lfc1-um09s - lfc1-um09h.
               ENDIF.
             WHEN 8.
               open = knc1-umsav +
               knc1-um01s - knc1-um01h + knc1-um02s - knc1-um02h +
               knc1-um03s - knc1-um03h + knc1-um04s - knc1-um04h +
               knc1-um05s - knc1-um05h + knc1-um06s - knc1-um06h +
               knc1-um07s - knc1-um07h + knc1-um08s - knc1-um08h.
               IF NOT ( lfc1 IS INITIAL ) .
                 open = open + lfc1-umsav +
                 lfc1-um01s - lfc1-um01h + lfc1-um02s - lfc1-um02h +
                 lfc1-um03s - lfc1-um03h + lfc1-um04s - lfc1-um04h +
                 lfc1-um05s - lfc1-um05h + lfc1-um06s - lfc1-um06h +
                 lfc1-um07s - lfc1-um07h + lfc1-um08s - lfc1-um08h .
               ENDIF.
             WHEN 7.
               open = knc1-umsav +
               knc1-um01s - knc1-um01h + knc1-um02s - knc1-um02h +
               knc1-um03s - knc1-um03h + knc1-um04s - knc1-um04h +
               knc1-um05s - knc1-um05h + knc1-um06s - knc1-um06h +
               knc1-um07s - knc1-um07h .
               IF NOT ( lfc1 IS INITIAL ) .
                 open = open + lfc1-umsav +
                 lfc1-um01s - lfc1-um01h + lfc1-um02s - lfc1-um02h +
                 lfc1-um03s - lfc1-um03h + lfc1-um04s - lfc1-um04h +
                 lfc1-um05s - lfc1-um

  • Huge Performance issue and RSRT

    Hi BW Gurus,
    We are using BCS cube for our consolidation queries and reports . There is a huge prformance problem.
    I need to know that wht should be the appropriate size of the Global cache as compared to Local Cache. My global cache size is 100 MB and Global Cache size is 200 MB.
    Also when I go to RSRT properties
    Read Mode is H: Query to read when you navigate or expand hierarchy .
    Cache Mode is : 4 persistent cache across each application server
    persistence mode : 3 transparent table (BLOB).
    Do I have to change these settings ....please give your suggestions
    will appreciated with lot of points
    Thanks

    Hi Folks,..
    Could you'll please tell me where exactly we put the break point I will paste my code. I did Run SE30 and the list cube extraction simaltaneoulsy and gave me a message error generating the test frame
    tatics:
    FUNCTION RSSEM_CONSOLIDATION_INFOPROV3.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(I_INFOPROV) TYPE  RSINFOPROV
    *"     REFERENCE(I_KEYDATE) TYPE  RSDRC_SRDATE
    *"     REFERENCE(I_TH_SFC) TYPE  RSDD_TH_SFC
    *"     REFERENCE(I_TH_SFK) TYPE  RSDD_TH_SFK
    *"     REFERENCE(I_TSX_SELDR) TYPE  RSDD_TSX_SELDR
    *"     REFERENCE(I_FIRST_CALL) TYPE  RS_BOOL
    *"     REFERENCE(I_PACKAGESIZE) TYPE  I
    *"  EXPORTING
    *"     REFERENCE(E_T_DATA) TYPE  STANDARD TABLE
    *"     REFERENCE(E_END_OF_DATA) TYPE  RS_BOOL
    *"     REFERENCE(E_T_MSG) TYPE  RS_T_MSG
    *"  EXCEPTIONS
    *"      ERROR_IN_BCS
      statics:
    UT begin:
    this flag is switched in order to record data returned by the current query in UT
    it can only be switched on/off in debug mode.
        s_record_mode  type rs_bool,
        s_qry_memo     type char256,    " at the moment, for query name
    package No, UUID, for unit testing
        s_packageno    type i,
        s_guid         type guid_22,
    UT end.
        s_first_call   like i_first_call,
        s_destination  type rfcdest,
        s_basiccube    type rsinfoprov,
        s_dest_back    type rfcdest,
        s_report       type programm,
        s_bw_local     type rs_bool,
        sr_data        type ref to data,
        sr_data_p      type ref to data,
        st_sfc         type t_sfc,
        st_sfk         type t_sfk,
        st_range       type t_seqnr_range,
        st_hienode     type t_seqnr_hienode,
        st_hienodename type t_seqnr_hienodename,
        st_seltype     type t_seqnr_seltype,
        st_datadescr   type T_DATADESCR,
        s_end_of_data  type rs_bool
      data:
        l_ucr_data_read_3 type funcname value 'UCR_DATA_READ_3',
        l_packagesize like i_packagesize,
        lt_message type t_message,
        ls_message like line of e_t_msg,
        l_xstring type xstring,
        l_nr type i.
      field-symbols:
        <ls_message> type s_message,
        <lt_data>   type standard table,
        <ls_data>   type any,"nos100804
        <lt_data_p> type hashed table."nos100804
      clear: e_t_data, e_end_of_data, e_t_msg.
    react on packagesize -1
      if i_packagesize le 0.    "nos050705
        l_packagesize = rssem_cs_integer-max.
      else.
        l_packagesize = i_packagesize.
      endif.
      if i_first_call = rs_c_true.
        s_first_call = rs_c_true.
        clear s_end_of_data.
    begin "nos100804
        data:
          lo_structdescr type ref to cl_abap_structdescr
         ,lo_tabledescr type ref to cl_abap_tabledescr
         ,lo_typedescr   type ref to cl_abap_typedescr
        data:
          lt_key     type table of abap_compname.
        field-symbols <ls_component> type abap_compdescr.
        create data sr_data_p like line of e_t_data.
        assign sr_data_p->* to <ls_data>.
        CALL METHOD CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_DATA
          EXPORTING
            P_DATA      = <ls_data>
          RECEIVING
            P_DESCR_REF = lo_typedescr.
        lo_structdescr ?= lo_typedescr.
      collect all key components to lt_key
        loop at lo_structdescr->components assigning <ls_component>.
          insert <ls_component>-name into table lt_key.
          if <ls_component>-name = '&KEYEND'.
            exit.
          endif.
        endloop.
        data ls_sfk like line of i_th_sfk.
        data l_key     type abap_compname.
        loop at i_th_sfk into ls_sfk.
          l_key = ls_sfk-kyfnm.
          if l_key is not initial.
            delete table lt_key from l_key.
          endif.
          l_key = ls_sfk-value_returnnm.
          if l_key is not initial.
            delete table lt_key from l_key.
          endif.
        endloop.
        create data sr_data_p like hashed table of <ls_data>
            with unique key (lt_key).
       create data sr_data_p like e_t_data.
        create data sr_data   like e_t_data.
    end "nos100804
        perform determine_destinations  using    i_infoprov
                                        changing s_destination
                                                 s_dest_back
                                                 s_report
                                                 s_basiccube.
        perform is_bw_local changing s_bw_local.
    ***--> convert the selection, enhance non-Sid-values.
    --> Handle fiscper7
        data:
          lt_SFC      TYPE  RSDRI_TH_SFC
         ,lt_sfk      TYPE  RSDRI_TH_SFK
         ,lt_range    TYPE  RSDRI_T_RANGE
         ,lt_RANGETAB TYPE  RSDRI_TX_RANGETAB
         ,lt_HIER     TYPE  RSDRI_TSX_HIER
         ,lt_adj_hier type  t_sfc "nos290704
        statics: so_convert type ref to lcl_sid_no_sid
               , sx_seldr_fp34 type xstring
               , s_fieldname_fp7 type RSALIAS
               , st_sfc_fp34    TYPE  RSDD_TH_SFC
        create object so_convert type lcl_sid_no_sid
                  exporting i_infoprov = i_infoprov.
    Transform SIDs...
        perform convert_importing_parameter
                         using    i_th_sfc
                                  i_th_sfk
                                  i_tsx_seldr
                                  so_convert
                                  e_t_data
                         changing lt_sfc
                                  lt_sfk
                                  lt_range
                                  lt_rangetab
                                  lt_hier
                                  sx_seldr_fp34
                                          "Complete SELDR as XSTRING
                                  st_sfc_fp34
                                          "SFC of a selection with
                                          "FISCPER3/FISCYEAR
                                  s_fieldname_fp7
                                          "Name of Field for 0FISCPER
                                          "(if requested)
    This is the old routine, but ST_HIENDODE and ST_HIENODENAME can
    be neglected, since they are not used at all.
        perform prepare_selections
                         using    lt_sfc
                                  lt_sfk
                                  lt_range
                                  lt_rangetab
                                  lt_hier
                         changing st_sfc
                                  st_sfk
                                  st_range
                                  st_hienode
                                  st_hienodename
                                  st_seltype.
      endif.
      assign sr_data->*   to <lt_data>.
      assign sr_data_p->* to <lt_data_p>.
      describe table <lt_data_p> lines l_nr.
      while l_nr < l_packagesize and s_end_of_data is initial.
        if s_dest_back is initial and s_bw_local = rs_c_true.
      Local call
          call function l_UCR_DATA_READ_3
            EXPORTING
              IT_SELTYPE      = sT_SELTYPE
              IT_HIENODE      = sT_HIENODE        "not used
              IT_HIENODENAME  = sT_HIENODENAME    "not used
              IT_RANGE        = sT_RANGE
              I_PACKAGESIZE   = i_packagesize
              I_KEYDATE       = i_Keydate
              IT_SFC          = sT_SFC
              IT_SFK          = sT_SFK
              i_infoprov      = i_infoprov
              i_rfcdest       = s_destination
              ix_seldr        = sx_seldr_fp34
              it_bw_sfc       = st_sfc_fp34
              it_bw_sfk       = i_th_sfk
              i_fieldname_fp7 = s_fieldname_fp7
            IMPORTING
              ET_DATA         = <lT_DATA>
              E_END_OF_DATA   = s_END_OF_DATA
              ET_MESSAGE      = lT_MESSAGE
              et_adj_hier     = lt_adj_hier         "nos290704
            CHANGING
              c_first_call    = s_first_call.
        elseif s_dest_back is initial and s_bw_local = rs_c_false.
        !!! Error !!! No SEM-BCS destination registered for infoprovider!
          if 1 = 2.
            message e151(rssem) with i_infoprov.
          endif.
          ls_message-msgty = 'E'.
          ls_message-msgid = 'RSSEM'.
          ls_message-msgno = '151'.
          ls_message-msgv1 =  i_infoprov.
          insert ls_message into table e_t_msg.
        else.
        remote call to SEM-BCS
    ** Call UCR_DATA_READ_3 ...
          if s_first_call is not initial.
      get the datadescription to create the requested return-structure
      in the RFC-System.
            perform get_datadescr
                      using <lt_data>
                      changing st_datadescr
          endif.
          call function 'UCR_DATA_READ_4'
            destination s_dest_back
            exporting i_infoprov     = i_infoprov
                      i_rfcdest      = s_destination
                      i_first_call   = s_first_call
                      i_packagesize  = i_packagesize
                      i_keydate      = i_keydate
                      ix_seldr       = sx_seldr_fp34
                      it_bw_sfc      = st_sfc_fp34
                      it_bw_sfk      = i_th_sfk
                      it_datadescr   = st_datadescr
                      i_fieldname_fp7 = s_fieldname_fp7
            importing c_first_call   = s_first_call
                      e_end_of_data  = s_end_of_data
                      e_xstring      = l_xstring
            tables    it_seltype     = st_seltype
                      it_range       = st_range
                      it_hienode     = st_hienode      "not used
                      it_hienodename = st_hienodename  "not used
                      it_sfc         = st_sfc
                      it_sfk         = st_sfk
                      et_message     = lt_message
                      et_adj_hier    = lt_adj_hier.         "nos290704.
          clear <lt_data>.
          if lt_message is initial.
            call function 'RSSEM_UCR_DATA_UNWRAP'
              EXPORTING
                i_xstring = l_xstring
              CHANGING
                ct_data   = <lt_data>.
          endif.
        endif.
      convert the returned data (SID & Hierarchy).
        call method so_convert->convert_nosid2sid
          exporting it_adj_hier = lt_adj_hier[]     "nos290704
          CHANGING
            ct_data = <lt_data>.
       e_t_data = <lt_data>.
    Begin "nos100804
        data l_collect type sy-subrc.
        l_collect = 1.
        if <lt_data_p> is initial and
           <lt_data>   is not initial.
          call function 'ABL_TABLE_HASH_STATE'
            exporting
              itab          = <lt_data>
            IMPORTING
              HASH_RC       = l_collect "returns 0 if hash key exist.
        endif.
        if l_collect is initial.
          <lt_data_p> = <lt_data>.
        else.
          loop at <lt_data> assigning <ls_data>.
            collect <ls_data> into <lt_data_p>.
          endloop.
        endif.
       append lines of <lt_data> to <lt_data_p>.
    End "nos100804
      messages
        loop at lt_message assigning <ls_message>.
          move-corresponding <ls_message> to ls_message.
          insert ls_message into table e_t_msg.
        endloop.
        if e_t_msg is not initial.
          raise error_in_bcs.
        endif.
        describe table <lt_data_p> lines l_nr.
      endwhile.
      if l_nr <= l_packagesize.
        e_t_data = <lt_data_p>.
        clear <lt_data_p>.
        e_end_of_data = s_end_of_data.
      else.
    Begin "nos100804
        <lt_data> = <lt_data_p>.
        append lines of <lt_data> to l_packagesize to e_t_data.
        data l_from type i.
        l_from = l_packagesize + 1.
        clear <lt_data_p>.
        insert lines of <lt_data> from l_from into table <lt_data_p>.
        clear <lt_data>.
    End "nos100804
      endif.
    UT begin: start to record data
      if s_record_mode = rs_c_true.
        if i_first_call = rs_c_true.
          clear: s_guid, s_packageno.
          perform prepare_unit_test_rec_param
                      using
                         e_end_of_data
                         i_infoprov
                         i_keydate
                         i_th_sfc
                         i_th_sfk
                         i_tsx_seldr
                         i_packagesize
                         lt_key
                         e_t_data
                         s_qry_memo
                      changing
                         s_guid.
        endif.
        add 1 to s_packageno.
        perform prepare_unit_test_rec_data
                      using
                         s_guid
                         s_packageno
                         e_t_data
                         i_infoprov
                         e_end_of_data.
      endif.  "s_record_mode = rs_c_true
    UT end.
      if not e_end_of_data is initial.
      clean-up
        clear: s_first_call, s_destination, s_report, s_bw_local,
               st_sfc, st_sfk, st_range, st_hienode, s_basiccube,
               st_hienodename, st_seltype, s_dest_back, sr_data,
               so_convert , s_end_of_data, sr_data_p."nos100804
        free: <lt_data> , <lt_data_p>.
      endif.
    endfunction.
    It stores query parameters into cluster table
    form prepare_unit_test_rec_param using i_end_of_data type rs_bool
                                           i_infoprov    type rsinfoprov
                                           i_keydate     type rrsrdate
                                           i_th_sfc      type RSDD_TH_SFC
                                           i_th_sfk      type RSDD_TH_SFk
                                           i_tsx_seldr   type rsdd_tsx_seldr
                                           i_packagesize type i
                                           it_key        type standard table
                                           it_retdata    type standard table
                                           i_s_memo      type char256
                                     changing c_guid     type guid_22.
      data:
            ls_key          type g_rssem_typ_key,
            ls_cluster      type rssem_rfcpack,
            l_timestamp     type timestampl.
    get GUID, ret component type
      call function 'GUID_CREATE'
        importing
          ev_guid_22 = c_guid.
      ls_key-idxrid = c_guid.
      clear ls_key-packno.
    cluster record
      get time stamp field l_timestamp.
      ls_cluster-infoprov = i_infoprov.
      ls_cluster-end_of_data = i_end_of_data.
      ls_cluster-system_time = l_timestamp.
      ls_cluster-username = sy-uname.
    return data type
      data:
        lo_tabtype     type ref to cl_abap_tabledescr,
        lo_linetype    type ref to cl_abap_structdescr,
        lt_datadescr   type t_datadescr,
        ls_datadescr   like line of lt_datadescr,
        lt_retcomptab  type abap_compdescr_tab,
        ls_retcomptab  like line of lt_retcomptab,
        lt_rangetab    type t_seqnr_range.
      lo_tabtype   ?= cl_abap_typedescr=>describe_by_data( it_retdata ).
    lo_linetype  ?= lo_tabtype->get_table_line_type( ).
    lt_retcomptab = lo_linetype->components.
    call the sub procedure to use external format of C, instead of interal format (unicode).
    otherwise, when create data type from internal format, it won't be the same length as stored in cluster.
      PERFORM get_datadescr USING    it_retdata
                            CHANGING lt_datadescr.
      loop at lt_datadescr into ls_datadescr.
        move-corresponding ls_datadescr to ls_retcomptab.
        append ls_retcomptab to lt_retcomptab.
      endloop.
    range, excluding
    record param
      export p_infoprov        from i_infoprov
             p_keydate         from i_keydate
             p_th_sfc          from i_th_sfc
             p_th_sfk          from i_th_sfk
             p_txs_seldr       from i_tsx_seldr
             p_packagesize     from i_packagesize
             p_t_retcomptab    from lt_retcomptab
             p_t_key           from it_key
             p_memo            from i_s_memo
      to database rssem_rfcpack(ut)
      from ls_cluster
      client sy-mandt
      id ls_key.
    endform.
    It stores return data to cluster table
    form prepare_unit_test_rec_data using
                                      i_guid        type guid_22
                                      i_packageno   type i
                                      it_retdata    type standard table
                                      i_infoprov    type rsinfoprov
                                      i_end_of_data type rs_bool.
      data:
            l_lines         type i,
            ls_key          type g_rssem_typ_key,
            ls_cluster      type rssem_rfcpack,
            l_timestamp     type timestampl.
      ls_key-idxrid = i_guid.
      ls_key-packno = i_packageno.
      describe table it_retdata lines l_lines.
      if l_lines = 0.
        clear it_retdata.
      endif.
    cluster record
      get time stamp field l_timestamp.
      ls_cluster-infoprov = i_infoprov.
      ls_cluster-end_of_data = i_end_of_data.
      ls_cluster-system_time = l_timestamp.
      ls_cluster-username = sy-uname.
      export p_t_retdata       from it_retdata
      to     database rssem_rfcpack(ut)
      from   ls_cluster
      client sy-mandt
      id     ls_key.
    endform.
    form convert_importing_parameter
                   using    i_th_sfc    TYPE  RSDD_TH_SFC
                            i_th_sfk    TYPE  RSDD_TH_SFK
                            i_tsx_seldr TYPE  RSDD_TSX_SELDR
                            io_convert  type  ref to lcl_sid_no_sid
                            i_t_data    type  any table
                   changing et_sfc      TYPE  RSDRI_TH_SFC
                            et_sfk      TYPE  RSDRI_TH_SFK
                            et_range    TYPE  RSDRI_T_RANGE
                            et_rangetab TYPE  RSDRI_TX_RANGETAB
                            et_hier     TYPE  RSDRI_TSX_HIER
                            ex_seldr    type xstring
                            e_th_sfc    TYPE  RSDD_TH_SFC
                            e_fieldname_fp7 type  rsalias
      data lt_seldr TYPE  RSDD_TSX_SELDR.
      data ls_th_sfc type RRSFC01.
    0) rename 0BCSREQUID   > 0REQUID
      data l_tsx_seldr like i_tsx_seldr.
      data l_th_sfc like i_th_sfc.
      data l_th_sfc2 like i_th_sfc.                            "nos070605
      l_tsx_seldr = i_tsx_seldr.
      l_th_sfc = i_th_sfc.
      data ls_sfc_requid type   RRSFC01.
      data ls_seldr_requid type RSDD_SX_SELDR.
      ls_sfc_requid-chanm = '0BCS_REQUID'.
      read table l_th_sfc from ls_sfc_requid into ls_sfc_requid.
      if sy-subrc = 0.
        delete table l_th_sfc from ls_sfc_requid.
        ls_sfc_requid-chanm = '0REQUID'.
        insert ls_sfc_requid into table l_th_sfc.
      endif.
      ls_seldr_requid-chanm = '0BCS_REQUID'.
      read table l_tsx_seldr from ls_seldr_requid into ls_seldr_requid.
      if sy-subrc = 0.
        delete table l_tsx_seldr from ls_seldr_requid.
        ls_seldr_requid-chanm = '0REQUID'.
        field-symbols: <ls_range> like line of ls_seldr_requid-range-range.
        loop at ls_seldr_requid-range-range assigning <ls_range>.
          check <ls_range>-keyfl is not initial. "jhn190106
          if <ls_range>-sidlow is initial and <ls_range>-low is not initial.
            <ls_range>-sidlow = <ls_range>-low.
            clear <ls_range>-low.
          endif.
          if <ls_range>-sidhigh is initial and <ls_range>-high is not initial.
            <ls_range>-sidhigh = <ls_range>-high.
            clear <ls_range>-high.
          endif.
          clear <ls_range>-keyfl.     "jhn190106
        endloop.
        insert ls_seldr_requid into table l_tsx_seldr.
      endif.
    *1) Convert SIDs..., so that all parameter look like the old ones.
      call method io_convert->convert_sid2nosid
        EXPORTING
          it_sfc      = l_th_sfc
          it_sfk      = i_th_sfk
          it_seldr    = l_tsx_seldr
          it_data     = i_t_data
         IMPORTING
          et_sfc      = et_sfc
          et_sfk      = et_sfk
          et_range    = et_range
          et_rangetab = et_rangetab
          e_th_sfc    = l_th_sfc2                  "nos070605
    Ignore the old hierachy information:
      clear et_hier.
      delete et_range where chanm = '0REQUID'.
      delete table et_sfc with table key chanm = '0REQUID'.
    *2) Eliminate FISCPER7, from new strucutres:
    lt_seldr = i_tsx_seldr. "nos131004
      e_th_sfc = l_th_sfc.
    the fiscper7 can be deleted completly from the SID-selection, because
    it is also treated within et_range...
      clear e_fieldname_fp7.
    delete lt_seldr where chanm = cs_iobj_time-fiscper7."nos131004
    Begin "nos131004
    Ensure that there is no gap in the seldr.
      data:
         ls_seldr   like line of lt_seldr
        ,l_fems_act like ls_seldr-fems
        ,l_fems_new like ls_seldr-fems
      loop at l_tsx_seldr into ls_seldr
        where chanm ne cs_iobj_time-fiscper7.
        if ls_seldr-fems ne l_fems_act.
          l_fems_act = ls_seldr-fems.
          add 1 to l_fems_new.
        endif.
        ls_seldr-fems = l_fems_new.
        insert ls_seldr into table lt_seldr.
      endloop.
    end "nos131004
      e_th_sfc = l_th_sfc2.                                "nos070605
    Is fiscper7 in the query? (BCS requires allways two fields)
      read table e_th_sfc with key chanm = cs_iobj_time-fiscper7
           into ls_th_sfc.
      if sy-subrc = 0.
    ==> YES
    --> change the SFC, so that FISCPER3 and FISCYEAR is requested.
    The table ET_RANGE does contain also the selection for
    FISCPER3/FISCYEAR
    But since also E_FIELDNAME_FP7 is transferred to BCS, the
    transformation of the data, back to FISCPER7 is done on BCS-side.
        e_fieldname_fp7 = ls_th_sfc-KEYRETURNNM.
                                                "begin nos17060
        if e_fieldname_fp7 is initial.
          e_fieldname_fp7 = ls_th_sfc-sidRETURNNM.
          translate e_fieldname_fp7 using 'SK'.
        endif.
                                                "end nos17060
        delete table e_th_sfc from ls_th_sfc.
        ls_th_sfc-chanm       = cs_iobj_time-fiscper3.
        ls_th_sfc-keyreturnnm = ls_th_sfc-chanm.
        insert ls_th_sfc into table e_th_sfc.
        ls_th_sfc-chanm       = cs_iobj_time-fiscyear.
        ls_th_sfc-keyreturnnm = ls_th_sfc-chanm.
        insert ls_th_sfc into table e_th_sfc.
      endif.
    Store the SELDR in a XSTRING and unpack it just before selecting data
    in BW. It is not interpreted in BCS!
      export t_seldr  = lt_seldr
    Store also the SFC, because the BW-Systems migth be differrnt rel./SP.
             t_bw_sfc = e_th_sfc to data buffer ex_seldr compression on.
    endform.                    "convert_importing_parameter
    *&      Form  get_datadescr
          text
         -->IT_DATA    text
         -->ET_DATADESCtext
    form get_datadescr
                  using it_data type any table
                  changing et_datadescr type t_datadescr
      data: lr_data  type ref to data
          , lo_descr TYPE REF TO CL_ABAP_TYPEDESCR
          , lo_elemdescr TYPE REF TO CL_ABAP_elemDESCR
          , lo_structdescr TYPE REF TO CL_ABAP_structDESCR
          , lt_components  type abap_component_tab
          , ls_components  type abap_componentdescr
          , ls_datadescr type s_datadescr
      field-symbols: <ls_data> type any
                   , <ls_components> type abap_compdescr
      clear et_datadescr.
      create data lr_data like line of it_data.
      assign lr_data->* to <ls_data>.
      CALL METHOD CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_DATA
        EXPORTING
          P_DATA      = <ls_data>
        RECEIVING
          P_DESCR_REF = lo_descr.
      lo_structdescr ?= lo_descr.
      CALL METHOD lo_structdescr->GET_COMPONENTS
        RECEIVING
          P_RESULT = lt_components.
      loop at lo_structdescr->components assigning <ls_components>.
        move-corresponding <ls_components> to ls_datadescr.
        if   ls_datadescr-type_kind = cl_abap_elemdescr=>typekind_char
          or ls_datadescr-type_kind = cl_abap_elemdescr=>typekind_num
          read table lt_components with key name = <ls_components>-name
                                   into ls_components.
          if sy-subrc = 0.
            lo_elemdescr ?= ls_components-type.
    ls_datadescr-length = lo_elemdescr->output_length.
          endif.
        endif.
        append ls_datadescr to et_datadescr.
      endloop.
    endform.                    "get_datadescr
    Try to give your inputs will appreciate that
    thanks

  • Performance Issues in Win 7 (Pro to Ultimate)

    I use Avast as my virus protection.  I have recently tried to uninstall Unity Web Player, but I can't get it out, no matter what I do (which includes removing all "unity" info in the registry, all folders with the player info, and through
    the control panel which brings up an error box that won't go away and basically tells me there is a problem with almost all files on my computer).
    So, I called Avast, and they showed me the Reliability Monitor.  None of my computers seem to be running as they should be.  I'm just bisides myself as the computer I'm currently on recently had the $#$&^ OS restarted (clean) and for what?!!!
     The Area 51 is all full of errors, that started two days after that OS was installed.  I haven't even looked at the laptop yet.  So far as I know, only the MAC is working right!!!
    I spend so much time trying to update and keep these things running right, but it's (obviously) not working, and I'm frustrated beyond words!  I'm also not wealthy, so I can't even take them to someone else to see what the problem is.  Crying is
    not an options, but likely as my frustration meter is totally pegges at this point!!!
    PCPitstop used to give me a lot of information on that might  have been wrong, but it no longer does that.  I am at my wits end!  Any ideas?  (yeah, besides taking up knitting!)

    Hi,
    Like Zigzag said, what's your real issue, removing Unity Web Player or computer running?
    If it's removing Unity Web Player, please contact its support to ask how to remove the components remained thoroughly.
    If it's system running issue, please let us know the exact situation. What's the performance issue? Did your application not running or computer slowly?
    Karen Hu
    TechNet Community Support

  • SQL Services 2012 Reporting Services Performance Issue - PowerView

    Power view Reports are loading very slow while opening in SharePoint 2013, it is taking more than 15 secs. It is development environment, maximum 10 users , no traffic at all but still not sure why it is taking such long time.
    We have 2 servers in SharePoint farm one is for SharePoint and other is for SQL. I have gone through the logs in reporting database, attached the same below. Can you please help me what we can say from the sheet attached ,whether it is slow or fast. Or where
    we are having issue.
    SQL server version is SQL 2012 SP2.
    SharePoint 2013 is RTM.
    Gone through the below blogs but no luck.
    http://blogs.msdn.com/b/psssql/archive/2013/07/29/tracking-down-power-view-performance-problems.aspx
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/4ed01ff4-139a-4eb3-9e2e-df12a9c316ff/ssrs-2008-r2-and-sharepoint-2010-performance-problems
    Thanks.
    Thanks, Ram Ch

    Hi Ram Ch,
    According to your description, your have performance issue when running your Power View report. Right?
    In this scenario, based on your screenshot, it takes long time on data retrieval. How is the performance when executing the query in SQL Server Management Studio? Since you mention there's no traffic at all and 15 seconds will not cause query
    time out, we suggest you optimize the query for retrieving data. Please refer to links below:
    Troubleshooting Reports: Report Performance
    Please share some detail information about the data query if possible. Thanks.
    Best Regards,
    Simon Hou

  • Performance issue with MSEG table in Production

    Hi,
    I have written a report with 4 select queries.
    First i am selecting data from VBRK table in i_vbrk. Then for all entries in i_vbrk, i am fetching records from VBRP into i_vbrp table. Then for all entries in i_vbrp, records are fetched from MKPF into i_mkpf. Then, finally for all entries in i_mkpf, records are fetched from MSEG into i_mseg table.
    Performance of this report is good in Quality system, but it is very poor in Production systems. It is taking more than 20 mins to get executed. MSEG table query is taking most of the time.
    I have done indexing and packet sizing on MSEG table, but still performace issue persists. So, cqan you please let me know if there is any way by which performace of the program can be improved???
    Please help.
    Thanks,
    Archana

    Hi Archana,
    I was having the same issue for MKPF and MSEG , I am using INNER JOIN Condition .
    SELECT
    mkpf~mblnr
    mkpf~mjahr
    mkpf~budat
    mkpf~usnam
    mkpf~bktxt
    mseg~zeile
    mseg~bwart
    mseg~prctr
    mseg~matnr
    mseg~werks
    mseg~lgort
    mseg~menge
    mseg~meins
    mseg~ebeln
    mseg~sgtxt
    mseg~shkzg
    mseg~dmbtr
    mseg~waers
    mseg~sobkz
    mkpf~xblnr
    mkpf~frbnr
    mseg~lifnr
    INTO TABLE xmseg
    FROM mkpf
    INNER JOIN mseg
    ON mkpfmandt EQ msegmandt AND
    mkpfmblnr EQ msegmblnr AND
      mkpfmjahr EQ msegmjahr
    WHERE mkpf~vgart IN se_vgart
    AND   mkpf~budat IN se_budat
    AND   mkpf~usnam IN se_usnam
    AND   mkpf~bktxt IN se_bktxt
    AND   mseg~bwart IN se_bwart
    AND   mseg~matnr IN se_matnr
    AND   mseg~werks IN se_werks
    AND   mseg~lgort IN se_lgort
    AND   mseg~sobkz IN se_sobkz
    AND   mseg~lifnr IN se_lifnr
    %_HINTS ORACLE '&SUBSTITUTE VALUES&'.
    But still I have a issue in performance , Can anybody  give some suggestions , please .
    Regards,
    Shiv

  • Performance issue in Webi rep when using custom object from SAP BW univ

    Hi All,
    I had to design a report that runs for the previous day and hence we had created a custom object which ranks the dates and then a pre-defined filter which picks the date with highest rank.
    the definition for the rank variable(in universe) is as follows:
    <expression>Rank([0CALDAY].Currentmember,  Order([0CALDAY].Currentmember.Level.Members ,Rank([0CALDAY].Currentmember,[0CALDAY].Currentmember.Level.Members), BDESC))</expression>
    Now to the issue I am currently facing,
    The report works fine when we ran it on a test environment ie :with small amount of data.
    Our production environment has millions of rows of data and when I run the report with filter it just hangs.I think this is because it tries to rank all the dates(to find the max date) and thus resulting in a huge performance issue.
    Can someone suggest how this performance issue can be overcome?
    I work on BO XI3.1 with SAP BW.
    Thanks and Regards,
    Smitha.

    Hi,
    Using a variable on the BW side is not feasible since we want to use the same BW query for a few other reports as well.
    Could you please explain what you mean by 'use LAG function'.How can it be used in this scenario?
    Thanks and Regards,
    Smitha Mohan.

  • Performance Issue in ABAP part as suggested by SE30 for the below coding

    Dear Abapers,
    The below coding was done by my seniors and having performance issue i.e in SE30 the abap part is consuming 98% of time.
    Pl. help us to solve this situation.
    With best regards,
    S. Arunachalam.
    the code is:
    REPORT ZOBJLIST LINE-SIZE 320 NO STANDARD PAGE HEADING. "280 to 320
    TABLES: MARA, MAKT, A916, KONP, MVKE, ZSAI_PARAM.
    Input parameters *****************************************************
    DATA IT_MARA LIKE MARA OCCURS 0 WITH HEADER LINE.
    DATA T_CLASS LIKE SCLASS OCCURS 0 WITH HEADER LINE.
    DATA T_CLOBJDAT LIKE CLOBJDAT OCCURS 0 WITH HEADER LINE.
    DATA FLG_COLOR TYPE C.
    DATA WRK_CLASS LIKE KLAH-CLASS.
    DATA WRK_PERCENT TYPE I. " Progress percentage
    DATA WRK_LINES LIKE SY-TABIX. " To store the no. of lines in int.table
    DATA WRK_PROGRESSTEXT(72) . " Progress indicator text
    DATA : BEGIN OF IT_MATNR OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MAKTX LIKE MAKT-MAKTX,
    BISMT LIKE MARA-BISMT, "Thanikai-17.05.2002
    END OF IT_MATNR.
    DATA : BEGIN OF IT_HEADER OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MAKTX LIKE MAKT-MAKTX,
    CLART LIKE SCLASS-KLART,
    CLASS LIKE SCLASS-CLASS,
    BISMT LIKE MARA-BISMT, "Thanikai-17.05.2002
    SCMNG(4) TYPE I, "Thanikai-03.10.2002
    END OF IT_HEADER.
    DATA : BEGIN OF IT_DETAILS OCCURS 0,
    MATNR LIKE MARA-MATNR,
    ZAEHL LIKE CLOBJDAT-ZAEHL,
    ATNAM LIKE CLOBJDAT-ATNAM,
    AUSP1 LIKE CLOBJDAT-AUSP1,
    END OF IT_DETAILS.
    DATA : BEGIN OF IT_DETAILS1 OCCURS 0,
    MATNR LIKE MARA-MATNR,
    ATNAM LIKE CLOBJDAT-ATNAM,
    ZAEHL LIKE CLOBJDAT-ZAEHL,
    END OF IT_DETAILS1.
    DATA: IT_DETAILS2 LIKE IT_DETAILS1 OCCURS 0 WITH HEADER LINE.
    DATA TMP_MATNR LIKE AUSP-OBJEK.
    DATA WRK_FIELD(25).
    DATA WRK_TABNAME(40). " Name of the int.table from wrk_fldname
    DATA WRK_FIELDNAME(40). " Name of the fld name from wrk_fldname
    DATA WRK_FLDNAME(40).
    DATA T_CLOBJDAT_LINES LIKE SY-TABIX.
    DATA WRK_LINES1 LIKE SY-TABIX.
    DATA WRK_FIRST_TIME.
    DATA TMP_STR.
    DATA WRK_AUSP1 LIKE CLOBJDAT-AUSP1.
    DATA: WRK_KBETR LIKE KONP-KBETR. "Thanikai-03.10.2002
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
    *PARAMETERS:
    SELECT-OPTIONS:
    P_MATKL FOR MARA-MATKL DEFAULT 'DIAL' OBLIGATORY NO INTERVALS.
    SELECT-OPTIONS : S_MATNR FOR MARA-MATNR MATCHCODE OBJECT MAT1.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS: P_CLASS LIKE KLAH-CLASS,
    P_KLART LIKE KLAH-KLART DEFAULT '001' OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : REQ RADIOBUTTON GROUP RGRP ,
    NREQ RADIOBUTTON GROUP RGRP .
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN.
    IF NOT P_CLASS IS INITIAL.
    WRK_CLASS = P_CLASS.
    ELSE.
    WRK_CLASS = SPACE.
    ENDIF.
    TOP-OF-PAGE.
    IF SY-BATCH NE 'X'.
    PERFORM PRINT_TOP.
    ENDIF.
    START-OF-SELECTION.
    SET PF-STATUS '9000'.
    SELECT * INTO TABLE IT_MARA
    FROM MARA CLIENT SPECIFIED
    WHERE MANDT = SY-MANDT
    AND MATKL IN P_MATKL
    AND MATNR IN S_MATNR.
    DESCRIBE TABLE IT_MARA LINES WRK_LINES.
    MOVE 'Selecting Material Description' TO WRK_PROGRESSTEXT.
    PERFORM SAPGUI USING WRK_PERCENT WRK_PROGRESSTEXT.
    LOOP AT IT_MARA.
    SELECT SINGLE * FROM MAKT CLIENT SPECIFIED
    WHERE MANDT = SY-MANDT
    AND MATNR = IT_MARA-MATNR
    AND SPRAS = 'E'.
    IF SY-SUBRC = 0.
    IT_MATNR-MATNR = IT_MARA-MATNR.
    IT_MATNR-MAKTX = MAKT-MAKTX.
    IT_MATNR-BISMT = IT_MARA-BISMT. "Thanikai-17.05.2002
    ENDIF.
    APPEND IT_MATNR.
    CLEAR IT_MATNR.
    ENDLOOP.
    CLEAR WRK_LINES.
    DESCRIBE TABLE IT_MATNR LINES WRK_LINES.
    MOVE 'Selecting Class / characteristics for the Material'
    TO WRK_PROGRESSTEXT.
    PERFORM SAPGUI USING WRK_PERCENT WRK_PROGRESSTEXT.
    LOOP AT IT_MATNR.
    CLEAR: TMP_MATNR, T_CLASS, T_CLOBJDAT. "Thanikai-26.08.2002
    REFRESH: T_CLASS, T_CLOBJDAT. "Thanikai-26.08.2002
    TMP_MATNR = IT_MATNR-MATNR.
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
    EXPORTING
    CLASS = WRK_CLASS
    CLASSTEXT = 'X'
    CLASSTYPE = '001'
    CLINT = ' '
    FEATURES = 'X'
    LANGUAGE = SY-LANGU
    OBJECT = TMP_MATNR
    OBJECTTABLE = 'MARA'
    KEY_DATE = SY-DATUM
    INITIAL_CHARACT = 'X'
    NO_VALUE_DESCRIPT = 'X'
    CHANGE_SERVICE_CLF = 'X'
    INHERITED_CHAR = ' '
    TABLES
    T_CLASS = T_CLASS
    T_OBJECTDATA = T_CLOBJDAT
    EXCEPTIONS
    NO_CLASSIFICATION = 1
    NO_CLASSTYPES = 2
    INVALID_CLASS_TYPE = 3
    OTHERS = 4.
    IF SY-SUBRC = 0.
    READ TABLE T_CLASS INDEX 1.
    IT_HEADER-MATNR = IT_MATNR-MATNR.
    IT_HEADER-MAKTX = IT_MATNR-MAKTX.
    IT_HEADER-BISMT = IT_MATNR-BISMT."Thanikai-17.05.2002
    IT_HEADER-CLART = T_CLASS-KLART.
    IT_HEADER-CLASS = T_CLASS-CLASS.
    PERFORM PKG_DLVY_UNIT.
    APPEND IT_HEADER.
    CLEAR: IT_HEADER.
    Code Start by Thanikai on 16.08.2002
    LOOP AT T_CLOBJDAT.
    IT_DETAILS-MATNR = IT_MATNR-MATNR.
    IT_DETAILS-ZAEHL = T_CLOBJDAT-ZAEHL.
    IT_DETAILS-ATNAM = T_CLOBJDAT-ATNAM.
    IT_DETAILS-AUSP1 = T_CLOBJDAT-AUSP1.
    APPEND IT_DETAILS.
    ENDLOOP.
    CLEAR: IT_DETAILS.
    LOOP AT T_CLOBJDAT.
    IT_DETAILS1-MATNR = IT_MATNR-MATNR.
    IT_DETAILS1-ATNAM = T_CLOBJDAT-ATNAM.
    IT_DETAILS1-ZAEHL = T_CLOBJDAT-ZAEHL.
    APPEND IT_DETAILS1.
    ENDLOOP.
    CLEAR: IT_DETAILS1.
    DESCRIBE TABLE IT_DETAILS1 LINES T_CLOBJDAT_LINES.
    IF WRK_FIRST_TIME NE 'X'.
    WRK_LINES1 = T_CLOBJDAT_LINES.
    WRK_FIRST_TIME = 'X'.
    IT_DETAILS2[] = IT_DETAILS1[].
    ELSE.
    IF T_CLOBJDAT_LINES GT WRK_LINES1.
    WRK_LINES1 = T_CLOBJDAT_LINES.
    IT_DETAILS2[] = IT_DETAILS1[].
    ENDIF.
    ENDIF.
    CLEAR: T_CLOBJDAT_LINES.
    CLEAR: IT_DETAILS1. REFRESH: IT_DETAILS1.
    ENDIF.
    Code end by Thanikai on 16.08.2002
    ENDLOOP.
    CLEAR: WRK_LINES1, WRK_FIRST_TIME.
    Print Details *********************************
    PERFORM PRINT_DETAILS.
    AT USER-COMMAND.
    GET CURSOR FIELD WRK_FIELD.
    SPLIT WRK_FIELD AT '-' INTO WRK_TABNAME WRK_FLDNAME.
    IF NOT WRK_FLDNAME IS INITIAL.
    CASE SY-UCOMM.
    WHEN 'SORA'.
    IF SY-LSIND > 0.
    SY-LSIND = SY-LSIND - 1. "To print in the same window
    ENDIF.
    PERFORM PRINT_REPORT_ASCENDING.
    WHEN 'SORD'.
    IF SY-LSIND > 0.
    SY-LSIND = SY-LSIND - 1. "To print in the same window
    ENDIF.
    PERFORM PRINT_REPORT_DESCENDING.
    ENDCASE.
    ELSE.
    MESSAGE S000(38) WITH 'Selete Material Number / Description'.
    ENDIF.
    *& Form SAPGUI
    text
    -->P_WRK_PERCENT text *
    -->P_WRK_PROGRESSTEXT text *
    FORM SAPGUI USING P_WRK_PERCENT
    P_WRK_PROGRESSTEXT.
    CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
    PERCENTAGE = WRK_PERCENT
    TEXT = WRK_PROGRESSTEXT
    EXCEPTIONS
    OTHERS = 1.
    ENDFORM. " SAPGUI
    *& Form PRINT_REPORT_ASCENDING
    text
    --> p1 text
    <-- p2 text
    FORM PRINT_REPORT_ASCENDING.
    IF WRK_TABNAME = 'IT_HEADER'.
    SORT IT_HEADER BY (WRK_FLDNAME).
    PERFORM PRINT_TOP.
    PERFORM PRINT_DETAILS.
    ENDIF.
    ENDFORM. " PRINT_REPORT_ASCENDING
    *& Form PRINT_DETAILS
    text
    --> p1 text
    <-- p2 text
    WRK_AUSP1 width chged below from (7)to(9) by Nagaraj/MKRK 24.11.05
    FORM PRINT_DETAILS.
    SORT IT_HEADER BY MATNR.
    IF SY-BATCH EQ 'X'.
    PERFORM PRINT_TOP.
    ENDIF.
    IF REQ = 'X'.
    LOOP AT IT_HEADER.
    IF FLG_COLOR = 'X'.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    CLEAR FLG_COLOR.
    ELSE.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    FLG_COLOR = 'X'.
    ENDIF.
    WRITE :/ SY-VLINE NO-GAP,
    (18) IT_HEADER-MATNR COLOR COL_KEY NO-GAP,
    SY-VLINE NO-GAP,
    (40) IT_HEADER-MAKTX NO-GAP,
    SY-VLINE NO-GAP,
    (18) IT_HEADER-BISMT NO-GAP, "Thanikai-17.05.2002
    SY-VLINE NO-GAP.
    Code started by Thanikai on 16.08.2002
    LOOP AT IT_DETAILS2.
    CLEAR: TMP_STR, WRK_AUSP1.
    IF IT_DETAILS2-ATNAM EQ 'CALIBRE'.
    LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
    AND ATNAM = IT_DETAILS2-ATNAM
    AND ZAEHL = IT_DETAILS2-ZAEHL.
    TMP_STR = 'X'.
    WRK_AUSP1 = IT_DETAILS-AUSP1.
    EXIT.
    ENDLOOP.
    IF TMP_STR EQ 'X'.
    WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
    ELSE.
    WRITE : ' ', SY-VLINE NO-GAP.
    ENDIF.
    ELSE.
    LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
    AND ATNAM = IT_DETAILS2-ATNAM.
    TMP_STR = 'X'.
    WRK_AUSP1 = IT_DETAILS-AUSP1.
    EXIT.
    ENDLOOP.
    IF TMP_STR EQ 'X'.
    WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
    ELSE.
    WRITE : ' ', SY-VLINE NO-GAP.
    ENDIF.
    ENDIF.
    ENDLOOP.
    WRITE : (8) IT_HEADER-SCMNG NO-GAP, SY-VLINE NO-GAP.
    IF SY-LINNO > 25.
    IF SY-BATCH EQ 'X'.
    NEW-PAGE.
    PERFORM PRINT_TOP.
    ENDIF.
    ENDIF.
    Code end by Thanikai on 16.08.2002..
    ENDLOOP.
    ELSEIF NREQ = 'X'.
    LOOP AT IT_HEADER.
    IF FLG_COLOR = 'X'.
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
    CLEAR FLG_COLOR.
    ELSE.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    FLG_COLOR = 'X'.
    ENDIF.
    WRITE :/ SY-VLINE NO-GAP,
    (18) IT_HEADER-MATNR COLOR COL_KEY NO-GAP,
    SY-VLINE NO-GAP,
    (18) IT_HEADER-BISMT NO-GAP, "Thanikai-17.05.2002
    SY-VLINE NO-GAP.
    Code started by Thanikai on 16.08.2002
    LOOP AT IT_DETAILS2.
    CLEAR: TMP_STR, WRK_AUSP1.
    IF IT_DETAILS2-ATNAM EQ 'CALIBRE'.
    LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
    AND ATNAM = IT_DETAILS2-ATNAM
    AND ZAEHL = IT_DETAILS2-ZAEHL.
    TMP_STR = 'X'.
    WRK_AUSP1 = IT_DETAILS-AUSP1.
    EXIT.
    ENDLOOP.
    IF TMP_STR EQ 'X'.
    WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
    ELSE.
    WRITE : ' ', SY-VLINE NO-GAP.
    ENDIF.
    ELSE.
    LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR
    AND ATNAM = IT_DETAILS2-ATNAM.
    TMP_STR = 'X'.
    WRK_AUSP1 = IT_DETAILS-AUSP1.
    EXIT.
    ENDLOOP.
    IF TMP_STR EQ 'X'.
    WRITE : (9)WRK_AUSP1 NO-GAP, SY-VLINE NO-GAP.
    ELSE.
    WRITE : ' ', SY-VLINE NO-GAP.
    ENDIF.
    ENDIF.
    ENDLOOP.
    WRITE : (8) IT_HEADER-SCMNG NO-GAP, SY-VLINE NO-GAP.
    IF SY-LINNO > 25.
    IF SY-BATCH EQ 'X'.
    NEW-PAGE.
    PERFORM PRINT_TOP.
    ENDIF.
    ENDIF.
    Code end by Thanikai on 16.08.2002
    ENDLOOP.
    ENDIF.
    ULINE.
    ENDFORM. " PRINT_DETAILS
    *& Form PRINT_REPORT_DESCENDING
    text
    --> p1 text
    <-- p2 text
    FORM PRINT_REPORT_DESCENDING.
    IF WRK_TABNAME = 'IT_HEADER'.
    SORT IT_HEADER BY (WRK_FLDNAME) DESCENDING.
    PERFORM PRINT_TOP.
    PERFORM PRINT_DETAILS.
    ENDIF.
    ENDFORM. " PRINT_REPORT_DESCENDING
    *& Form PRINT_TOP
    text
    --> p1 text
    <-- p2 text
    IT_DETAILS2-ATNAM width chged below from 7 to 9. Nagaraj/MKRK 24.11.05
    FORM PRINT_TOP.
    FORMAT COLOR COL_HEADING INTENSIFIED OFF.
    ULINE.
    IF REQ = 'X'.
    READ TABLE IT_HEADER INDEX 1.
    WRITE :/ SY-VLINE NO-GAP,(17) 'Material No' ,SY-VLINE NO-GAP.
    SET LEFT SCROLL-BOUNDARY.
    WRITE :(39) ' Material Description', SY-VLINE NO-GAP,
    (17) ' Old Matl. Number', SY-VLINE NO-GAP. "Thanikai-17.05.2002
    Comments made by Thanikai on 16.08.2002
    LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR.
    LOOP AT IT_DETAILS2.
    WRITE : (9) IT_DETAILS1-ATNAM NO-GAP,SY-VLINE NO-GAP.
    WRITE : (9) IT_DETAILS2-ATNAM NO-GAP,SY-VLINE NO-GAP.
    ENDLOOP.
    WRITE : (8) 'Pkg.Unit' NO-GAP, SY-VLINE NO-GAP.
    ELSEIF NREQ = 'X'.
    READ TABLE IT_HEADER INDEX 1.
    WRITE :/ SY-VLINE NO-GAP, (17) 'Material No' ,SY-VLINE NO-GAP,
    (17) ' Old Matl. Number', SY-VLINE NO-GAP. "Thanikai-17.05.2002
    Comments made by Thanikai on 16.08.2002
    LOOP AT IT_DETAILS WHERE MATNR = IT_HEADER-MATNR.
    LOOP AT IT_DETAILS2.
    WRITE : (9) IT_DETAILS-ATNAM NO-GAP,SY-VLINE NO-GAP.
    WRITE : (9) IT_DETAILS2-ATNAM NO-GAP,SY-VLINE NO-GAP.
    ENDLOOP.
    WRITE : (8) 'Pkg.Unit' NO-GAP, SY-VLINE NO-GAP.
    ENDIF.
    ULINE.
    FORMAT RESET.
    ENDFORM. " PRINT_TOP
    *& Form PKG_DLVY_UNIT
    text
    --> p1 text
    <-- p2 text
    FORM PKG_DLVY_UNIT.
    SELECT SINGLE KONP~KBETR INTO WRK_KBETR
    FROM ( A916 INNER JOIN KONP
    ON KONP~MANDT = SY-MANDT
    AND KONPKNUMH = A916KNUMH
    AND KONP~KOPOS = '01' ) CLIENT SPECIFIED
    WHERE A916~MANDT = SY-MANDT
    AND A916~KAPPL = 'V'
    AND A916~KSCHL = 'PR00'
    AND A916~VKORG = 'WTCH'
    AND A916~VTWEG = '01'
    AND A916~SPART = '01'
    AND A916~MATNR = IT_MATNR-MATNR
    AND A916~DATBI >= SY-DATUM
    AND A916~DATAB <= SY-DATUM.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE * FROM ZSAI_PARAM CLIENT SPECIFIED
    WHERE MANDT = SY-MANDT
    AND PMFID = 'ZPKG_PRICE'
    AND PMVL1 = '01'.
    IF SY-SUBRC EQ 0.
    IF WRK_KBETR BETWEEN 1 AND ZSAI_PARAM-PMVL2.
    SELECT SINGLE * FROM MVKE CLIENT SPECIFIED
    WHERE MANDT = SY-MANDT
    AND MATNR = IT_MATNR-MATNR
    AND VKORG = 'WTCH'
    AND VTWEG = '01'.
    IF SY-SUBRC EQ 0.
    IF MVKE-SCMNG GE 1.
    IT_HEADER-SCMNG = MVKE-SCMNG.
    ELSE.
    In the absence of delivery unit for a material,
    delivery unit is considered as one.
    IT_HEADER-SCMNG = 1.
    ENDIF.
    ELSE.
    IT_HEADER-SCMNG = 1.
    ENDIF.
    ELSE.
    If the price for a material is either below 1 or above 2499, then
    the delivery unit is considered as one.
    IT_HEADER-SCMNG = 1.
    ENDIF.
    ELSE.
    IT_HEADER-SCMNG = 1.
    ENDIF.
    ELSE.
    In the absence of price for a material, delivery unit is
    considered as one.
    IT_HEADER-SCMNG = 1.
    ENDIF.
    CLEAR: WRK_KBETR.
    ENDFORM. " PKG_DLVY_UNIT

    The first point would be to change the following:
    LOOP AT IT_MARA.
    SELECT SINGLE * FROM MAKT CLIENT SPECIFIED
    WHERE MANDT = SY-MANDT
    AND MATNR = IT_MARA-MATNR
    AND SPRAS = 'E'.
    IF SY-SUBRC = 0.
    IT_MATNR-MATNR = IT_MARA-MATNR.
    IT_MATNR-MAKTX = MAKT-MAKTX.
    IT_MATNR-BISMT = IT_MARA-BISMT. "Thanikai-17.05.2002
    ENDIF.
    APPEND IT_MATNR.
    CLEAR IT_MATNR.
    ENDLOOP.
    I would sort IT_MARA by matnr then select for all entries into new table IT_matnr and only read when you are actuallygoing to use it for your final table.
    This however will not make much difference to your problem. I suggest you put more of the code into subroutines and look at the se30 output as tyo which subroutines are actually taking most of the time. Please post the results and the subroutines which take the longest.

  • Socket based application - Performance Issues - Suggestions Needed

    Hi All,
    We have an application which basically has been developed using core java. Here is a high level information about the application:
    a) It opens a serversocket which allows clients to connect to it.
    b) For every new client connection, a separate thread is created and this thread deals with requests from clients, processing the data and replying back to clients.
    c) Each socket is polled continuously and sockettimeout is 2 seconds. If there is a timeout, we handle the situation and socket is again read. So basically sockets is read every 2 seconds. If number of timeouts reaches a configurable value, we close the connection and thread is dropped as well.
    d) In production, three instances of this application are running with the help of a cisco load balancer. It is there for last 5 years.
    However there has always been some minor performance isssues and we have sorted them out using different types of garbage collectors, by introducing hardware load balancers, upgrading the code for new Java versions. It is currently running on 1.4.2.
    However there has always been some performance issues and today while googling over internet I came across following on the bea website which says that core java sockets are not as efficients as native API. BEA has implemented its own APIs for weblogic. My queries are:
    a) Are there any better Java Socket/network API (for solairs, I know Java is plateform independenet but there could be lib which also using native libs) which are much more efficient than Core Java.
    b) We are getting the InputStream/OutputStream and creating objects of DataInputStream/DataOutputStream to read the data 'Byte-By-Byte'. Each byte can have different information thats why it is required. Are there any better way of getting info than what we are currently doing.
    c) As I mentioned, we are continously polling the socket for read operation with a timeout value of 2 seconds. What is the better among the following from performance point of view: (1) Frequent read operation with a lesser timeout value or (2) Less Frequent read operations with larger timeout value. (3) Any better idea??
    Please suggest few things or pointers which I could do to improve the performance of the applcations. Many thanks.
    Thanks,Akhil
    From BEA website:-
    "Although the pure-Java implementation of socket reader threads is a reliable and portable method of peer-to-peer communication, it does not provide the best performance for heavy-duty socket usage in a WebLogic Server cluster. With pure-Java socket readers, threads must actively poll all opened sockets to determine if they contain data to read. In other words, socket reader threads are always "busy" polling sockets, even if the sockets have no data to read. This unnecessary overhead can reduce performance."

    My recommendations:
    - Always use a BufferedInputStream and BufferedOutputStream around the socket streams
    - Increase the socket send and receive buffers to at least 32k if you are on a Windows platform where the default is a ridiculous 8k, which hasn't been enough for about 15 years.
    - Your 2-second timeout is far too short. Increase it to at least 10 seconds.
    - Your strategy of counting up to N short timeouts of S seconds each is completely pointless. Change it to one single timeout of N*S seconds. There is nothing to be gained by the complication you have introduced to this.

  • Query performance tuning need your suggestions

    Hi,
    Below is the sql query and explain plan which is taking 2 hours to execute and sometime it is breaking up( erroring out) due to memory issue.
    Below it the query which i need to improve the performance of the code please need your suggestion in order to tweak so that time take for execution become less and also in less memory consumption
    select a11.DATE_ID DATE_ID,
    sum(a11.C_MEASURE) WJXBFS1,
    count(a11.PKEY_GUID) WJXBFS2,
    count(Case when a11.C_MEASURE <= 10 then a11.PKEY_GUID END) WJXBFS3,
    count(Case when a11.STATUS = 'Y' and a11.C_MEASURE > 10 then a11.PKEY_GUID END) WJXBFS4,
    count(Case when a11.STATUS = 'N' then a11.PKEY_GUID END) WJXBFS5,
    sum(((a11.C_MEASURE ))) WJXBFS6,
    a17.DESC_DATE_MM_DD_YYYY DESC_DATE_MM_DD_YYYY,
    a11.DNS DNS,
    a12.VVALUE VVALUE,
    a12.VNAME VNAME,
    a13.VVALUE VVALUE0,
    a13.VNAME VNAME0,
    9 a14.VVALUE VVALUE1,
    a14.VNAME VNAME1,
    a15.VVALUE VVALUE2,
    a15.VNAME VNAME2,
    a16.VVALUE VVALUE3,
    a16.VNAME VNAME3,
    a11.PKEY_GUID PKEY_GUID,
    a11.UPKEY_GUID UPKEY_GUID,
    a17.DAY_OF_WEEK DAY_OF_WEEK,
    a17.D_WEEK D_WEEK,
    a17.MNTH_ID DAY_OF_MONTH,
    a17.YEAR_ID YEAR_ID,
    a17.DESC_YEAR_FULL DESC_YEAR_FULL,
    a17.WEEK_ID WEEK_ID,
    a17.WEEK_OF_YEAR WEEK_OF_YEAR
    from ACTIVITY_F a11
    join (SELECT A.ORG as ORG,
    A.DATE_ID as DATE_ID,
    A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
    A.DATE_HOUR_ID as DATE_HOUR_ID,
    A.TASK as TASK,
    A.PKEY_GUID as PKEY_GUID,
    A.VNAME as VNAME,
    A.VVALUE as VVALUE
    FROM W_ORG_D A join W_PERSON_D B on
    (A.TASK = B.TASK AND A.ORG = B.ID
    AND A.VNAME = B.VNAME)
    WHERE B.VARIABLE_OBJ = 1 ) a12
    on (a11.PKEY_GUID = a12.PKEY_GUID and
    a11.DATE_ID = a12.DATE_ID and
    a11.ORG = a12.ORG)
    join (SELECT A.ORG as ORG,
    A.DATE_ID as DATE_ID,
    A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
    A.DATE_HOUR_ID as DATE_HOUR_ID,
    A.TASK as TASK,
    A.PKEY_GUID as PKEY_GUID,
    A.VNAME as VNAME,
    A.VVALUE as VVALUE
    FROM W_ORG_D A join W_PERSON_D B on
    (A.TASK = B.TASK AND A.ORG = B.ID
    AND A.VNAME = B.VNAME)
    WHERE B.VARIABLE_OBJ = 2) a13
    on (a11.PKEY_GUID = a13.PKEY_GUID and
    a11.DATE_ID = a13.DATE_ID and
    a11.ORG = a13.ORG)
    join (SELECT A.ORG as ORG,
    A.DATE_ID as DATE_ID,
    A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
    A.DATE_HOUR_ID as DATE_HOUR_ID,
    A.TASK as TASK,
    A.PKEY_GUID as PKEY_GUID,
    A.VNAME as VNAME,
    A.VVALUE as VVALUE
    FROM W_ORG_D A join W_PERSON_D B on
    (A.TASK = B.TASK AND A.ORG = B.ID
    AND A.VNAME = B.VNAME)
    WHERE B.VARIABLE_OBJ = 3 ) a14
    on (a11.PKEY_GUID = a14.PKEY_GUID and
    a11.DATE_ID = a14.DATE_ID and
    a11.ORG = a14.ORG)
    join (SELECT A.ORG as ORG,
    A.DATE_ID as DATE_ID,
    A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
    A.DATE_HOUR_ID as DATE_HOUR_ID,
    A.TASK as TASK,
    A.PKEY_GUID as PKEY_GUID,
    A.VNAME as VNAME,
    A.VVALUE as VVALUE
    FROM W_ORG_D A join W_PERSON_D B on
    (A.TASK = B.TASK AND A.ORG = B.ID
    AND A.VNAME = B.VNAME)
    WHERE B.VARIABLE_OBJ = 4) a15
    on (a11.PKEY_GUID = a15.PKEY_GUID and
    89 a11.DATE_ID = a15.DATE_ID and
    a11.ORG = a15.ORG)
    join (SELECT A.ORG as ORG,
    A.DATE_ID as DATE_ID,
    A.TIME_OF_DAY_ID as TIME_OF_DAY_ID,
    A.DATE_HOUR_ID as DATE_HOUR_ID,
    A.TASK as TASK,
    A.PKEY_GUID as PKEY_GUID,
    A.VNAME as VNAME,
    A.VVALUE as VVALUE
    FROM W_ORG_D A join W_PERSON_D B on
    (A.TASK = B.TASK AND A.ORG = B.ID
    AND A.VNAME = B.VNAME)
    WHERE B.VARIABLE_OBJ = 9) a16
    on (a11.PKEY_GUID = a16.PKEY_GUID and
    a11.DATE_ID = a16.DATE_ID and
    A11.ORG = A16.ORG)
    join W_DATE_D a17
    ON (A11.DATE_ID = A17.ID)
    join W_SALES_D a18
    on (a11.TASK = a18.ID)
    where (a17.TIMSTAMP between To_Date('2001-02-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS') and To_Date('2002-09-12 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
    and a11.ORG in (12)
    and a18.SRC_TASK = 'AX012Z')
    group by a11.DATE_ID,
    a17.DESC_DATE_MM_DD_YYYY,
    a11.DNS,
    a12.VVALUE,
    a12.VNAME,
    a13.VVALUE,
    a13.VNAME,
    a14.VVALUE,
    a14.VNAME,
    a15.VVALUE,
    a15.VNAME,
    a16.VVALUE,
    a16.VNAME,
    a11.PKEY_GUID,
    a11.UPKEY_GUID,
    a17.DAY_OF_WEEK,
    a17.D_WEEK,
    a17.MNTH_ID,
    a17.YEAR_ID,
    a17.DESC_YEAR_FULL,
    a17.WEEK_ID,
    a17.WEEK_OF_YEAR;
    Explained.
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 1245 | 47 (9)| 00:00:01 |
    | 1 | HASH GROUP BY | | 1 | 1245 | 47 (9)| 00:00:01 |
    |* 2 | HASH JOIN | | 1 | 1245 | 46 (7)| 00:00:01 |
    |* 3 | HASH JOIN | | 1 | 1179 | 41 (5)| 00:00:01 |
    |* 4 | HASH JOIN | | 1 | 1113 | 37 (6)| 00:00:01 |
    |* 5 | HASH JOIN | | 1 | 1047 | 32 (4)| 00:00:01 |
    |* 6 | HASH JOIN | | 1 | 981 | 28 (4)| 00:00:01 |
    | 7 | NESTED LOOPS | | 1 | 915 | 23 (0)| 00:00:01 |
    | 8 | NESTED LOOPS | | 1 | 763 | 20 (0)| 00:00:01 |
    | 9 | NESTED LOOPS | | 1 | 611 | 17 (0)| 00:00:01 |
    | 10 | NESTED LOOPS | | 1 | 459 | 14 (0)| 00:00:01 |
    | 11 | NESTED LOOPS | | 1 | 307 | 11 (0)| 00:00:01 |
    | 12 | NESTED LOOPS | | 1 | 155 | 7 (0)| 00:00:01 |
    | 13 | NESTED LOOPS | | 1 | 72 | 3 (0)| 00:00:01 |
    | 14 | TABLE ACCESS BY INDEX ROWID| W_SALES_D | 1 | 13 | 2 (0)| 00:00:01 |
    |* 15 | INDEX UNIQUE SCAN | CONS_UNQ_W_SALES_D_SRC_ID | 1 | | 1 (0)| 00:00:01 |
    | 16 | TABLE ACCESS BY INDEX ROWID| W_DATE_D | 1 | 59 | 1 (0)| 00:00:01 |
    |* 17 | INDEX UNIQUE SCAN | UIDX_DD_TIMSTAMP | 1 | | 0 (0)| 00:00:01 |
    | 18 | TABLE ACCESS BY INDEX ROWID | ACTIVITY_F | 1 | 83 | 4 (0)| 00:00:01 |
    |* 19 | INDEX RANGE SCAN | PK_ACTIVITY_F | 1 | | 3 (0)| 00:00:01 |
    |* 20 | TABLE ACCESS BY INDEX ROWID | W_ORG_D      | 1 | 152 | 4 (0)| 00:00:01 |
    |* 21 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
    |* 22 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
    |* 23 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
    |* 24 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
    |* 25 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
    |* 26 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
    |* 27 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
    |* 28 | TABLE ACCESS BY INDEX ROWID | W_ORG_D | 1 | 152 | 3 (0)| 00:00:01 |
    |* 29 | INDEX RANGE SCAN | IDX_FK_CVSF_PKEY_GUID | 10 | | 3 (0)| 00:00:01 |
    |* 30 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
    |* 31 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
    |* 32 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
    |* 33 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
    |* 34 | TABLE ACCESS FULL | W_PERSON_D | 1 | 66 | 4 (0)| 00:00:01 |
    -----------------------------------------------------------------------------------------------------------------------

    Hi,
    I'm not a tuning expert but I can suggest you to post your request according to this template:
    Thread: HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting
    Then:
    a) you should posting a code which is easy to read. What about formatting? Your code had to be fixed in a couple of lines.
    b) You could simplify your code using the with statement. This has nothing to do with the tuning but it will help the readability of the query.
    Check it below:
    WITH tab1 AS (SELECT a.org AS org
                       , a.date_id AS date_id
                       , a.time_of_day_id AS time_of_day_id
                       , a.date_hour_id AS date_hour_id
                       , a.task AS task
                       , a.pkey_guid AS pkey_guid
                       , a.vname AS vname
                       , a.vvalue AS vvalue
                       , b.variable_obj
                    FROM    w_org_d a
                         JOIN
                            w_person_d b
                         ON (    a.task = b.task
                             AND a.org = b.id
                             AND a.vname = b.vname))
      SELECT a11.date_id date_id
           , SUM (a11.c_measure) wjxbfs1
           , COUNT (a11.pkey_guid) wjxbfs2
           , COUNT (CASE WHEN a11.c_measure <= 10 THEN a11.pkey_guid END) wjxbfs3
           , COUNT (CASE WHEN a11.status = 'Y' AND a11.c_measure > 10 THEN a11.pkey_guid END) wjxbfs4
           , COUNT (CASE WHEN a11.status = 'N' THEN a11.pkey_guid END) wjxbfs5
           , SUM ( ( (a11.c_measure))) wjxbfs6
           , a17.desc_date_mm_dd_yyyy desc_date_mm_dd_yyyy
           , a11.dns dns
           , a12.vvalue vvalue
           , a12.vname vname
           , a13.vvalue vvalue0
           , a13.vname vname0
           , a14.vvalue vvalue1
           , a14.vname vname1
           , a15.vvalue vvalue2
           , a15.vname vname2
           , a16.vvalue vvalue3
           , a16.vname vname3
           , a11.pkey_guid pkey_guid
           , a11.upkey_guid upkey_guid
           , a17.day_of_week day_of_week
           , a17.d_week d_week
           , a17.mnth_id day_of_month
           , a17.year_id year_id
           , a17.desc_year_full desc_year_full
           , a17.week_id week_id
           , a17.week_of_year week_of_year
        FROM activity_f a11
             JOIN tab1 a12
                ON (    a11.pkey_guid = a12.pkey_guid
                    AND a11.date_id = a12.date_id
                    AND a11.org = a12.org
                    AND a12.variable_obj = 1)
             JOIN tab1 a13
                ON (    a11.pkey_guid = a13.pkey_guid
                    AND a11.date_id = a13.date_id
                    AND a11.org = a13.org
                    AND a13.variable_obj = 2)
             JOIN tab1 a14
                ON (    a11.pkey_guid = a14.pkey_guid
                    AND a11.date_id = a14.date_id
                    AND a11.org = a14.org
                    AND a14.variable_obj = 3)
             JOIN tab1 a15
                ON (    a11.pkey_guid = a15.pkey_guid
                    AND a11.date_id = a15.date_id
                    AND a11.org = a15.org
                    AND a15.variable_obj = 4)
             JOIN tab1 a16
                ON (    a11.pkey_guid = a16.pkey_guid
                    AND a11.date_id = a16.date_id
                    AND a11.org = a16.org
                    AND a16.variable_obj = 9)
             JOIN w_date_d a17
                ON (a11.date_id = a17.id)
             JOIN w_sales_d a18
                ON (a11.task = a18.id)
       WHERE (a17.timstamp BETWEEN TO_DATE ('2001-02-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
                               AND TO_DATE ('2002-09-12 00:00:00', 'YYYY-MM-DD HH24:MI:SS')
              AND a11.org IN (12)
              AND a18.src_task = 'AX012Z')
    GROUP BY a11.date_id, a17.desc_date_mm_dd_yyyy, a11.dns, a12.vvalue
           , a12.vname, a13.vvalue, a13.vname, a14.vvalue
           , a14.vname, a15.vvalue, a15.vname, a16.vvalue
           , a16.vname, a11.pkey_guid, a11.upkey_guid, a17.day_of_week
           , a17.d_week, a17.mnth_id, a17.year_id, a17.desc_year_full
           , a17.week_id, a17.week_of_year;
    {code}
    I hope I did not miss anything while reformatting the code. I could not test it not having the proper tables.
    As I said before I'm not a tuning expert nor I pretend to be but I see this:
    1) Table W_PERSON_D is read in full scan. Any possibility of using indexes?
    2) Tables W_SALES_D, W_DATE_D,  ACTIVITY_F and W_ORG_D have TABLE ACCESS BY INDEX ROWID which definitely is not fast.
    You should provide additional information for tuning your query checking the post I mentioned previously.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • HT201184 who help me, for iphone problem, kindly give me the contact no.  I am totally confuse the your system

    who help me, for iphone problem, kindly give me the contact no.  I am totally confuse the your system.
    <Personal Information Edited by Host>

    Hey sherstha,
    Thanks for the question. The following article outlines the various contact information for Apple, based on your country:
    Contacting Apple for support and service
    http://support.apple.com/kb/HE57
    Thanks,
    Matt M.

Maybe you are looking for