abap runtime analysis (se30) - how to analyze a

Upload: raky0369

Post on 02-Jun-2018

270 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    1/15

    Getting Started Newsletters Store

    Products Services & Support About SCN Downloads

    Industries Training & Education Partnership Developer Center

    Lines of Business University Alliances Events & Webinars Innovation

    Log On Join UsHi, Guest Search the Community

    Activity Communications Actions

    Brow se

    ABAP Testing and Troubleshooting

    0 Tweet 1

    The ABAP Runtime Analysis (transaction SE30) is the best starting point if you want to execute performance or

    flow analysis of your ABAP program. Unfortunately many people use ABAP Runtime Analysis only to look for

    performance bottlenecks and don't know that ABAP Trace is the only tool with which you can trace the execution

    flow of an ABAP program at the statement level. This blog will show you how to use ABAP Trace of ABAP Runtime

    Analysis (SE30) to follow the flow logic of your ABAP program.

    1. Why analyze the flow of an ABAP program?The ABAP Runtime Analysis (transaction SE30) gives you one tool for solving two problems. You can measure

    performance and find bottlenecks . You can also analyze the program flow of your ABAP program . In this blog we wi ll

    focus on program flow analysis.

    Why do you need to analyze the flow of ABAP program? Le t me give you jus t a couple examples .First, you m ay need to

    find the exact source code location of a particular ABAP statement (a method call, function call...) you are interested in.

    Youwould then run the ABAP Trace and afterwards search the required line in the result lis t of the ABAP statements.

    Second, you may want to compare the flow of your ABAP program indifferent systems. Imagine, for example, that your

    ABAP program runs as expected in the test system but shows a com pletely differently behavior in the production

    system, or even worse, aborts with a short dump in the production system. Youcouldthen s imply run the ABAP Trace

    in both test and production systems and compare the trace results.

    2. How to find exact source code line of an ABAP statement?

    Just imag ine, you go to the ABAP Editor (trans action SE38), type "XXX" into the "Program" field, press the "Display"

    button and get the error message on the status bar "Program XXX does not exist". How could you find out the exact

    source code li ne of the ABAP s tatement that produced the mes sage?

    You could of course start the ABAP Debugger and try to debug in single step. And then after hours or weeks of

    intensive debugging you might be lucky enough to find the source code line of the ABAP statement. But why waste

    time? Here is how to use the ABAP Runtime Analysis to find this error message in a couple of minutes.

    If you press "?" button or click on the status bar near the error m essage, you will s ee the F1 help on the mess age, in

    the performance ass istant. This tells informs you that the number of the error mess age is DS017. Therefore you

    have to look for the "mess age DS017":

    ABAP Runtime Analysis (SE30) - How to analyzeABAP program flow

    Posted by Olga DolinskajainABAP Testing and Troubleshootingon Dec 11, 2009 5:45:48 PM

    Share 1Like

    http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62587/se30_msg.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62587/se30_msg.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62587/se30_msg.jpghttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2009/12/11/abap-runtime-analysis-se30--how-to-analyze-abap-program-flowhttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2009/12/11/abap-runtime-analysis-se30--how-to-analyze-abap-program-flowhttp://scn.sap.com/community/abap/testing-and-troubleshooting/bloghttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2009/10/30/st12--storing-additional-information-and-managing-traceshttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2010/03/04/explaining-the-explain-planhttp://scn.sap.com/contenthttp://scn.sap.com/community/developer-centerhttp://scn.sap.com/community/getting-startedhttp://scn.sap.com/community/getting-startedhttp://scn.sap.com/community/newslettershttp://www.sapstore.com/http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62587/se30_msg.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62587/se30_msg.jpghttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/community/abap/testing-and-troubleshooting/bloghttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2009/12/11/abap-runtime-analysis-se30--how-to-analyze-abap-program-flowhttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62587/se30_msg.jpghttp://twitter.com/search?q=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fabap%2Ftesting-and-troubleshooting%2Fblog%2F2009%2F12%2F11%2Fabap-runtime-analysis-se30--how-to-analyze-abap-program-flowhttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fabap%2Ftesting-and-troubleshooting%2Fblog%2F2009%2F12%2F11%2Fabap-runtime-analysis-se30--how-to-analyze-abap-program-flow&text=ABAP%20Runtime%20Analysis%20(SE30)%20-%20How%20to%20analyze%20ABAP%20program%20flow&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fabap%2Ftesting-and-troubleshooting%2Fblog%2F2009%2F12%2F11%2Fabap-runtime-analysis-se30--how-to-analyze-abap-program-flow&via=SAPCommNethttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2010/03/04/explaining-the-explain-planhttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2009/10/30/st12--storing-additional-information-and-managing-traceshttp://scn.sap.com/community/abap/testing-and-troubleshooting/bloghttp://scn.sap.com/contenthttp://scn.sap.com/actionshttp://scn.sap.com/communicationshttp://scn.sap.com/activityhttp://scn.sap.com/login.jspahttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/2009/12/11/login.jspahttp://scn.sap.com/community/uachttp://scn.sap.com/community/developer-centerhttp://scn.sap.com/community/downloadshttp://scn.sap.com/welcomehttp://www.sapstore.com/http://scn.sap.com/community/newslettershttp://scn.sap.com/community/getting-started
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    2/15

    To find the message, first start the ABAP Runtime Analysis and create a measurement variant.

    1. Start the ABAP Runtime Analysis (transaction SE30) via System -> Utilities -> Runtime Analysis -> Execute or

    call the transaction directly with "/nse30".

    2. Type "SE38"into "Transaction" field.

    3. Create a measurement variant for your user:

    Type a name into "Variant" field and press "Create" button

    Set aggregation to "None" on the "Duration/Type" tab

    For memory usage info check the "With memory use" flag

    Switch on "Particular units" on the "Program(Parts)" tab

    Save your variant

    Before we go on, some im portant notes.

    Don't use aggregation if you want to trace ABAP in order to follow the program logic(what we are doing

    here). Aggregation summarizes the trace data for a particular type of event in a single trace record and therefore

    reduces the number of entries i n the trace file. But to see the com plete program flow you need all trace data.

    Try to use "Particular units" where possible in order to reduce trace file sizeand trace only the code you

    really need to see. The option "Particular units" allows you to switch on/off the ABAP trace during the running

    transaction. The trace will be started as s oon as you enter "/ron" (trace on) in the OK field in your transaction.With "/roff " the trace is stopped. Alternatively you can also use the menu path: System -> Utilities -> Runtime

    Analysis -> Switch On / Switch Off.

    Let's execute the meas urement:

    1. Press "Execute" button. Transaction SE38 , the ABAP Editor, starts.

    2. Type "XXX" into the "Program " field and turn on the trace with System -> Utilities -> Runtime Analysis ->Switch

    On.

    3. Press the "Display" button and turn off the trace with System -> Utilities -> Runtime Analysis -> Switch Off.

    http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62589/se30_variant.JPGhttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62588/se30_help.jpg
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    3/15

    Step back to the Runtime Analysis and analyze the trace results:

    1. Press the "Evaluate" button.

    2. Press the "Call Hierarchy" button and you get a list which represents the complete path through your program.

    3. Search for "message DS017" in the Call Hierarchylist.4. Double -click on the entry in the Call Hierarchylis t to jump to the s ource code line, which initiated the error

    message.

    3. How to trace a long running batch job?

    Now im agine the following s ituation. You are the adm inistrator of a production system, and you encounter in the

    Process Overview (transaction sm 50) a batch process, which already has been running several days and has been

    selecting data from a database table. This process is blocking other background jobs and you have to find out what

    this process is actually doing:

    http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62591/se30_callhierarchy.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62590/se30_msgrun.jpg
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    4/15

    You can find this out very eas ily with the ABAP Runtim e Analysis. You can us e the ABAP Runtim e Analysis (SE30) to

    trace programs which are running in a parallel ses sion.

    1. Ensure that you run SE30 on the same server as the running process!

    2. You must create or adjust a trace variant for tracing the parallel proces s. Set aggregation to "None" again to get

    the Call Hierarchy.

    3. Press the "Switch On/Off" button to trace processes running in a parallel ses sion. The Runtime Analysis

    displays a list of the running processes sim ilar to the Process Overview(transaction sm 50).

    4. Use the "Start measurement/End m easurement" buttons to activate and deactivate trace.

    Caution:Deactivate the trace again after short tracing time so that you do not reach the trace file quota! Before

    deactivating the trace, refresh the work process display. The dialog step that was active in the work process with the

    activated trace may have changed, and that deactivates the trace automatically.

    5. Press "Evaluate" button to analyze trace results.

    http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62593/se30_trace_process.jpghttp://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62592/se30_process_overview.jpg
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    5/15

    4. How to trace HTTP/RFC requests or processes of other users?

    There are also often situations where you need to trace HTTP or RFC requests or processes of other users. Let me

    give you som e examples.

    Imagine there is an online flight booking s ystem. If a user wants to reserve a flight, his HTTP request arrives in your

    backend system. And you need to trace the reservation process which is running in your ABAP backend system. In

    such case you don't know which ABAP backend process handles which HTTP request and have no idea when the

    HTTP request will reach your ABAP backend system. Therefore it is difficult to capture such a request for debugging in

    the appropriate ABAP backend process.

    Another good examp le would be frequen t RFC requests wh ich reach your ABAP system and las t only several hundred

    milliseconds. It is quite hard to trace such short-lived requests. Maybe you also have to deal with a batch job that runs

    under another user, which always starts at a different time and aborts s poradically with a s hort dump. How can you

    trace something like this?

    The ABAP Runtime Analysis (SE30) provides an answer. It lets you schedule a trace for any user on the current

    server.

    1. Start ABAP Runtime Analysis (SE30).

    2. Create your trace variant and set aggregation to "None" again to get the Call Hierarchy.

    3. Press "For User/Service" button in the "Schedule" area of the initial screen.4. Press "Schedule measurement" button on the Overview of Scheduled Measurementsscreen.

    The transaction presents a popup on which you can schedule an as ynchronous trace according to these criteria:

    User

    Client

    External session(choose "Any" if you are not sure in which s ess ion the application will run!)

    Process Category(dialog, batch, RFC, HTTP, ITS, etc.)

    Object Type(transaction, report, function module, any, etc.)

    Object(e.g. only transaction se38)

    Max. No. of sched. Measurements(specify the m aximum number of traces)

    Expiration Date and Time(specify the time frame when the trace shall be active)

    http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62594/se30_loop.jpg
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    6/15

    Average User Rating

    (12 ratings)

    0 Tweet 1

    When the trace is scheduled, the ABAP Runtime Analysis automatically starts the trace as soon as ses sion that

    meets your criteria is started on the system. The user you have specified logs on to the system and executes his task,

    and the ABAP Runtime Analysis starts to write the trace. The trace results can be analyzed - as usual - in the ABAP

    Runtime Analysis (using the "Evaluate" button on initial screen).

    13685 View s Topics: abap

    Share 1Like

    68Comments

    Like (0)

    Ritesh MehtaDec 11, 2009 10:40 PM

    Very Nice blog and very much required one. Helps to analyze the performance issues.

    Like (0)

    S NJan 2, 2010 10:24 A M (in response to Ritesh Mehta)

    Thanks for the blog ,I am a functional person. with your blog reference i have solved my

    batch job issue.

    Thanks again

    S.N

    Like (0)

    Gregory MisiorekDec 12, 2009 5:35 AM

    very helpful and comprehensive. thank you for sharing.

    Like (0)

    Kanakaraj GDec 13, 2009 10:03 PM

    Good one, very Help for abaper to analyze the performance issues.

    Like (0)

    Ramakrishna SirasanagundlaDec 13, 2009 11:57 PM

    Good one, very helpful...

    http://scn.sap.com/people/ramakrishna.sirasanagundlahttp://scn.sap.com/people/kanakaraj.ghttp://scn.sap.com/people/gregory.misiorekhttp://scn.sap.com/people/nareshhttp://scn.sap.com/people/ritesh.mehta3http://scn.sap.com/servlet/JiveServlet/showImage/38-51785-62595/se30_user_trace.jpghttp://scn.sap.com/community/abap/testing-and-troubleshooting/blog/tags#/?tags=abaphttp://twitter.com/search?q=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fabap%2Ftesting-and-troubleshooting%2Fblog%2F2009%2F12%2F11%2Fabap-runtime-analysis-se30--how-to-analyze-abap-program-flowhttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fabap%2Ftesting-and-troubleshooting%2Fblog%2F2009%2F12%2F11%2Fabap-runtime-analysis-se30--how-to-analyze-abap-program-flow&text=ABAP%20Runtime%20Analysis%20(SE30)%20-%20How%20to%20analyze%20ABAP%20program%20flow&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fabap%2Ftesting-and-troubleshooting%2Fblog%2F2009%2F12%2F11%2Fabap-runtime-analysis-se30--how-to-analyze-abap-program-flow&via=SAPCommNet
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    7/15

    Like (0)

    Bjorn-Henrik ZinkDec 14, 2009 2:38 AM

    Hi,

    thanks for an excellent blog. Very useful information, especially the part on HTTP tracing.

    /Bjrn-Henrik

    Like (0)

    Bjorn-Henrik ZinkDec 14, 2009 2:42 AM (in response to Bjorn-Henrik Zink)

    Hi again,

    in fact, the blog is fantastic and the most useful blog I have read this year on SCN. It will

    surely speed up m y analysis of HTTP/RFC applications.

    /Bjrn-Henrik

    Like (0)

    Olga DolinskajaDec 15, 2009 12:54 A M (in response to Bjorn-Henrik Zink)

    Thank you very much ! I hope it will help to analyze the behavior of Web Dynpro appl ications

    as well.

    Like (0)

    Raja ThangamaniDec 14, 2009 8:36 AM

    Good one... Keep it up.

    Raja

    Like (0)

    Uthaman PalaniappanDec 14, 2009 7:02 PM

    But I do want to comm ent that for finding from where the mes sage was iss ued for SE38, we could

    still us e "watch-points", which is equally quicker and cheaper(in terms of effort).

    I appreciate your effort ...

    Bye,

    Uth

    Like (0)

    Olga DolinskajaDec 15, 2009 12:52 AM (in response to Uthaman Palaniappan)

    Hi Uth,

    in the example with a message you could indeed set a watchpoint on a variable SY-MSGNO

    and debugger would s top as s oon as it changes. But it works only if you know that

    message number is stored in the SY-MSGNO. If you dont know it you cannot work with a

    watchpoint. The ABAP Trace makes sense if you are not familiar with the code and

    variables and need quickly to analyze its behavior.

    Best Regards,

    Olga.

    Like (0)

    Naimesh KundananiJan 20, 2010 3:13 PM (in response to Uthaman Palaniappan)

    Even better, just keep a break-point on Statment "Message" , it'll be seconds before you

    reach the desired statement.

    This is how i teach the functional consultants i n our team, cos just /H & they are on their

    way... while SE30 & other tools are best left to developers.

    Regardless, your blog is mos t enlightening, thank you :)

    Like (0)

    Sergio FerrariDec 16, 2009 5:39 AM

    very useful topic

    Chintan P. ContractorDec 18, 2009 8:53 PM

    http://scn.sap.com/people/chintanp.contractorhttp://scn.sap.com/people/sergio.ferrari2http://scn.sap.com/people/naimesh.kundananihttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/uthaman.palaniappanhttp://scn.sap.com/people/raja.thangamanihttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/bjorn-henrik.zinkhttp://scn.sap.com/people/bjorn-henrik.zink
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    8/15

    Like (0)

    Fantastic Blog with useful info.

    Like (0)

    Victor Konstantinovich AlehinDec 19, 2009 2:35 PM

    Thanks! I just have save a few days of my life!

    !

    Like (0)

    Benu MariantonyDec 20, 2009 9:17 PM

    Excellent Blog.. Would have saved a lot of time if i know this before...

    Like (0)

    Gaurav Patw ariDec 20, 2009 9:37 PM

    Its great work, I have also published one article on SE30 but not as this m uch detail.

    Good job keep it up.

    Like (0)

    Manjunadh LollaDec 20, 2009 9:54 PM

    Often many inmportant topics are ignored to be studied in detail. Every ABAPer should fundamentally

    know these. And this blog serves the need.

    Like (0)

    Christian Lec hnerDec 22, 2009 1:31 AM

    Another tool that is very useful to gather inform ation about the program flow is the "Single

    Transaction Analysis" (ST12)

    This toool has some features that go beyond SE30 e. g. the bottom-up analysis of an ABAP trace that

    displays the hierarchie of the callers in a quite comfortable and inuitive way.

    Like (0)

    A. de SmidtDec 22, 2009 5:16 AM

    of the course COMP267 given by Boris Gebhardt on debugging at SAP TECHED last year in Berlin.

    still a pitty that this is not a regular training since it already saved me months of clueless ness in

    debugging possibilities.

    I also m ade a sum mary of it but now I can link to this blog

    Like (0)

    Sebastian MilliesJan 21, 2010 1:19 AM (in response to A. de Smidt)

    Hello Arthur, I'd be most interested in your summary of COMP267, as a complement to this

    excellent blog. Where can it be found?

    -- Best Regards, Sebastian

    Like (0)

    A. de SmidtMar 8, 2010 11:12 PM (in response to Sebastian Millies)

    my own s umm ary was written in dutch for my colleages , I could not find the

    comp267 as an pdf file which was us ed at the course. perhaps Olga is allowed to

    also put it online as an extension to this blog.

    ps it would be nice if there also came a follow up on this which handlesdebugging in se38. like debugging update processes , using watchpoints and

    where to declare the variables, finding the startpoint etc etc.

    Olga DolinskajaMar 9, 2010 4:11 AM (in response to A. de Smidt)

    Hi,

    unfortunately I cannot share TechEd materials on the SDN. But the good

    news is , that the most content of the CD265 (success or of the comp267

    on the TechED 2009) will go to the SDN as weblogs and videos and will

    focus on the News in Troubleshooting with NetWeaver 7.0 EhP2. This

    should happen between april and m ay.

    To learn about watchpoints and other New Debugger features pleas e

    take a look at these videos (on the http://www.sdn.sap.com/irj/sdn/abap

    http://www.sdn.sap.com/irj/sdn/abaphttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/a.desmidthttp://scn.sap.com/people/sebastian.millieshttp://scn.sap.com/people/a.desmidthttp://scn.sap.com/people/christian.lechnerhttp://scn.sap.com/people/manjunadh.lolla2http://scn.sap.com/people/gaurav.patwari8http://scn.sap.com/people/benu.mariantonyhttp://scn.sap.com/people/victorkonstantinovich.alehin
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    9/15

    Like (0)

    page):

    New ABAP Debugger for Classic ABAP Debugger Users

    New ABAP Debugger for Newbies

    If you have any other special questions regarding the New Debugger

    please e-mail me.

    Best Regards,

    Olga.

    Like (0)

    A. de SmidtMar 30, 2010 5:02 AM (in response to Olga Dolinskaja)

    hmm m there is not much in you're busines s card like an email..

    I'm trying to debug som e portal issues which work nice until the

    point I get methods or impos sible functions which I can't isolate

    and transfer the testdata. normally it was nice if you came

    inside a function you could transfer all the im port parameters to

    the function bu t not with HR_BLP_READ_TIMEDATA

    further on I haven't found yet with the new debugger how to

    transfer testdata to methods. seems like logic to me that when

    SAP wants us to programm OO that we also have the

    poss ibilities to debug it and transfer even the more complex

    testdata from methods to testdata ?

    is it already possible to transfer data from debugging to

    methods ??

    Like (0)

    Klaus SteinbachMar 30, 2010 10:01 AM (in response to A . de

    Smidt)

    Hi,

    in the past I created a debugger script to help m yself

    getting data out of the debugger for reproducing errors.

    Perhaps this can help you, therefore I would like to

    unders tand exactly what you want to do.

    So far I understand you want to capture the methods

    parameter. Where do you want to use them?

    Kind Regards,

    Klaus

    Like (0)

    Olga DolinskajaApr 11, 2010 3:55 PM (in response to A. de

    Smidt)

    Hi,

    you can transfer content of debugger variales as

    import parameters for functions.

    It is poss ible to save debugger variables as test data

    for the SE37 transaction and then debug the function

    modules with these test data. Use context menu (right

    mouse button) for your variable in the variable fast

    display and choose Save Parameters as Test Data

    (SE37), execute debugging of your function module in

    SE37 and choose test data from test data directory

    (Test Data Directory button) as import parameter foryour function module.

    Best Regards,

    Olga.

    A. de SmidtApr 11, 2010 11:48 PM (in response to

    Olga Dolinskaja)

    I know how to transfer testdata to se37 that's

    not the problem. the main problem is that it

    doesn't work for all functions es pecially those

    functions that are totall y fuzzy and no way to

    remember all data.

    have you tried to trans fer testdata in

    debugging to HR_BLP_READ_TIMEDATA

    http://scn.sap.com/people/a.desmidthttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/klaus.steinbachhttp://scn.sap.com/people/a.desmidt
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    10/15

    Like (0)

    coming from testing

    PT_ARQ_TEAMCALE_GET ?

    it sure does n't work in my system :(

    Like (0)

    chetan sakundeDec 22, 2009 11:54 AM

    Keep it up.Gr8.

    Like (0)

    Raghavendra CKDec 23, 2009 12:48 AM

    Hi

    Thank you for all your efforts and time spent on the this.

    KRC

    Like (0)

    Dario JiangDec 23, 2009 5:45 PM

    very good and thanks for sharing.

    Like (0)

    Gopi Krishna AbotulaDec 27, 2009 7:10 PM

    Thanks for the blog

    Like (0)

    Mykola GorbarovJan 20, 2010 6:07 AM

    Great post for complex topic described in eas y to read and understandable manner

    Like (0)

    Leon SteinhardtJan 20, 2010 12:14 PM

    Thank you very much; this very useful tutorial link arrived in my email just when I needed it.

    I found one minor error:

    'Search for "mes sage DS017" in the Call Hie rarchy lis t' won't find it. As your picture shows, the code

    line is "Message S017" - not "DS017". Same for all m essages : Snnn, Ennn, etc.; the full number

    from the F1 help box never shows in the code.

    Like (0)

    Sharon ToddJan 20, 2010 2:30 PM

    Very useful for tracing RFC requests of other users. Thank you for an excellent post.

    Like (0)

    Abhijeet KulkarniJan 20, 2010 8:52 PM

    Hi Olga,

    It was really useful. While we regularly used to test the t-codes, programs and FMs, we never

    explored the parallel ses sion and user/service options. This would certainly help us reach the root of

    the problem even faster. However, I was unable to trace a BSP application. I gave these settings

    from user 001671 for another user (These were visible as on 21.01.2010)-

    Measur. ID 4

    User 000984Sessn Any

    ProcessCat Any

    ObjectType

    Object Nam e H AP_DOCUMENT

    Scheduled 1

    Started 0

    Errors 0

    Status Executed

    Exp. Date 20.01.2010

    Expir.Time 12:02:42

    After setting this up, I used the BSP applica tion HAP_DOCUMENT. No trace was generated.

    Please s uggest the correct settings, or if you know any document that can help. Thanks.

    -Abhijeet.

    http://scn.sap.com/people/abhijeet.kulkarni3http://scn.sap.com/people/sharon.todd2http://scn.sap.com/people/leon.steinhardthttp://scn.sap.com/people/mykola.gorbarovhttp://scn.sap.com/people/mr.saihttp://scn.sap.com/people/daixiong.jiang3http://scn.sap.com/people/raghavendra.chttp://scn.sap.com/people/chetan.sakunde7
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    11/15

    Like (0)

    Olga DolinskajaJan 21, 2010 3:32 A M (in response to Abhijeet Kulkarni)

    Hi Abhijeet,

    your meas urement settings look ok so far.

    Please verify that user mapping (on the other user) does not take place during execution of

    your BSP before calling HAP_DOCUMENT. Otherwise schedule measurement for e.g. "any"

    user. Please also verify that BSP request really arrives on the same application server of

    your ABAP backend system, where you scheduled your measurement in the SE30.

    For more details on m easurement settings pleas e take a look at the Runtime Analysis

    Docu on SAP Help Portal:

    http://help.sap.com/saphelp_NW70EHP1/helpdata/en/42/eaae4baeb732c3e10000000a15

    I hope this helps ...

    Best regards,

    Olga.

    Like (0)

    Abhijeet KulkarniJan 21, 2010 4:20 A M (in response to Olga Dolinskaja)

    Hi Olga,

    I would check the timing of us er mapping and try tracing with the suggested

    settings. Interestingly, ST12 worked! I had put following setting in ST12-

    Trace For- User

    User name- 000984

    Task Type- H HTTP (HTTP reques t/BSP)

    Thanks for the guidance.

    -Abhijeet.

    Like (0)

    Ardavan GoharjouJan 20, 2010 11:48 PM

    Yesterday did exactly as mentioned in the introduction. Spent many hours debugging a transaction to

    get to the root of the problem. I could've saved many hours if I knew of this weblog before. But I now

    know how to use SE30 and it'll be my savior.

    Many thanks for sharing your knowledge.

    I'll als o try to learn about ST12 as suggested by another kind soul.

    Like (0)

    Silvia GiussaniJan 21, 2010 4:05 AM

    Hi Olga....your instructions on ABAP debug is really good. I would like to use it with BW ABAP code

    (Start/End Routines,etc). How should I use it? Is there any change to apply?

    Thanks in advance for your comments.

    Silvia

    Like (0)

    Olga DolinskajaJan 21, 2010 4:17 AM (in response to Silvia Giussani)

    Hi Silvia,

    the SE30 allows you to examine the runtime of any ABAP programs, such as reports,

    subroutines, function modules or classes, that you create in the ABAP Workbench.

    I am not sure which type of BW applications you want to measure, but actually it should

    work the same way for BW ABAP applications as des cribed in the blog.

    Best Regards,

    Olga.

    Like (0)

    Sanjay Madhav LavlekarJan 21, 2010 8:59 PM

    This is very good informative article.

    Sanjay

    http://scn.sap.com/people/sanjaymadhav.lavlekarhttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/silvia.giussanihttp://scn.sap.com/people/ardavan.goharjou2http://scn.sap.com/people/abhijeet.kulkarni3http://help.sap.com/saphelp_NW70EHP1/helpdata/en/42/eaae4baeb732c3e10000000a1553f6/frameset.htmhttp://scn.sap.com/people/olga.dolinskaja
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    12/15

    Like (0)

    Abhinandan AlandkarJan 27, 2010 1:30 AM

    Hi Olga,

    This is really magic man. I am happy to know that we could do this us ing SE30.

    Great Webblog ever..

    Regards

    Abhii

    Like (0)

    Sebastian MilliesJan 27, 2010 5:11 AM

    Hi there,

    thanks for the nice blog. I've run into a problem, though:

    I've created a variant for a report of mine exactly as described. The report is started using a variant.

    The report, when debugged, makes a couple of PERFORMS and a method call during START-OF-

    SELECTION. It then starts a couple of jobs in the background (which I don't expect to be measured)

    and displays a lis t at the end.

    However, the call hierarchy does not reflect any of this. Instead, it contains only one line saying

    "Runtime analysis" for "CL_ABAP_TRACE_SWITCH==========CP". The measurement file has

    only 5 KB. Any idea what might be going wrong?

    -- Sebastian

    Like (0)

    Olga DolinskajaJan 28, 2010 1:40 A M (in response to Sebastian Millies)

    Hi Sebastian,

    Are you sure that the report was executed, e.g. have you seen the list at the end? If yes, for

    me it looks like the trace was not switched on.

    Please make sure that you run your report on the same application server as SE30. If the

    report runs correctly without SE30 and without debugger, please try again to run the

    measurement with SE30 and explicitly switch on/off it by choosing "Particular units" option

    in your variant and using "/ron" "/roff" commands as described in the blog.

    Best Regards,

    Olga.

    Like (0)

    Sebastian MilliesJan 29, 2010 4:15 A M (in response to Olga Dolinskaja)

    thanks, it now works (except I'm often running against a limit on the trace file size).

    -- Sebastian

    Like (0)

    Olga DolinskajaJan 31, 2010 1:43 PM (in response to Sebastian Millies)

    Hi Sebastian,

    you could increas e your trace file size on the "Duration/Type" tab in your

    variant. Better way would be to swi tch on/off the trace only where you

    really need it (/ron and /roff commands).

    Regards, Olga.

    Sebastian MilliesFeb 1, 2010 2:39 AM (in response to Olga Dolinskaja)

    thanks, that worked, except I had to talk the administrator of the

    server to give me a bigger quota. One idea for an improvement

    for the transaction would be the pos sibility of local

    meas urement files (i. e. residing on the client, at least up and

    download should be possible).

    The reason for the big increase in file size was that som e

    processes got started asynchronously and the process I was

    tracing then did active polling in a loop. I'd basically like to skip

    this part of the trace. I think a big improvement to the transaction

    would be the pos sibility of an exclude lis t in the "particular units"

    part of the variant.

    -- Sebastian

    http://scn.sap.com/people/sebastian.millieshttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/sebastian.millieshttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/sebastian.millieshttp://scn.sap.com/people/abhinandan.alandkar2
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    13/15

    Like (0)

    Like (0)

    Olga DolinskajaFeb 2, 2010 4:32 AM (in response to

    Sebastian Millies)

    Hi Sebastian,

    Thank you for the feedback.

    Just to let you know, we have m ade som e

    improvements in the new version of Runtime Analysis

    (successor of SE30). The trace files will be written

    directly to the database, and you shouldn't have a

    problem with a disk quota for your trace files anymore.

    This feature will be available within SAP Business

    Suite based on Netweaver 7.0 EHP2.

    I have also forwarded your wish about the "exclude list"

    to the development.

    Regards,

    Olga.

    Like (0)

    Julius von dem BusscheJan 31, 2010 2:02 PM

    Thank you Olga!

    I have been for som e time now looking for a m ore efficient way to do forensics on programs from the

    names pace "!". Sometimes I am called upon to do this.

    Often the security audit log is "too late" for successfully submitted reports and I was "too slow" for

    STAD to give me these details.

    In addition to the developer trace, I had not thought of using SE30's own results yet.

    Many thanks !

    Julius

    Like (0)

    Joo G NevesJan 31, 2010 2:55 PM

    Hello Olga,

    Thank you for this post, one of the most useful I've seen. A great help for any SAP consultant!

    Regards,

    Joo

    Like (0)

    Priz RFeb 20, 2010 4:49 AM

    Very useful and well documented.

    Like (0)

    Avraham KahanaFeb 24, 2010 3:22 AM

    Indeed helped me find the source code of my error way faster than I would have done otherwise.

    Like (0)

    Ferran Bonamusa FranciscoFeb 27, 2010 12:18 PM

    Thank you for this helpful information.

    Like (0)

    Yes SAP TeamMar 2, 2010 1:46 AM

    Ever since I discovered this weblog I used it a lot, and sent it to everyone I know.

    Thank you very much for this.

    Best regards.

    Ayal Telem .

    rama basaMar 3, 2010 5:43 AM

    http://scn.sap.com/people/rama.basahttp://scn.sap.com/people/yes.sapteamhttp://scn.sap.com/people/ferran.bonamusafranciscohttp://scn.sap.com/people/avraham.kahanahttp://scn.sap.com/people/priz.rhttp://scn.sap.com/people/joog.neveshttp://scn.sap.com/people/julius.vondembusschehttp://scn.sap.com/people/olga.dolinskaja
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    14/15

    Like (0)

    Gr8 one this..i never knew we could do this with SE30..Thanks :)

    Like (0)

    Purvang Zinzuw adiaMar 8, 2010 2:25 PM

    Hi,

    very nice and helpful blog, I followed this method earlier als o reading this blog and it worked fine jus t

    as explained; but now I want to analyze a long running DTP job and every time, it doesnt display any

    code lines in output file (after clicking evaluate button). I used same settings for trace variant as

    mentioned. Cant SE30 trace object oriented code?

    - Purvang

    Like (0)

    Olga DolinskajaMar 9, 2010 3:51 AM (in response to Purvang Zinzuw adia)

    Hi Purvang,

    yes, SE30 can trace object-oriented code as well. Please check again your trace variant

    ("Statements" tab).

    Best regards,

    Olga.

    Like (0)

    Purvang Zinzuw adiaMar 10, 2010 6:04 AM (in response to Olga Dolinskaja)

    Hi,

    I have used below setting for trace variant

    Program (Parts) Tab - only 'RFC, Update' is unchecked

    Statements Tab - only Kernel Level is unchecked

    Duration Tab - aggregation is set to none and 'With m emory use' is checked

    my DTP use parallel processes to process different data packages, I can see di ff

    actions in SM66 output but I cannot capture these in SE30 file.

    Please help,

    Purvang

    Like (0)

    Olga DolinskajaMar 11, 2010 1:27 AM (in response to Purvang Zinzuw adia)

    Hi Purvang,

    if a trace file is empty then the trace has not started at all. You maybeneed to check some additional things.

    I can give you just some ideas...Before deactivating the trace in the

    "Start/end measurement..." view, refresh the work process display

    because the work process with activated trace may have changed.

    Consider that you need to start and stop the trace for each parallel

    process, that you want to trace. You will get trace files for each process.

    Do you use RFC calls into other systems in your parallel processes ? If

    yes, then you need to check 'RFC, Update' as well.

    Regards,

    Olga.

    Like (0)

    Lokesh PattnayakJul 14, 2010 5:32 AM

    This blog gives a good insight knowledge on se30 .

    Like (0)

    Siddhartha RathiMar 28, 2012 7:00 PM

    Hi,

    I would like to know in case m y ABAP shows 80% and above and Database shows 5% to 15%

    usage and rem aining by system than is s uch a code good or bad and why??

    Sid

    A. de SmidtApr 2, 2012 3:31 PM (in response to Siddhartha Rathi)

    http://scn.sap.com/people/a.desmidthttp://scn.sap.com/people/siddhartha.rathihttp://scn.sap.com/people/lokesh.pattnayakhttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/purvang.zinzuwadiahttp://scn.sap.com/people/olga.dolinskajahttp://scn.sap.com/people/purvang.zinzuwadia
  • 8/11/2019 ABAP Runtime Analysis (SE30) - How to Analyze a..

    15/15

    Follow SCNSite Index Contact Us SAP Help Portal

    Privacy Terms of Use Legal Disclosure Copyright

    Like (0)

    it depends on you're coding if it is good or bad. som etimes 90% database is good when

    abap coding is very lean. when database access is lean 80% abap can be good.

    you have to look if customers are happy about the performance and if they are not then

    analyze if som ething can be changed with for instance se30. in you're case when abap is

    80% it is logic to concentrate in looking at the coding. and how m uch time each block

    consumes.

    you get very quick insight in this with se30 or sat and full aggregation.

    Arthur

    Like (0)

    Adam Krawc zykFeb 8, 2013 10:15 AM

    Hi,

    Thank you for a very good blog. It describes more advanced techniques for SE30 and presents core

    knowledge that should be known. Still up to date

    Regards,

    Adam

    Like (0)

    Ronaldo A parecidoNov 18, 2013 9:16 PM

    Thanks Very helpfull.

    Like (0)

    Basar Ozgur KahramanJul 11, 2014 1:49 PM

    Thank you for helpful blog!!

    Like (0)

    Sneha RanaJul 11, 2014 3:50 PM

    Very Useful information. I have used SE30 so many times, but never knew the depth of it. Thanks for

    sharing

    Like (0)

    fikret somayJul 24, 2014 12:45 PM

    thanks for the blog!!!

    Like (0)

    Devendra FAug 9, 2014 11:43 AM

    Very Nice one.

    http://scn.sap.com/people/devendra.fulsundarhttp://scn.sap.com/people/fikretsomayhttp://scn.sap.com/people/sneha.ranahttp://scn.sap.com/people/basarozgur.kahramanhttp://scn.sap.com/people/ronaldo.aparecidohttp://scn.sap.com/people/adam.krawczykhttp://www.sap.com/corporate-en/our-company/legal/copyright/index.epxhttp://www.sap.com/corporate-en/our-company/legal/impressum.epxhttp://www.sdn.sap.com/irj/scn/policyhttp://www.sdn.sap.com/irj/scn/policy?view=PPhttp://help.sap.com/http://scn.sap.com/docs/DOC-18476http://scn.sap.com/docs/DOC-19361http://spr.ly/SCNgoogleplushttp://bit.ly/SCNLnIhttp://bit.ly/SCNyouThttp://bit.ly/SCNFBhttp://bit.ly/SCNTwR