About perform in abap

how perform on commit & rollback works explain with real time example ?

hi,
PERFORM n ON COMMIT
Addition
1. ... LEVEL level
Effect
Executes the specified subroutine when a COMMIT WORK occurs. This allows you to execute a subroutine only if the logical transaction has ended successfully. The subroutine is not executed until the key word COMMIT WORK is called. FORMs specified several times are executed only once on COMMIT WORK (see COMMIT WORK ).
If you call ROLLBACK WORK , you delete all the specified routines.
Note
With PERFORM ... ON COMMIT , you cannot transfer any data with USING/CHANGING . To do this, you must either store the data in global variables or store it temporarily with EXPORT ... TO MEMORY .
Addition 1
... LEVEL level
Effect
The addition LEVEL , followed by a field, defines the order in which the subroutines are executed after COMMIT WORK . They are called in ascending order of level. If there is no addition LEVEL , the subroutine always has the level zero. If the level is the same, the order of calls determines the order of execution. Level assignment occurs during development, e.g. by defining constants in an include program. The level must be of type I.
Implicit Database Rollbacks in the R/3 System
The following cases lead to an implicit database rollback:
·        Runtime error in an application program
This occurs whenever an application program has to terminate because of an unforeseen situation (for example, trying to divide by zero).
·        Termination message
Termination messages are generated using the ABAP statement MESSAGE with the message type A or X. In certain cases (updates), they are also generated with message types I, W, and E. These messages end the current application program.
Also follow this link.
http://help.sap.com/saphelp_nw04/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/content.htm
Hope this helps, Do reward.
Edited by: Runal Singh on Apr 24, 2008 11:53 AM

Similar Messages

  • The performance of ABAP programs

    Hey Experts , how can one analyze the performance of ABAP programs apart from using the generic tools such as Trace etc.

    Hi Chakradhar,
    Overview & Introduction
    The runtime analysis tool allows you to examine the performance of any ABAP programs, such as reports, subroutines, function modules or classes, that you create in the ABAP workbench. It saves its results in performance data files, which you can display as lists. You can use these results to identify runtime-intensive statements, to combine table accesses, and show the hierarchy of program calls.
    Normally you use the runtime analysis tool to measure the runtime of complex program segments or complete transactions (if you want to measure the runtime of smaller program segments or individual ABAP statements you can use the ABAP statement GET RUN TIME FIELD ).
    However, we use only simple
    The Programs to be Analyzed
    Let's assume I am a very newbie in ABAP and I have written a tiny little program which is doing the following:
    reading data from a database table
    storing that data in an internal table
    display that data on a list (at the start of the program you have to specify certain key values; only matching data should be displayed later on).
    So here it comes (and it seems to work as designed ...)
    REPORT  y_wlog_atra_1.
    PARAMETERS: p_carrid TYPE sbook-carrid DEFAULT 'LH',
                p_connid TYPE sbook-connid DEFAULT '0400'.
    DATA: wa_sbook TYPE sbook,
          itab_sbook TYPE STANDARD TABLE OF sbook.
    *SELECT * FROM sbook INTO wa_sbook.*
      CHECK: wa_sbook-carrid = 'LH' AND
             wa_sbook-connid = '0400'.
      APPEND wa_sbook TO itab_sbook.
    ENDSELECT.
    LOOP AT itab_sbook INTO wa_sbook.
      WRITE: /,
             wa_sbook-carrid,
             wa_sbook-connid,
             wa_sbook-fldate,
             wa_sbook-bookid,
             wa_sbook-customid,
             wa_sbook-custtype.
    ENDLOOP.
    A nice colleague has thrown a glance at my source code. He has given the hint to use a WHERE clause with the SELECT statement instead of the CHECK statement for reasons of better performance.
    So I have written another program:
    REPORT  y_wlog_atra_2.
    *SELECT * FROM sbook INTO wa_sbook*
      WHERE carrid = 'LH' AND
            connid = '0400'.
      APPEND wa_sbook TO itab_sbook.
    ENDSELECT.
    I am curious about the performance now. Let's compare the 2 variants with the ABAP Runtime Analysis tool.
    ABAP Runtime Analysis: Tool & Procedure
    To start it, choose Test --> Runtime Analysis in the SAP Menu, or use transaction SE30 .
    The runtime analysis procedure consists of two parts:
    Recording performance data (upper part of the screen)
    Analyzing the performance data (lower part of the screen; this part only appears if there are performance data files in place)
    The procedure for the first part (Recording performance data):
    We go to the initial screen of the runtime analysis (transaction code SE30 ) and specify the name of the first program (Y_WLOG_ATRA_1) in the relevant input field. After that we press the button Execute .
    The selection screen of the program Y_WLOG_ATRA_1 (including the 2 input fields) is displayed. At the bottom of the screen we are informed that the measurement has been started. We continue by clicking the Execute button.
    Later on we will see that a file (containing performance data) has been created in parallel.
    Now we repeat that procedure for our second program (Y_WLOG_ATRA_2).
    The second step is the analysis of the generated performance data.
    To do that we have to go to the initial screen of the Runtime Analysis tool again. On the bottom part of the screen you can specify those performance data files you want to analyze.
    You can see some information related to the last measurement run (in our case that was program (Y_WLOG_ATRA_2). By pressing the button Other File we are able to select those performance data files we like to analyze.
    I want to see all the files I have created (user BCUSER).
    I get the relevant list with 2 lines (related to the performance data files of the programs Y_WLOG_ATRA_1 and Y_WLOG_ATRA_2).
    Based on that list you can display the distinct performance data per line. You have to click in the column Object Type of the relevant line.
    As a start the tool displays the evaluation overview (showing the cumulated execution times for the ABAP, database and system-level).
    Here comes the evaluation overview for program Y_WLOG_ATRA_1
    We can do the same for the other program Y_WLOG_ATRA_2
    By comparing the perfomance data of the 2 programs we clearly see that I have done well with listening to the advice of my colleague. The performance of the second program is dramatically better.
    In the next step you can forward to a more detailed display of the performance data (Hitlists). That listing shows the different granular execution steps ( according to your filter adjustments ). Here you can easily identify the most time-consuming progam units.
    And it will also be a good idea to glance at the Tips & Tricks corner. You will find many valuable suggestions about good performance definitely.
    Please use the below link to see the Screen shots of the screens
    [http://searchsap.techtarget.com/tip/0,289483,sid21_gci1265920,00.html|Performance Analysing]

  • I want to complete information about Payrolls in abap hr?

    i want to complete information about Payrolls in abap hr?

    Hi,
    SAP HR Payroll Overview
    In a broad sense, payroll accounting is the calculation of remuneration for work performed by an employee. More specifically, payroll accounting consists of a variety of processes that are becoming increasingly important due to the employer’s increased obligation to supply benefits and medical welfare.
    These benefits are products of:
      Labor law
      Tax law
      Contribution law
      Benefits law
      Civil law
      Reporting law
      Information law
      Statistics law
    The remuneration is calculated in the following steps:
    1. Calculation of gross remuneration
    2. Calculation of net remuneration
    Gross and net pay comprises the individual payments and deductions which are calculated during a payroll accounting period, and are received by an employee. These payments and deductions are included in the calculation of pay by uniquely distinguishable wage types.
    Payroll is predefined in the SAP HR system for many countries specifically (e.g. Payroll United States, Payroll Spain, Payroll Japan) and all other countries' payroll comes under the heading of "International Payroll".
    Or Check these links....
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/dd/38a63a04227748e10000000a11402f/frameset.htm
    http://web.mit.edu/hr/compensation/quickcards/ASR-Change-Save-Layout.pdf (Very useful...)
    http://www.sap.com/belux/solutions/business-suite/erp/hcm/pdf/SAP_BE_Payroll.pdf (Very useful...)
    http://www.sap-basis-abap.com/saphr005.htm
    Reward points if useful....
    Regards
    AK

  • Performance of ABAP query program

    Hi All,
    A custom program AQNWZ_TALAT=====TCS_AP_ITEMS== is taking lot of time running. And when checked the cost of the select statement is very high.
    I guessed it must be some custom abap query. Correct me if I am wrong.
    Also please let me know how to do the performance tuning on this code? Should I be editing the program directly or should I edit at the abap query level.
    Regards,
    Pooja
    Moderator message: Please Read before Posting in the Performance and Tuning Forum
    Edited by: Thomas Zloch on Dec 3, 2010 11:01 AM

    >A few tips you can use for finetuning a Report
    The actually a good collection of the most important pain points. But the recommendations are unfortunately quite poor, and even wrong. I have updated them a little bit.
    And for German speaking people I have added a reference to a textbook, where arll my recommendations are explained in detail.
    Siegfried
    1) Use mostly primary key to access data.
    ... nonsense, the task determines the WHERE clause, it is not your choice
    2) Before READ u sort the itab
    No
    3) use mostly the indexes fields in ur where clause.
    ... as 1, it is the other way, the task determines the WHERE-clause, make surwe that there is an index which
    supports it
    4) Restrict the the fields retrieved by your select sentences to the minimal set. (Avoid select *)
    nonsense, most SELECT use and must use *, use field list in wide tables
    5) try to use specify where clause so the abap sql optimizer chooses the right index.
    o.k., but who understands that in depth?
    6) Avoid sentences like select lifnr name1 into corresponding fields of lfa1 from lfa1 where....
    feel free to use if required
    (You should declare a working area and select into the working area, is twice faster)
    ... such general statements are always incorrect
    7) use hashed tables instead of standard tables. They are faster
    no, use sorted tables, hashed are very special and can only be used if there is a unique key
    8) avoid the use of collect as much as you can.
    total nonsense, use collect with hashed tables, works perfect, if you use it with standard tables, do not mix it with other statements
    1 Always check the driver internal tables is not empty , while using FOR ALL ENTRIES
    100% correct
    2 Avoid for all entries in JOINS
    ... not generally true
    3 Try to avoid joins and use FOR ALL ENTRIES.
    ... hmmm, there are pages of discussions, this statement was wrong, is wrong and will be wrong!!!
    4 Try to restrict the joins to 1 level only ie only for 2 tables
    nonsense, joins are complicated, you must know hw indexes are used, if everything is fine, then 10 or 20 tables can be joined
    5 Avoid using Select *.
    see 4)
    6 Avoid having multiple Selects from the same table in the same object.
    ... try to avoid to SELECT the same data, different criteria can be necessary
    7 Try to minimize the number of variables to save memory.
    ... obvious,
    8 The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
    ... no is must not the optimizer will not be influenced be the order , but do it, it increases readability
    9 Avoid creation of index as far as possible
    ... no, o.k. if you are not experienced than avoid ... otherwise the creation of the required indexes is absolutely mandatory for new tables, for SAP standard tables most indexes are already there. But still if very new accesses are added, then new indexes can become necessary.
    10 Avoid operators like , > , < & like % in where clause conditions
    ... no, you must add them, but be aware that the search is only poorly supported by them, but the result set is reduced.
    11 Avoid select/select single statements in loops.
    ... if they are going to the database! If the tables are buffered, then these statements are perfect!
    12 Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
    .... Actually try to avoid standard tables, use sorted tables instead. If you must use a standard table, than the recommendation is true.
    13 Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
    .... no, use them if required. Again, if table is buffered, then they MUST be avoided.
    14 Avoid using ORDER BY in selects
    ... if it is not ORDER BY PRIMARY KEY. Again, if the table is buffered, then other orders MUST be avoided.
    15 Avoid Nested Selects
    ... use join. Again, if the tables are buffered, then Nested SELECTs are fine!
    16 Avoid Nested Loops of Internal Tables
    .... impossible, there is no other option. Use sorted tables and verything is fine!
    17 Try to use FIELD SYMBOLS.
    ... what means try? Use ASSIGNING fieldsymbol in LOOPs, but use it in READs only for very wide tables (>1kB). Use it always for tables with tables in the workarea!
    18 Try to avoid into Corresponding Fields of
    ... see 6) is wrong!
    19 Avoid using Select Distinct, Use DELETE ADJACENT.
    .... no, use it if required and if it can reduce the result set by a factor of 2 or more. Again, if table is buffered, then it MUST be avoided.
    Wenn Sie mit der Performance Ihres ABAP Programms nicht zufrieden sind, werfen Sie doch einen Blick in mein neues Buch:
    Siegfried Boes: Performance-Optimierung von ABAP®-Programmen Nov. 2009 464 Seiten  59u20AC
    Leseproben und weitere Informationen: http://www.dpunkt.de/buecher/3096.html
    Edited by: Thomas Zloch on Dec 3, 2010 10:53 AM

  • Is there a way to view Flash videos on my iMac without downloading Adobe Flash Player? I'm concerned about performance and security with Flash Player.

    Is there a way to view Flash videos on my iMac without downloading Adobe Flash Player? I'm concerned about performance and security with Adobe Flash Player.

    If the video is only available in a format that requires Flash player : then no.
    However, a great many can also be viewed in an HTML5 version, in which case http://hoyois.github.io/safariextensions/clicktoplugin/ or similar can be set up so that Flash never runs unless you specifically choose it to.

  • I need information about Web dynpro ABAP Exception : ICF Service Node

    I need information about Web dynpro ABAP Exception :
    ICF Service Node "/sap/bc/webdynpro/sap/abcd/undefined" does not exist.
    Here abcd is application name.
    ICF Service Node exists and activated but kindly let me know from where "undefined" is coming .
    Please let me know your comments /views about  this.

    Hi,
    I think ur webdynpro service is not active after upgradation.
    You have manually activate it.
    Go go Tcode SICF,Execute the Initial screen,
    and in this new screen give service  as your application name and click on filter.
    You will get your service below which will be ur application name .
    right-Click on the deactivate and activate it or just activate it,.
    This shd work

  • About PAYROLL in ABAP-HR

    Can anyone share some information about PAYROLL in ABAP-HR in specefic U.K

    Can be helpful for the Report generation like salary register and reconcile of payroll for certain periods by accessing tables, RT, CRT& LRT.
    all the best

  • Information about Performance manager's APIs

    <p><span style="font-size: 10pt; font-family: Arial">Hi All,</span></p><p><span style="font-size: 10pt; font-family: Arial"> </span><span style="font-size: 10pt; font-family: Arial">I require some information about Performance Manager of Business Objects XI R2. </span></p><p><span style="font-size: 10pt; font-family: Arial">Business Objects provides APIs for BOE server, Web Services for customization, as that of, is there any APIs available for Performance Manager (for customization)? </span><span style="font-size: 10pt; font-family: Arial">Can we customize the performance Manager as per requirements? <span> </span></span><span style="font-size: 10pt; font-family: Arial"> </span></p><p><span style="font-size: 10pt; font-family: Arial">Please let me know your views & finding on this topic.</span><span style="font-size: 10pt; font-family: Arial"> </span></p><p><span style="font-size: 10pt; font-family: Arial">Thanks</span></p>

    Hi John, From the output you shared it looks like you using Performance Advisor and want to share a graph of a 7-mode system.  The instructions link you shared is from Performance Manager which is for Clustered Data ONTAP only.  In the Performance Advisor there is unfortunately no way to share a link.  You can 'save as' to png as you probably already saw, or you can use the dfm CLI to generate the same and email, perhaps as a daily report.  There is also a data collector that will post to the NetApp ToolChest that submits data to Graphite with dashboards in Grafana.  This solution would allow sharing of a URL like you desire.  If you want more info on this let me know. Kind Regards,Chris MaddenStorage Architect, NetApp

  • What   about issues in abap

    hi,
           any one can explain about issues in abap.suppose i am in suport project , how the issues plz give me one are two saple issues

    Hi Radha krishna,
    In fact we can't dispose this information, but any way i would like to inform you. In support project we will get the tickets which are raised by user. Based on the domain and based on the problem those tickets will be solved by corresponding team. Suppose user raised one ticket then decide whether it is related functional issue or technical issue. Based on that we can solve.
    Hope this helps you. Reply for queries, shall post the updates.
    Regards. 
    Kumar.

  • A simple question about performance!

    Hi! I have a simple question about performance. Suppouse that you have a servlet or a class with DB access, and you need to use a value several times in that page. What is best, to assign the value from say, a resultset or a request.getParameter() to a variable or to call the resultset or the request every time you need to retrieve that value? Which option uses less memory, which is faster, etc.?
    Hoping the best fou u
    Raul

    If you need more values from a db, the best is to open some connections (connection pool) and use the for accessing the db.
    To get the data only once, open the connection, get the data, store the data whereever you want: variable (class), hidden control (if you want to send from one page to another by request) and close the connection as quicky as possible.
    The advantage of the first method is that the most time consuming activity (connections opening) is done only once.

  • Improve data load performance using ABAP code

    Hi all,
             I want to improve my load performance using ABAP code, how to do this?. If i writing ABAP code in SE38 how i can call
    in BW side? if give sample code to improve load performance it will be usefull. please guide me.

    There are several points that can improve performance of your ABAP code:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    4.Avoid using nested SELECT and SELECT statements within LOOPs.
    5. Avoid using INTO CORRESPONDING FIELDS OF. Instead use INTO TABLE.
    6. Avoid using SELECT * and select only the required fields from the table.
    7. Avoid Executing a SELECT multiple times in the program.
    8. Avoid nested loops when working with large internal tables.
    9.Whenever using READ TABLE use BINARY SEARCH addition to speed up the search.
    10. Use FIELD-SYMBOLS instead of a work area when there are more than 200 entries in an internal table where some fields are being manipulated.
    11. Use MOVE with individual variable/field moves instead of MOVE-CORRESPONDING.
    12. Use CASE instead of IF/ENDIF whenever possible.
    13. Runtime transaction code se30 can be used to measure the application performance.
    14. Transaction code st05 can be used to analyse the SQL trace and measure the performance of the select statements of the program.
    15. Start routines can be used when transformation is needed in the data package level. Field/individual routines can be used for a simple formula or calculation. End routines are used when you wish to populate data not present in the source but present in the target.
    16. Always use a WHERE clause for DELETE statement. To delete records for multiple values, use SELECT-OPTIONS.
    17. Always use 'IS INITIAL' instead of equal to '' because null for a character is '' but '0' for an integer.
    Hope it helps.

  • Looking for book about performance tuning 11g database

    Hi,
    I am looking for books about performance tuning oracle 11g. The documents from OTN 2 days 11g performance tuning and performance tuning guide are not really study material.
    Has someone idea?
    greeting,
    Max

    Hi,
    http://astore.amazon.com/oraclebooks-20/detail/1590599683 {Part IV Database Tuning }
    Greetings,
    Sim

  • Doubts about performance:

    Doubts about performance:
    Hi:
    In my work we have performance problems with the database (Oracle 9i v. 2), we have said that the TOAD consumes a lot of resources.
    I know how to affect the performance of the database using a tool such as the toad.. ?
    It is true that the use of inner join and left join instead of = and (+) is better?
    Thanks

    This is too broad a question.
    Toad can fire random sql.
    sql*plus can fire random sql.
    Why would Toad be the problem?
    You would need to gather statspack data to demonstrate this.
    Sybrand,
    Agreed on it and its a relevant point.But I guess he is not worried about the db performance.Anyways lets see what OP says.
    Inner join and left join will always use CBO (Cost Based Optimizer) instead of RBO.
    I am not sure that I have read that anywhere. They came into Oracle in 9i where optimizer mode was choose as the default one. Just by the syntax, oracle would push them to use CBO as the default one,I am not sure about this. Even if we are having + symbol and have the stats,Oracle wold go for CBO right?Can you please point me to some where in the docs where it is mentioned that using this keywords,Oracle would use only CBO?
    Aman....

  • How did you learn about performance issues?

    I've been thinking about trying to get a LV certification, so I tried out the online test, and I've got a few questions about learning LV on a deeper level.
    One question asked whether it is more efficient to cast each piece of an array as its being built in a for loop, or to cast the entire array at once, after the array has been created.
    Another question asked, if array indexing is enabled on the output of a while loop then is the array resized on every iteration?
    I can make guesses at how LV works, but I really don't know what goes on under the hood. How do you pros know what's really going on with your code?
    Also for anyone out there who has been certified, can you pass the test with just experience, or do you have to undergo some NI training to learn some things? Has LV certification been beneficial to you?
    Thanks,
    John

    Hi John,
    I have mentored 2 1/2 CLA's (the 1/2 is the "Architect Supreme" and she really only needed encouragement).
    Here are my suggestions.
    1) Study for the test you plan to take. Studying above the test level you are after can only confuse things.
    2) If you can get the funding, take the NI courses suggested for that test. Some of the Q's come from the text.
    3) Monitor this Exchange for questions regarding performance and speed.
    4) Use the search box at the top of this page and search for "Greg McKaskle". Some of the best performance info available is in his writtings.
    5) Use the "info-LabVIEW" serach engine that can be found at
    http://www.searchview.net/
    and search fro Greg McKaskle and Rolf Kalbermatter. Again great information.
    6) Make a habit of using the "Task manager>>> Performance screen while you are devloping and testing. It is a good way to find out what things are good and which are bad. You find out subtle things like straight line interpolation on a chart is faster than step interpolation.
    7) Read all of the LV release notes. The questions you posted are answered in those docs and changed in LV 6.0.
    8) Review the LabVIEW ZONE challenges. They are competitions based on performance. Read the reviews.
    9) Read the white papers. Do not miss 144!
    10) Start posting Q's on this Exchange. Let us expert (myself excluded) that prowl this list help out.
    Done for now,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Performance Check - ABAP and Database color bars

    Hello everyone,
    When i go for the performance check of my object, i see Database in red bar and ABAP in green bar.
    The smaller the difference between these two bars, the better.
    But what does the color mean ? ( Somethimes the smaller bar is Red )
    Thanks

    Here is the explanation (depends % of total) in [sap library - SE30|http://help.sap.com/saphelp_nw2004s/helpdata/en/c6/617d2ae68c11d2b2ab080009b43351/frameset.htm]
    >
    shalaxy s wrote:
    > The smaller the difference between these two bars, the better.
    NO, it depends completely of what does your program!

Maybe you are looking for

  • Sub contracting CIN scenario

    Scenario 1 I have 2 plants.One manufacturing plant & another is import & local sales plant.No manufacturing activity in 2nd plant.I am creating 2nd plant as vendor & supplying subcontracting materials to the plant from plant 1 with a PO.I am generati

  • Photobooth works for one second, then stops.

    It used to work. Like all the time. I'm using a Logitech camera, which works fine in Skype and iChat. But when I open Photobooth, the camera turns on, works for a period of one second, then it stops. If Photobooth is open but behind another program,

  • Error about retrieving dependency MStudioCommon.2012

    I am developing applcaiton based on visual basic .net and I would like to build installation package by installation shield. However, when I built the setup project, I am getting an error , so i can't build install package. When I was building setup

  • ACS 1113 recovery issue

    First time when I boot the ACS 1113 and access through serial port , whenever i put login promp Administrator not getting any password promt for last 40 mnt only cusor blinking. Try to recover through CD that also not performing for last two hrs. Kin

  • Safari redirect hijack - may have iOS5 virus or trojan

    This morning, while clicking on a link on a website, I was redirected to a **** site. Not so unusual, eh? Except this was on my iPhone 4s, running iOS 5 and Safari, and the same link is good on my Mac desktops. Clearing data, history, caches, and a r