Atonomous Transcation

Can some one expalin what autonomous transcations is and where exactly it is used and can we have an exception in a trigger?

Here is the simple example,
create or replace procedure p1
as
pragma autonomous_transaction;
begin
insert into log values('08-may-1981','sample entry1');
commit;
end;
create or replace procedure p2
as
begin
delete from log where operation='sample';
end;
create or replace procedure p3
as
begin
p2;
update log set operation='sample1';
p1;
rollback;
end;
There are 3 procedure p1,p2 and p3...P1 is having autonoums transaction and it's commited. p2 is not having autonomous.. Now, from p3 you are invoking p2 and updating log to some sample1..
Then p1 is being called..After p1 you are rolling back.. What will happen know,
Only update statement which is done in p3 and delete which is done in p2 will be rolled back.. The new record will be inserted into log in p1 and it'll be commited as it's autonoumous transaction..
Hope u can understand now..
Thanks
Raja

Similar Messages

  • Multiple create methods of entity beans in single transcation

    Hi,
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transaction type is Container Managed for all its methods.
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creating two entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch block.
    I want that the entire operation be under just one transcation so i have also given the transaction attribute as Required for all methods of Session bean and Entity Beans.
    However if i pass invalid parameters to second create method so that it generates exception then still the first create statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?

    Hi Ashwini,
    "Ashwini" <[email protected]> wrote in message news:400291af$[email protected]..
    I have some entity beans with CMR. I am managing these entity beans with a Stateful session bean whose transactiontype is Container Managed for all its methods.
    >
    In one particular method of this Session bean I am calling two entity bean's create method. i.e I am creatingtwo entity beans through home.create() methods. There are two home.create() methods one after another inside a try catch
    block.
    >
    I want that the entire operation be under just one transcation so i have also given the transaction attribute asRequired for all methods of Session bean and Entity Beans.
    >
    However if i pass invalid parameters to second create method so that it generates exception then still the firstcreate statement is successful and database is updated.
    what i want is that the first create also should be roll backed.
    How can i acheive this through Container Managed Transaction Session Bean?o Do you use TXDatasource with your entity beans?
    o In CMT transactions are automatically rolled back only when RuntimeExceptions
    are thrown. What kind of exception is thrown in your case?
    Regards,
    Slava Imeshev

  • Transcation and xa connections

    Hi,
    Once I declare a stateless session bean to use container managed transcations, the XA resources I will be using will be automatically initialized to use a global transcation right?
    For example, I allocated a XA connection, and allocate a JMS queue using the XAConnectionFactory, the database connection and the jms queue operation will be under the same global transcation automatically (managed by the container) correct? Or do I need to manuly get/set the XIDs to them?
    Thanks!
    GZ

    I got the answer. No everything is automatic

  • How to lock multiple user for a transcation code at same time is der any tc

    how to lock multiple user for a transcation code at same time is der any tc
    suppose i hav 15 user and i want to lock 10 user for mm02 who can i to it

    Basis can do a export and import transport, still if don't have connection between boxes.
    or
    check this
    http://www.sap-basis-abap.com/abap/copy-program-variants-from-one-to-another.htm

  • How to find the list of users  used  transcation from last 2 days plz urgen

    hi friendd
                   i am in need of  knowing the list of users used transcation in last 2 days
    can any one help me . how to find out the list of  users and used trancation in detail or step by step
    thanks in advance .i know that i can see in st03 but i dont find any user list or trancations .
    apart from that so we have any other transcation to see the user in sap abap box
    regards
    raja

    This info has been posted before but here you go (this is an alternative way to Bernhards):
    ST03N, make sure you are in Expert Mode (not Service Engineer)
    Expand Workload
    Expand Total
    Double Click on the day you want to analyse
    You can see transaction details under Transaction Profile -> Standard
    You can see what tx a user has started under User & Settlement Statistics -> User Profile
    If you are not seeing any data then speak to your Basis administrator about what they are doing with the log files.

  • How to capture the Status code in Web application Transcation monitoring if we are using multiple Request

    Hi Team
    We would like to monitor 12 url,s which requires Authentication. Hence i have added the same in one Single Web application transcation template.
    i have added the below info to the get the Stats code displayed in Alert
    Status code is $Data/Context/RequestResults/RequestResult["1"]/BasePageData/StatusCode$
    when i recived a alert it gave the Status code of the 1st Request
    hence i changed the same as
    Status code is $Data/Context/RequestResults/RequestResult["12"]/BasePageData/StatusCode$
    But still i am facing the same issue .
    My first request shows me a status code of 200, and my 12th Request comes with 500 but in the alert i get 200 but it should be 500.
    Kindly help me in how i can get the Status code for the multiple  Request.
    Regards
    Sriram

    Hi Sriram,
    Please run the test of your 12th Request, view full result and check if Status Code is 200.
    Meanwhile, you can run the URL manually to check the result.
    Niki Han
    TechNet Community Support

  • Ale transcation data uploading  for outbound and in bound system

    hi,
       can any tell me what is idoc trirrering prgm when we uploading transcational data for invoice in outbound, inbound system. if u have brief information ALE outbound interfaces for transactional data such as    invoice and SD send me

    hi bharathi j
    go through these links
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    regards
    Nagesh.Paqruchuri

  • How to use db transcation for an OleDb token places in a loop?

    There comes an interesting problem for you, it seems very easy in code:
    using (OleDbConnection con = new OleDbConnection(……))
    OleDbCommand cmd = new OleDbCommand(con);
    OleDbTranscation trans = con.BeginTranscation();
    cmd.CommandText = "update xxx set field1=@field1,field2=@field2 where field3=@field3";
    //Suppose "pCollection" is a collection variable defined before, and this is a stack type.
    Point p = pCollection.Pop();
    while(pCollection.Count!=0)
    cmd.Parameters["@field1"].Value = p.Field1;
    cmd.Parameters["@field2"].Value = p.Field2;
    cmd.Parameters["@field3"].Value = p.Field3;
    cmd.Parameters["@field4"].Value = p.Field4;
    p = pCollection.Pop();
    cmd.ExecuteNonQuery();
    trans.Commit();
    The codes above seems roughly right, however if you run it and you will find that only the last record is updated, because the parameters of SqlCommand are overridden by the latter time of loop, and all the previous loop's parameters are referring to the same
    parameters of SqlCommand, so only the last time the parameters' values take action. And all the transcations are pointing to the last time of updating record.So my question is How
    to make each updating statement takes action within the whole transcation (each updating SQL has different values of parameters)?
    ASP.NET Forum
    Other Discussion Forums
    FreeRice Donate
    Issues to report
    Free Tech Books Search and Download

    The below worked for me:
    using (OleDbConnection con = new OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString))
    OleDbCommand cmd = new OleDbCommand();
    cmd.Connection = con;
    con.Open();
    System.Data.OleDb.OleDbTransaction trans = con.BeginTransaction();
    cmd.Transaction = trans;
    cmd.CommandText = "update Category set Category=? where CatId=?";
    int i = 2;
    cmd.Parameters.Add("@field1", OleDbType.VarChar);
    cmd.Parameters.Add("@field2", OleDbType.Integer);
    while (i != 0)
    cmd.Parameters["@field1"].Value = i.ToString();
    cmd.Parameters["@field2"].Value = i;
    i--;
    cmd.ExecuteNonQuery();
    trans.Commit();
    Fouad Roumieh

  • Sales order going to dump when we enter product in the transcation

    Hello Gurus,
    I am facing a problem in the sales order, when i enter a product in the transcation(TA) it going to dump........It is showing the message like this.........,
    What happened?......
        Error in the ABAP Application Program
        The current ABAP program "SAPLCRM_MKTTG_PF_SEL_INFOSET" had to b
         because it has come across a statement that unfortunately cannot be      
         executed.
    Error analysis......
        An error occurred when executing a Remote Function Call.
        "CPIC-CALL: 'ThSAPOCMINIT'#Unable to determine host address: 
          NiHostToAddr failed "
        Status of connection.... "CODE=CM_PRODUCT_SPECIFIC_ERROR -1 -1  
        SAPCODE=497
         CONV= " Internal error code.... "RFC_IO5"
        There is an error in the communication system. To clarify
        and resolve the error, contact your system administrator.
        Last error logged in SAP kernel
        Component............ "NI (network interface)"
        Place................ "SAP-Gateway on host IGINXMIEP / sapgw00"
        Version.............. 38
        Error code........... "-2"
        Error text........... "hostname 'iwdf7yte.wdf.sap.corp' unknown"
        Description.......... "NiHsLGetNodeAddr: hostname cached as unknown"
        System call.......... " "
        Module............... "nixxhsl.cpp"
        Line................. 223
        The error reported by the operating system is:
        Error number..... " "
        Error text....... " "
        Please provide me the solution...........its very urgent
    Thanks and Regards
    Chandramohan
    I dont Mind to reward full points............

    Hi julius,
    Thanks for the reply,
    The settings in the SAP Note, which you have given....they are in already in place.
    Regards
    Chandramohan

  • No.of Transcations in a Database

    hello,
    we are using oracle 10g on solaris 5.6.
    How can i find out the number of transcations that are done on a database in 1 day or number or reads and writes on the datafiles in a day.
    Thanks for any help.

    You can calculate the number of transactions that have ran since the last start of the database using v$sysstat statistic values but Oracle does not store the transaction count except as part of statspack and AWR snapshots. Depending on if and how often you take snapshots (and if you have a performace pack license) you could potentially use data from these.
    set echo off
    -- SQL*Plus script to calculate Transactions Per Second for version 8+
    -- 20020513  Mark D Powell   New, cre as resp 2 metalink req fr ver 7 Query
    --  Version 7 Query:
    --  SELECT SUM(s.value/
    --  (86400*(SYSDATE - TO_DATE(i.VALUE,'J')))) "tps"
    --  FROM V$SYSSTAT s, V$INSTANCE i
    --  WHERE s.NAME in ('user commits','transaction rollbacks')
    --  AND i.KEY = 'STARTUP TIME - JULIAN'
    select
      round(sum(s.value / (86400 * (SYSDATE - startup_time))),3) "TPS"
    from
      v$sysstat  s
    ,v$instance i
    where s.NAME in ('user commits','transaction rollbacks')
    /For file IO information look at v$filestat.
    HTH -- Mark D Powell --

  • Planning data changes through CJR2  transcation

    Dear all,
    Kinldy let me know how to track changes made in my financial planning through CJR2 . because f these changes , my project planned datas are changed and gross margin reduced.
    I wish to know, is it possible to track the changes made using CJR2 transcation ?  like , when , what and which WBS changed .
    i tried CJI4 but no result .
    Appericiated your help as usual,

    Thanks for your reply  , But my concern is not to get the old value there , I have a hardcopy to serve that purpose, but I really want to know who did it ?  Like user name , time , which WBS got changed . I have tried CJI4 to capture this changes , but I am not getting any values under CJI4.  Is there any other transaction available  to track this changes ?
    Eg. For sales order , any time will get a change report on line by line , I am looking something similar to that .

  • How to add new trip schemas in Pr05 Transcation?

    Hi Experts,
    We have 6 trip schemas for trip provison variant:10.Current only three trip schemas are appearing in "Choose a trip schema" pop up in  PR05 transcation.I want  to bring all remaining trip schemas also in Pr05.
    I have tried to find out the relevant settings in the img node "Define Schema and Individual Field Control" under "Dialog Control", but i couldn't.
    Please guide me  how to add  trip schemas in Pr05 Transcation?.
    Thanks,
    JA.

    Hi Jobish
    Can you confirm me how many custom trip schema's you have created?? As you have mentioned earlier as 6, does this Include with the Std Schema's (Domestic Trip,Travel calendar, Travel Planning, Weekly report, Trip Advances)???
    Kindly let me know your schema's & come with screen shots of V_T706S or FITVFELD T-code
    Cheers
    Pradyp

  • Error in Transcation PT 60

    HI Techies,
    When iam trying to run the transcation PT60 (time evaluation) iam getting the error " NO ENTRY IN THE TABLE T001P FOR KEY,PERSON REJECTED"  i debugged the corresponding  report also,buit still unable to find out the same,as this is most important to me any one pls have look at this one and give me a valuable solution, thanks in advance.

    Can you check the Link may you will get some idea
    http://sap.ittoolbox.com/groups/technical-functional/sap-hr/error-when-run-pt60-2134515?cv=expanded
    Kanagaraja L

  • Doubts in transcation

              Hai,
              1)
              I have two session bean which do some database operation.
              And in my deployment descriptor I have set transcational attribute
              as Required, as well as transcation type as bean.
              I have another bean which calls the methods of other two
              session bean.And in my deployment descriptor I have set transcational attribute
              as RequiresNew, as well as transcation type as bean.
              Entire thing is working fine for the first time.I mean it gets rollbacked when one
              gets fails.But when I do it next time (without restarting weblogic server) it's not working.I mean even one gets fails
              other gets committed.
              What should I do inorder to work well.
              2)
              When I do it using container managed transction, i couldn't accomplish
              transcation concepts.I mean even one gets fails
              other gets committed.
              Thanks in advance
              With Regards,
              Vinoth.c
              

    Hi Sitaram,
    - which ref table and ref field is suggestable: : For clarity include currency and unit fields in the same Z-table
    - which techincal settings is suggestable: This heavenly depends on the number of expected records and the type of use.
    You can use SE03 -> Change Object Directory entries for assigning a local object to a package.
    Regards,
    John

  • Set the field value, call transcation T-CODE in CRM

    Hello
       I face the proble as follow: select the field into the itab,and set the field itab-field to call transcation T-CODE in CRM.
       exp:call T-CODE:"CRMD_BUS2000111". when I execute the program, display the opportunity value screen, not the init select&result screen.
    Thanks!

    Please reward and close your other post regarding a similar problem.
    If you don't want the initial screen, you have fill the BDC data for the initial screen and then call the transaction with mode 'E'. I gave the same solution to your previous question.

Maybe you are looking for

  • Find via network does not work

    Hi..I´m having a big trouble when trying to find images by it´s keywork when they are stored in my company server. Let´s explain I take some photos or even work with Photoshop, Illustrator or InDesign files. I set different keyword for the files and

  • Flash Panels for Flash Builder?

    Hi, It would be great if Flex Developers can create their own Flash Panels for Flash Builder. Photoshop and Flash CS4 has this feature, why not Flash Builder? Mariush T. http://mariusht.com/blog/

  • Email web form

    so i am trying to make a web form with 3 text entrys options name: email: message: and i also want this web form to send to my email but no matter how many youtube tutorials i have followed it never seems to work i have been spending hours entering i

  • Contacts on iPod - first entry is empty (blank)

    Hi all, Something that bugs me on my contacts list (on my iPod nano and iPod 4th G) is that the first entry is blank. I would like to know why this occurs and how I can rectify it. Thanks in advance. Anthony.

  • Save as-funcion - help needed

    Hello, The question is simple but the solution for me isn't so simple. An eps-file in Illustrator must be saved as an ai-file with the same name, but the extension must be ai instead of the original eps-file. Is it also possible to change the color p