How to register to an AFTER_COMMIT event ?

Dear community members,
within a transactional framework, developped in ABAP-OO (SAP NM 7.0), I would like several methods, mainly clean-up methods, to run after a 'commit work' has been triggered. The transacational framework, however, does not trigger the 'commit work' itsself, but has to listen on the 'commit work' event and to execute the clean-up methods.
Does anybodya of you know, how such a 'listener' class could look, or how one could react on the 'COMMIT WORK'-event 'or even an 'AFTER COMMIT'-event in an ABAP-OO context?
Thanks and best regards
Stefan

Define a global class (or using your class, define methods):
class post_commit_handler definition.
  public section.
    class-methods trans_finished for event transaction_finished
    of cl_system_transaction_state
    importing kind.
endclass.                    "post_commit_handler DEFINITION
class post_commit_handler implementation.
  method trans_finished.
    set handler post_commit_handler=>trans_finished activation false.
    "  clean up
  endmethod.                    "trans_finished
endclass.                    "post_commit_handler IMPLEMENTATION
In the code just before you trigger the commit:
set handler post_commit_handler=>trans_finished.
matt

Similar Messages

  • How to register "Enter" event  in sap xrpm

    all expert:
    how to register "Enter" event  in sap xrpm

    all expert:
    how to register "Enter" event  in sap xrpm

  • How to register custom FacesPageLifecycle?

    Hi,
    In 10G, to customize the way errors are presented to the users I was extending ADFPhaseListener to provide my custom FacesPageLifecycle.
    However, in 11G ADFPhaseListener is marked as deprecated saying that to customize the lifecycle I must register a listener in adf-config.xml.
    This does not tell me how to register a custom page lifecycle. The latest developer's guide is still referring the SRDemo way (see section 37.3.1).
    What is the 11G way of achieving this?
    Thanx!
    Olivier

    This works for me in TP2.
    package test.view;
    import oracle.adf.controller.v2.lifecycle.PagePhaseEvent;
    import oracle.adf.controller.v2.lifecycle.PagePhaseListener;
    public class MyPagePhaseListener implements PagePhaseListener
       public void afterPhase(PagePhaseEvent event)
          System.out.println("In afterPhase " + event.getPhaseId());
       public void beforePhase(PagePhaseEvent event)
          System.out.println("In beforePhase " + event.getPhaseId());
    }and the adf-config.xml file entry:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config"
                xmlns:sec="http://xmlns.oracle.com/adf/security/config">
      <!-- etc -->
      <adfc-controller-config xmlns="http://xmlns.oracle.com/adf/controller/config">
        <lifecycle>
          <phase-listener>
            <listener-id>MyPagePhaseListener</listener-id>
            <class>test.view.MyPagePhaseListener </class>
          </phase-listener>
        </lifecycle>
      </adfc-controller-config>
    </adf-config>

  • How to register DI RfcSvr as an Windows service

    Every time I must manully start DI RfcSvr program on windows. I want to know how to register it as a Windows service?
    I try to run below command:
    ntscmgr install SAPRFCService -b "D:\Business Objects\BusinessObjects Data Services\bin\rfcsvr.exe" -p "-a DI_SOURCE -g HOST_NAME -x gateway_name"
    It successfully register the command to NT service but It can not start. The error message in Event Manager is:
    Event ID 7009, Timeout (30000 milliseconds) waiting for the SAPRFCService service to connect. I though this is caused by no return code returned by program rfcsvr.exe.
    Anybody has good idea?
    TIA

    Hi,
    I'm in the same situation, I need to know if it's possible to record DI RFCSVR as a Windows service or not.
    When I try to start the service, I get the same error
    Event ID 7009, Time (30000 milliseconds) waiting for <name Service> of service to connect.
    I have searched without success guides.
    Any suggestions.

  • How to register EEM Tcl script

    Hello,
    I've a EEM tcl script in bootflash. How to register EEM script. I did the following but it couldn't locate the script in bootflash.
    switch2(config)#event manager policy bootflash:eem-stuckcpu.tcl type user
    EEM configuration: policy file bootflash:eem-stuckcpu.tcl could not be found
    switch2(config)#
    switch2(config)#event manager policy eem-stuckcpu.tcl type user          
    EEM configuration: policy file eem-stuckcpu.tcl could not be found
    Thanks,
    /aa

    You need to configure:
    event manager directory user policy bootflash:
    Then use:
    event manager policy eem-stuckcpu.tcl

  • How to register notification using NSDistributedNotification ?

    I am working on Xcode4.2 and IOS 5 . I had gone through the Notification document, I have seen we can listen to other application's event using NSDistributedNotification.I tried to register with NSDistributionNotification. But i am getting compilation error. Later i checked framework class, there i don't find the NSDistributedNotification.h. Where can i found this class and how to register with this register the notification using NSDidtributedNotification.
    Thanks
    Pushpa

    Compare the Mac and iOS developer library Notification Centers. Despite the fact the document text is identical, including references to NSDistributedNotificationCenter, notice the OBJECTIVE-C REFERENCE heading in the Table of Contents includes NSDistributedNotificationCenter only in the Mac developer library.
    Mac
    https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Notifica tions/Articles/NotificationCenters.html
    iOS
    https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Notifica tions/Articles/NotificationCenters.html

  • I get double entries to my calendar when I sync.  How do I delete the extra event.

    I have double entries to my calendar after a sync.  How do I prevent this from hapening and how do I delete the extra events.

    I installed iSync from my SL backup and all went well as it showed up in my applications and when brought up on the screen, launched, I reset the history.
    When trying to sync my calendars again I first uncheck all calendars via iTunes, syncronized and then check the one I wanted and syncronized again. No difference, ended up with many multiples.
    I then searched a little further using spotlight typing in just iSync and a developer file showed up that looks like it is designed to reset the history but no sure. I opened in in Komodo but don't know how to proceed from there.
    Here is the file: Under Usage it seems I could run this file but not sure how to. Could you help with this or am I on the wrong track?
    Thanks
    LarryB
    #!/usr/bin/perl
    # usage:  resetsync.pl [push clientid| full | list]
    # Copyright (c) 2007, Apple Inc.  All rights reserved.
    # Usage: To reset sync history run this script with no arguments or the single
    #command line argument "full".  To push the truth from a client run this script
    #with two arguments, the keyword push and the client identifier. Known client
    #identifiers can be listed if you run this script with the single command line
    #argument "list".
    use SyncServices;
    my $syncmgr = ISyncManager->sharedManager();
    if($ARGV[0] eq "push") {
      # Have a client push the truth. Note that pushing the truth can cause data loss
      # if other clients have registered schema extensions.
      if(@ARGV != 2) {
              print STDERR "resetsync.pl [push clientid| full | list]\n";
      my  $client = $syncmgr->clientWithIdentifier_($ARGV[1]);
      if($client) {
              $syncmgr->pushTruthFromClient_forEntityNames_($client,$client->enabledEnti tyNames());
    elsif($ARGV[0] eq "list") {
      # Get a listing of registered client identifiers
      my $clientIds = $syncmgr->allClients->valueForKey_("clientIdentifier");
      print join("\n", listOfPerlStringsFromNSArrayOfNSStrings($clientIds)) . "\n";
    elsif($ARGV[0] eq "full") {
      # Completely reintializing sync state
      $syncmgr->reallyResetSyncData();
    else {
      # Resetting sync history
      $syncmgr->resetSyncData();

  • How to register the recipient when create job by function

    I am now use JOB_OPEN , JOB_SUBMIT and JOB_CLOSE to create a job in the program. And need to post the result of the report to the person by email.
    Can you tell me how to register the recipient when create the job.
    ( in sm36, it is easily to do but how to do in coding? )
    regards,
    slam

    Hi
    I think in Back ground using the above fun modules you can't send a mail to the receipient.
    see the use of the above fun modules;
      IF p_bjob = 'X'.
        CONCATENATE sy-cprog sy-datum sy-uzeit
                    INTO jobname SEPARATED BY '_'.
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = jobname
          IMPORTING
            jobcount         = jobcount
          EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
        CALL FUNCTION 'GET_PRINT_PARAMETERS'
          IMPORTING
            out_archive_parameters = arc_params
            out_parameters         = print_params
            valid                  = valid
          EXCEPTIONS
            archive_info_not_found = 1
            invalid_print_params   = 2
            invalid_archive_params = 3
            OTHERS                 = 4.
        IF valid = chk.
          SUBMIT ybrep
                          WITH < sel Screen>
                          AND RETURN
                          USER               sy-uname
                          VIA JOB            jobname
                          NUMBER             jobcount
                          TO SAP-SPOOL
                          SPOOL PARAMETERS   print_params
                          ARCHIVE PARAMETERS arc_params
                          WITHOUT SPOOL DYNPRO.
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              jobcount             = jobcount
              jobname              = jobname
              strtimmed            = 'X'
            EXCEPTIONS
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              invalid_target       = 8
              OTHERS               = 9.
          IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            MESSAGE i029 WITH jobname.
          ENDIF.
        ELSE.
          MESSAGE s000 WITH text-003.
          STOP.
        ENDIF.
      ENDIF.
    Reward points if useful
    Regards
    Anji

  • How to register multiple ipods on same email account

    how do register multiple ipods using the same email account?

    Maybe here
    How to use multiple iPods, iPads, or iPhones with one computer
    You can have an unlimited number of devices that you own or control for private use tied to one iTunes account. But you have only have five tied to one iCloud account.
    To alllow FT and Messagibng between them see:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime

  • How do I delete a calendar event in my iphone?

    How do I delete a calendar event in my iphone? It allows me to "edit" the event but not to totally delete it. Or at least I can't seem to find a "delete" option anywhere!

    Did you create the event somewhere else?  A lot of time when u create it on lets say PC or mac, you wont be able to edit it unless its from the same device. 
    Its also possible its created under a mail account.  I would suggest making all your events via icloud, then u should be able to edit it on all platforms regardless on which device made the event.

  • How to register custom report under Custom Development Application

    Hi 2 all
    How to register custom report under the Custom Development application in R12 vision DB, and also confirm location/folder of Custom Development application in R12.
    Thanks
    Zulqarnain

    Hi,
    You may or may not need to "register" the workflow - it depends on the changes that you made and which Item Type you modified. Some applications are essentially hard-coded to use a specific item type and process, some hard-coded to use an item type but you can configure the process to use, and some allow you to specify which item type and which process to use.
    Without knowing exactly what you have done, though, there is no specific advice that anyone can give you here on what you need to do, apart from to ensure that you have saved the new definition to the database.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to create a table with events in smartforms?

    How to create a table with events view in smartforms?
    It doesn't like general table with header, main area and footer.
    for example:
    in smartforms: LE_SHP_DELNOTE
    table name is TABLEITEM(Delivery items table)

    Vel wrote:
    I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
    Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
    Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
    EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
    EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
    I'm using Oracle 10.2.0.4 version.
    Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements.

  • A friend created 3 accounts on his iPhone 5 but forgot the passwords. He can't reset the password as yahoo address is no longer valid. Erasing the phone doesn't solve the issue. How to register the phone with Apple?

    A computer illiterate friend created 3 accounts on his iPhone 5 but forgot the passwords. He can't reset the password as his yahoo address is no longer valid. Erasing the phone doesn't solve the issue as the Apple server identifies the hardware as registered. How to register the phone with Apple?
    I helped him create a new email address and new iCloud account on my Mac but when we try to register the phone with Apple it says: Maximim accounts limit reached for this device. How can he register the phone? I read different threads and found out that only Apple care can do that. We're in Romania and don't know where to call. Any suggestions on how we fix this?

    When I checked the support site for Romania, you apparently don't have an Apple Care contact center.  You "may" try calling the US Apple care number to verify the account and have the password reset sent to a different email address.  800-694-7466

  • How to register the phone number of my friends to imessage,and i able to contact them or call them?

    I buy my ipad in qatar duty free i mean ipad4 wifi +cellular i thought i can use it for text or call by means of phone number only but im dissapoint when i used it and found out that i have to register all numbers to imessage and i cannot find how to register it.please help me to solve this matter.

    You have a password, so good move on your part.  Whether you erase it or the thief does, they still get to use the iPhone as theirs.  Which is more important (pick one), protecting your data or punishing the thief?
    Ringing occurs at the carrier.  Chances are you're going to voicemail after only two or three rings.  If you have an iCloud backup also a good move.  Re-read my question in the first paragraph.

  • How do I move files from Event Library to Project Library?

    How do I move Files from Event Library to Project Library? I tried drop and drag, that didn't work. I am new to Apple. I have always had a windows box b4 this. If anyone can help, please do. Thanks
    Alain

    welcome argardner to the  boards..
    you're missing the concept of iM .. you don't move 'files' from Event to Project Library.. Events is the big box of all your imported clips; now, from that box of bricks, you drag the clips into all kind of projects.. you can 're-use' the same clip again'n again in many projects.. you can use all clips of all Events in one Project.. or all clips of one Event in two projects.. or..
    spend some time here:
    http://www.apple.com/ilife/tutorials/#imovie
    http://manuals.info.apple.com/en/iMovie08_GettingStarted.pdf
    the concept of Events & Projects, Clips and Libraries is at first glance very different to 'normal' editing apps, but you'll get convenient to it within minutes..

Maybe you are looking for

  • 1080p via the DVI port

    Is it possible to connect a 1080p TV to the Mac Pro? This would mean using a DVI to HDMI cable. And assuming the connection works, would that monitor display 1920x1080 pixels? What I'm trying to do is get a large display at a readable pixel density (

  • I can't use my ID to shop, it was locked please open again

    I can't use my ID to shop, it was locked please open again

  • ITunes 5 Installation

    Hey I tried to update my iTunes from the internet from the iTunes website and now my iTunes keepes saying it has encountered a problem and must close. I have unistalled it and reinstalled it and it says the samething! HELP! I'm going crazy without my

  • Regarding SOP

    I have a BPP for mass processing of the transfer of of SOP data to Demand Management, but the process does not function (MC8E).

  • How do I disable automatic updates?

    I am going to have to use Firefox version 28 forever, exposing myself to many security risks in the process, because I do not like the drastic redesign of the interface in version 29 and Mozilla have not included an option to switch to the old interf