Can anyone plz tell me the steps for performance tuning.

hello friends
what is performance tuning?
can anyone plz tell me the steps for performance tuning.

Hi Kishore, this will help u.
Following are the different tools provided by SAP for performance analysis of an ABAP object
Run time analysis transaction SE30
This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
SQL Trace transaction ST05
The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
Need for performance tuning
In this world of SAP programming, ABAP is the universal language. In most of the projects, the focus is on getting a team of ABAP programmers as soon as possible, handing over the technical specifications to them and asking them to churn out the ABAP programs within the “given deadlines”.
Often due to this pressure of schedules and deliveries, the main focus of making a efficient program takes a back seat. An efficient ABAP program is one which delivers the required output to the user in a finite time as per the complexity of the program, rather than hearing the comment “I put the program to run, have my lunch and come back to check the results”.
Leaving aside the hyperbole, a performance optimized ABAP program saves the time of the end user, thus increasing the productivity of the user, and in turn keeping the user and the management happy.
This tutorial focuses on presenting various performance tuning tips and tricks to make the ABAP programs efficient in doing their work. This tutorial also assumes that the reader is well versed in all the concepts and syntax of ABAP programming.
Use of selection criteria
Instead of selecting all the data and doing the processing during the selection, it is advisable to restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code.
Not recommended
Select * from zflight.
Check : zflight-airln = ‘LF’ and zflight-fligh = ‘BW222’.
Endselect.
Recommended
Select * from zflight where airln = ‘LF’ and fligh = ‘222’.
Endselect.
One more point to be noted here is of the select *. Often this is a lazy coding practice. When a programmer gives select * even if one or two fields are to be selected, this can significantly slow the program and put unnecessary load on the entire system. When the application server sends this request to the database server, and the database server has to pass on the entire structure for each row back to the application server. This consumes both CPU and networking resources, especially for large structures.
Thus it is advisable to select only those fields that are needed, so that the database server passes only a small amount of data back.
Also it is advisable to avoid selecting the data fields into local variables as this also puts unnecessary load on the server. Instead attempt must be made to select the fields into an internal table.
Use of aggregate functions
Use the already provided aggregate functions, instead of finding out the minimum/maximum values using ABAP code.
Not recommended
Maxnu = 0.
Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
Check zflight-fligh > maxnu.
Maxnu = zflight-fligh.
Endselect.
Recommended
Select max( fligh ) from zflight into maxnu where airln = ‘LF’ and cntry = ‘IN’.
The other aggregate functions that can be used are min (to find the minimum value), avg (to find the average of a Data interval), sum (to add up a data interval) and count (counting the lines in a data selection).
Use of Views instead of base tables
Many times ABAP programmers deal with base tables and nested selects. Instead it is always advisable to see whether there is any view provided by SAP on those base tables, so that the data can be filtered out directly, rather than specially coding for it.
Not recommended
Select * from zcntry where cntry like ‘IN%’.
Select single * from zflight where cntry = zcntry-cntry and airln = ‘LF’.
Endselect.
Recommended
Select * from zcnfl where cntry like ‘IN%’ and airln = ‘LF’.
Endselect.
Check this links
http://www.sapdevelopment.co.uk/perform/performhome.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/afbad390-0201-0010-daa4-9ef0168d41b6
kindly reward if found helpful.
cheers,
Hema.

Similar Messages

  • Can anyone let me know the step by step procedure for creating userexits?

    Hi all,
    can anyone let me know the step by step procedure for creating user exits? for any transaction code like mm01 or vd01. If you have any docs send it across to my email id : [email protected]
    thanxs in advance
    hari

    Hi,
    *& Report  ZEXITFINDER
    *report  zexitfinder.
    *& Enter the transaction code that you want to search through in order
    *& to find which Standard SAP User Exits exists.
    *& Tables
    tables : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    *& Variables
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    *& Selection Screen Parameters
    selection-screen begin of block a01 with frame title text-001.
    selection-screen skip.
    parameters : p_tcode like tstc-tcode obligatory.
    selection-screen skip.
    selection-screen end of block a01.
    *& Start of main program
    start-of-selection.
    Validate Transaction Code
    select single * from tstc
    where tcode eq p_tcode.
    Find Repository Objects for transaction code
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    select single * from enlfdir
    where funcname = tfdir-funcname.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name = enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    Find SAP Modifactions
    select * from tadir
    into table jtab
    where pgmid = 'R3TR'
    and object = 'SMOD'
    and devclass = v_devclass.
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    Take the user to SMOD for the Exit that was selected.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    look in txn CMOD or SMOD, check enhancement 0VRF0001. It uses function module EXIT_SAPL0VRF_001. It is used to manipulate route determination for SD.
    Here is the code
        DATA: ls_xvbpa LIKE xvbpa,
              lf_aland LIKE tvst-aland,
              lf_azone LIKE tvst-azone,
              lf_lland LIKE trolz-lland,
              lf_lzone LIKE trolz-lzone,
              ls_vbadr LIKE vbadr,
              ls_xvbap LIKE xvbap,
              ls_tvst LIKE tvst,
              lv_route LIKE trolz-route.
        LOOP AT xvbap INTO ls_xvbap.
          IF NOT ls_xvbap-vstel IS INITIAL.
            SELECT SINGLE * FROM tvst
              INTO ls_tvst
             WHERE vstel EQ ls_xvbap-vstel.
            IF sy-subrc = 0.
              lf_aland = ls_tvst-aland.
              lf_azone = ls_tvst-azone.
            ENDIF.
          ENDIF.
          READ TABLE xvbpa INTO ls_xvbpa WITH KEY vbeln = ls_xvbap-vbeln
                                                  posnr = ls_xvbap-posnr
                                                  parvw = 'Q1'.
          IF sy-subrc = 0.
            CALL FUNCTION 'SD_ADDRESS_GET'
              EXPORTING
                fif_address_number      = ls_xvbpa-adrnr
              IMPORTING
                fes_address             = ls_vbadr
              EXCEPTIONS
                address_not_found       = 1
                address_type_not_exists = 2
                no_person_number        = 3
                OTHERS                  = 4.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ELSE.
              lf_lland = ls_vbadr-land1.
              lf_lzone = ls_vbadr-lzone.
            ENDIF.
          ENDIF.
          CALL FUNCTION 'SD_ROUTE_DETERMINATION'
            EXPORTING
              i_aland             = lf_aland
              i_azone             = lf_azone
              i_lland             = lf_lland
              i_lzone             = lf_lzone
            IMPORTING
              e_route             = lv_route
            EXCEPTIONS
              no_route_found      = 1
              departure_error     = 2
              destination_error   = 3
              invalid_generic_key = 4
              customer_exit_error = 5
              OTHERS              = 6.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            ls_xvbap-route = lv_route.
            MODIFY xvbap FROM ls_xvbap TRANSPORTING route.
          ENDIF.
        ENDLOOP.
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    User-Exits
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://sap.ittoolbox.com/documents/popular-q-and-a/user-exits-for-the-transaction-code-migo-3283
    <b>Reward points</b>
    Regards

  • I Want to Buy MacBook Pro 15" In Installments Can Anyone Here Tell me The Plans Of Installments

    I Want to Buy MacBook Pro 15" In Installments Can Anyone Here Tell me The Plans Of Installments... Please Give Me Proper Information With Interest..
    Thanks In Advance

    Hello,
    Apple offers a Barclay's VISA card that provides 6-12 months at 0% interest on your first purchase from Apple.  You can even sign up for the card & get approved at the same time that you place your order. 
    If your purchase is under $999 USD you get 6 months at 0% interest.  If more than $999 you get 12 months at 0% interest.  As long as you make the minimum payment on time every month you continue at 0% until the promotional period runs out.
    Note: if any payment is late or you don't pay off the balance within the promotional period, you get charged all the interest that accrued from day one; as of today that rate is over 22%, so it is important to make all your payments on time and pay off of the full balance before the end of the promotional period.
    Last year I applied for the card at the same time I ordered my iMac; got approved immediately; and then set up an automatic payment every month with Barclays so I wouldn't risk being late; and then I paid off the remaining balance 30 days before the end of the promotional period.  Everything went smoothly, Barclays' online system worked perfectly; they did not play any billing tricks nor did they ever spam me with junk promotions.  Recently they offered another 12 months at 0% financing, so it's not just a one time offer!
    Your profile doesn't say where you are located, so if you are outside the USA you will need to check the Apple website for your country to see if there is a similar financing offer in your location.

  • Plz tell me the steps to update the data?,.

    hai all,
                    Plz tell me the steps involved in updating the data from infocube to ods.it would be highly helpful if u provide any document?.
    thanx,
    sri

    Hi,
    ODS to Cube refer this thread...
    ODS to CUBE
    Cube to ODS refer this thread...
    Cube to ODS
    For the steps - DATA LOAD FROM ODS TO CUBE
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6110e07211d2acb80000e829fbfe/content.htm
    Re: Steps for transfering structure from ODS to Cube
    Hope it helps.
    Regards
    CSM Reddy

  • Can you Please Tell Me the Process for service/operation  provide by one plant to other plant.

    Can you Please Tell Me the Process for service/operation  provide by one plant to other plant.
    In My Company No Of Plants Like 1000,2000,3000,4000
    Plant 1000 Provide the service/operation  like (welding ,cutting, painting ) to other plants (eg 2000,3000,4000)
    We want to give the profit for plant 1000 and book the service or operation charge in plant 2000 or 3000.
    We don’t want  to use material code in this process.
    Can you help me it is possible or not through SAP PP.

    Krishnendu,
                   Actually in my company we have one plant 1000 that plant provide the service like (CUTTING (SHAFT),WELDING,MACHINING,PAINTING)
    actually plant already made one material xyz and supply 2000 plant .
    we  can use STO in this scenario and set special procurement key  80.
    But my requirement is after some time plant 1000 provide few operation in xyz material that material already supply to 2000 plant.
    in this case we dont  use to produce any material.

  • Can anyone plz tell how to bundle a color box?

    Hi all, 
    I am trying to pass the color of a color box control from one vi to another vi by bundling it into a cluster and passing the values. There are some other values also which are bundled along with the color. In the second vi when i tried to unbundle the cluster passed from the first vi and then wired the color passed, to a color box, it is getting connected and showing the correct color . But when i am trying to connect the whole bundle to a cluster, it is not gettting connected because of the color box in the cluster. 
    Can anyone please tell me how to solve this problem. I have herewith attached my 2 vi's which i am working with.
    Thankful regards,
    Nitz
    Solved!
    Go to Solution.
    Attachments:
    vi1.vi ‏27 KB
    vi2.vi ‏11 KB

    Hi Nitzy,
    gaa, I'm color blind now
    Well, in your vi2.vi you call a subVI (inputmodule2), which you didn't attach... There's no direct connection between vi1 and vi2...
    -You also have a big race condition in your vi1 because of all those colorbox locals - when more than one condition is true you can't predict which color is used...
    - Why don't you use UnbundleByName?
    - VI2 shows no wiring error...
    - Why don't you use a cluster in VI for all your inputs? You can hide the border and place the cluster elements in the same way. No need for several locals for initialisation and no need for a bundle node...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Plz tell me the FM for UNIX file

    HI
        plz tell me the FM that convert the uploading program which is going to save in unix file.
    Thanks

    Hi SKK,
    Check out the link:
    Re: download file to webserver
    Hope this helps.
    Manish

  • I can't get my pictures into the public folder on the iPad 3.  Can anyone walk me through the steps?

    I can't get my pictures into the public folder on the iPad 3.  Can someone walk me through the steps?

    Ok, I'll give it a try.
    Presuming you already have a Dropbox account, and you have the app on your pad.
    Open the app, navigate to public folder.  Touch the upload icon at the bottom.  It will show you everything you have already uploaded.  To upload a new picture, then touch the plus sign at the top right.     You can create one or more subfolders to organize it however you want.
    Hit the plus sign again if needed, and the photo listing will show up.  Find the photos you want and mark them by touching them.  Then touch the blue word upload in the upper right.
    ( the directions assume the pad is in the landscape mode.)
    That's really all there is to it.  As I typed this I opened and uploaded a couple of pics to get the steps right.

  • Step for performance tuning in oracle 10g

    hi,
    i want to know the step of persformance tuning and sql tuning.

    I'd suggest you to refer to documentation: [Oracle Database 2 Day + Performance Tuning Guide 10g Release 2 (10.2)|http://download.oracle.com/docs/cd/B19306_01/server.102/b28051/toc.htm]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Can ANYONE please give me the source for converting IPV4 packets to IPV6

    I had a file which contains IPV4 packets, I need to convert these packets into IPV6 . Can anyone please give the source..

    java.venkat wrote:
    one of my friend downloaded that file
    my project is to evaluate intrusion detection systems with ipv6 dataGo back to the person who gave you this project and ask for help because you've got alot of problems going on here. Mainly there are two problems.
    1) Whatever it might be that you want to do doesn't seem like a very good fit for Java at all.
    2) You are just continually spouting rubbish that either are obvious statements of fact or make no sense, as in this last post here.
    If you refuse to talk to the person who gave you this project for some much needed direction (which would be foolish by the way) then you really must tell us what your end goal here is. Like specifically what you are looking to do, how you plan on capturing this information in general and why you think this is going to help you resolve your problem. Because as stated your problem isn't making much sense and even if it did I for one don't see how this puts you further along in evaluating "intrustion detection systems".

  • Can any body tell me the transaction for budget check in SRM ?

    HI,
    Experts,
    As i want to check the budget of a business partner / customer i am new to that can u please tell me basic information about budget check and pass the Standard transaction for budget check.
    Thanks in advance,
    Shabeer Ahmed

    Hi    Dinesh,
    Thanks for your reply and can u send me the Budget check standard transaction and related tables and how he going to check his budget.
    According to me:
    1    In which table Amount is maintained for BP
    2   How we have check the budget.
    Do u have any document related to this please forward it to me.

  • Can anyone please give me the logic for this....

    I have a database table and in it i have a field department code. now, that department code might have '00' or '   ' (blank) or anyother value. now i want to add up all the currency amounts with department code '00'  and '  ' (blank) which have same company code and currency type. I called all the entries with '00' into one internal table and enrties with '  ' (blank) to other internal table.
    can anyone give me the logic for adding all the entries at a time.
    thanks in advance.....

    HI Srinivas
    i have a solution for this question.
    Use At control break statement for this.
    Loop the internal table.
    Use at Event AT LAST. In that use SUM Statement. U will get sum of all the numeric fields.
    Or else u can use ON CHANGE OF Currency type
    then find the total amount by adding previouse value with ur current value.
    Like itab1-amount = total + itab1-amount.
    Appent this into ur internal or write it into ur report.
    Reward me if its useful.
    Regards
    Ravi

  • Can anyone send/post me the code for RTP server which reads soundcard

    hi all,
    can anyone send me the code for RTP server which reads soundcard and RTP client to tranmit the sound.

    How much are you going to pay?

  • Hi,can u plz tell me the price of macbook in oman?

    Hi,plz can u tell me the prices of all apple products in omani rial,plz

    Call and ask:
    http://www.abmme.com/

  • Can anyone direct me to the documentation for javax.microedition.pim

    I am trying to find the documentation for the above class. can anyone help please?

    Check this link
    http://www.forum.nokia.com/ME_Developers_Library/GUID-654A42A3-C453-411A-A153-366C08AEF058/javax/microedition/pim/package-summary.html

Maybe you are looking for