Perform ON COMMIT doesn't work (Try it)

Has anyone tried a PERFORM ON COMMIT within a BADI? It doesn't work and i don't know why.
I am working with the HR Module, and i have a BADI, which is fired when the user hits the 'SAVE' button (PA30 Transaction).. when this happens, i execute a PERFORM ON COMMIT and the subroutine is never called...
Does anyone know anything about this?
Regards

In your BADI submit a function module [IN BACKGROUND TASK|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=inBACKGROUNDTASK&adv=false&sortby=cm_rnd_rankvalue] to update the second infotype via FM [HR_INFOTYPE_OPERATION|https://www.sdn.sap.com/irj/scn/advancedsearch?query=hr_infotype_operation&cat=sdn_all] (create a RFC enabled Z-FM that call the standard FM)
Regards

Similar Messages

  • Create cl_crm_bol_entity and commit doesn't work!

    When i select a row in my first tableview the my second tableview will be filled.
    In my second tableview i have a insert button to insert an extra record in the tableview. I redefined the EH_ONINSERT event with the following code:
    DATA: lr_wrapper   TYPE REF TO cl_bsp_wd_collection_wrapper,
            lr_wrapperParent TYPE REF TO cl_bsp_wd_collection_wrapper,
            lr_parent    TYPE REF TO cl_crm_bol_entity,
            lr_currentEntity    TYPE REF TO cl_crm_bol_entity,
            lr_newEntity TYPE REF TO cl_crm_bol_entity,
            lr_firstEntity TYPE REF TO cl_crm_bol_entity,
            lr_core     TYPE REF TO cl_crm_bol_core,
            lr_transaction TYPE REF TO if_bol_transaction_context,
            lv_event     TYPE REF TO cl_htmlb_event_button.
      DATA: lr_bo_prop   TYPE REF TO if_bol_bo_property_access.
       TRY.
         "get the core object out of the factory
          lr_core = cl_crm_bol_core=>get_instance( ).
         "Method starts Business Object Layer
          lr_core->start_up( '/CERNUM/SURVEY' ).
        CATCH cx_crm_genil_general_error.
          RETURN.
      ENDTRY.
      TRY.
          lr_wrapper ?= typed_context->ELEMENTS->collection_wrapper.
          lr_currentEntity ?= lr_wrapper->get_first( ).
          lr_parent = lr_currentEntity->get_parent( ).
          "Create a new entity
          lr_newEntity = lr_parent->create_related_entity( iv_relation_name = 'DynElementsRel' ).
          CHECK lr_newEntity IS BOUND.
          DATA property TYPE string.
          "Set some default values
          property = lr_currentEntity->if_bol_bo_property_access~get_property_as_string( IV_ATTR_NAME = 'APPLICATION_ID' ).
          lr_newEntity->if_bol_bo_property_access~set_property( IV_ATTR_NAME = 'APPLICATION_ID'
                                                             IV_VALUE     = property ).
          property = lr_currentEntity->if_bol_bo_property_access~get_property_as_string( IV_ATTR_NAME = 'SURVEY_ID' ).
          lr_newEntity->if_bol_bo_property_access~set_property( IV_ATTR_NAME = 'SURVEY_ID'
                                                             IV_VALUE     = property ).
          lr_newEntity->if_bol_bo_property_access~set_property( IV_ATTR_NAME = 'ID'
                                                             IV_VALUE     = '7000' ).
          "Add the created entity to the collection.
          lr_wrapper->add( lr_newEntity ).
          me->typed_context->ELEMENTS->visible_first_row_index = me->typed_context->ELEMENTS->collection_wrapper->size( ).
          lr_core = cl_crm_bol_core=>get_instance( ).
          lr_transaction ?= lr_core->get_transaction( lr_newEntity ).
          if lr_transaction->check_save_possible( ) eq abap_true.
            if lr_transaction->save( ) eq abap_true.
              lr_transaction->commit( ).
            else.
              lr_transaction->rollback( ).
            endif.
          endif.
        CATCH cx_root.
          RETURN.
      ENDTRY.
    This code works works perfect, but no record is added to my tableview and also not added to de db. what is wrong with it?

    Hi,
    that means that there is an error at saving, and I assume the error is not propagated to the bol layer, so you do not receive an error. I advise you debug the commit.
    Best regards,
    Erika

  • Commit doesn't work via operation binding

    hi,
    i try to commit changes made by selectonechoice boolean .
    why can't this commit invoked in backing bean not work?
    OperationBinding operationBinding = getBindings().getOperationBinding("Commit");
    operationBinding.execute();
    at the same time when i call commit button, everything gets commiited
    jdev 11.1.2.3
    Edited by: grodno on Feb 12, 2013 1:57 AM

    the chechbox is a column's value which is based on VO->EO , it reflects changes to the underlying DB right after user cliicks checkbox.
    <af:column sortProperty="#{bindings.DcaRegisterLinesV1.hints.Selected.name}" filterable="true"
    sortable="true" headerText="#{bindings.DcaRegisterLinesV1.hints.Selected.label}" id="c1"
    width="30">
    <af:selectBooleanCheckbox value="#{row.bindings.Selected.inputValue}"
    label="#{row.bindings.Selected.label}" autoSubmit="true"
    valueChangeListener="#{registerBean.socSelectedChangeListener}"
    shortDesc="#{bindings.DcaRegisterLinesV1.hints.Selected.tooltip}" id="sbc1">
    </af:selectBooleanCheckbox>
    </af:column>
    functionality works fine, since it works when i press commit button after the click
    so that i can see changes in the DB immediatly
    the pagedef uses the same definition in pagedef that was created upon button creation.
    sure commit is defined in pagedef
    <action id="Commit" RequiresUpdateModel="true" Action="commitTransaction" DataControl="AppModuleDataControl"/>
    could it be connected with am tuning (some postponed posts), vo passivation mode?
    Edited by: grodno on Feb 12, 2013 2:43 AM

  • Commit() doesn't work...why?

    Hi,
    I have a problem with this code
          user = getProfilsUtilisateursLogin();
          user.setMaxFetchSize(1);
          user.setNamedWhereClauseParam("var_CpCdUtilisateur", userLogin);
          user.setNamedWhereClauseParam("var_ChPassword", null);
          user.executeQuery();
          if (user.getEstimatedRowCount() > 0)
            Row currentuser = user.first();
            Number currentNbEchecConnexion = (Number)currentuser.getAttribute("NbEchecConnexion");
            currentNbEchecConnexion = currentNbEchecConnexion.add(1);
            currentuser.setAttribute("CdUtilisModif", userLogin);
            currentuser.setAttribute("NbEchecConnexion", currentNbEchecConnexion);
            getTransaction().commit();
          }[edit]
    I remake the view object and it works.
    [edit]
    Thanks for your help.
    Edited by: user10925470 on 30 août 2009 23:16

    Couple of things:
    1) When posting to this forum, please let us know which version of JDeveloper you're using, which technologies you're using (in this case ADF BC) and so on. Help us to help you by giving us the details we require.
    2) Otherwise in your example, is the final System.out.println being called or is it throwing an exception? Have you traced this in the debugger?
    Alternatively look at the following section in the Fusion Dev Guide http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcqueryresults.htm#CHDBBEEB to see how to turn on the diagnostics option. From the log window you should then be able to see if the ADF BC is "really" commiting your work to the database (you see an update statement as well as a commit).
    Btw, do you realize the oracle.jbo.domain.Number class has an add() method? You don't need to drop the Number to an int, add 1, then convert it back to a oracle.jbo.domain.Number.
    Let us know how you go.
    Cheers,
    CM.

  • I can no longer burn CDs  - "may be incompatible with this disc burner, try slower speed, try another make of disc"  Still doesn't work

    I can no longer burn CDs  - "may be incompatible with this disc burner, try a slower speed, try another make of disc"  Tried that, still doesn't work.

    Try a free burning utility which allows you to turn off the laser for test burning (so you don't waste media).  Try burning a test CD outside of iTunes.  If it works it's iTunes. If it doesn't work it could be computer software or hardware but then we know how to proceed.
    List of burning software on pure-mac.com - http://www.pure-mac.com/diskfile.html
    Burn - http://burn-osx.sourceforge.net/Pages/English/home.html - includes basic DVD authoring

  • Restart command doesn't work

    I believe the following problem began when I updated to 10.4.9. I can't be absolutely sure but the timing seems about right. I've since updated to 10.4.10 in an effort to fix it, but haven't succeeded.
    The problem is that when I select the Restart command in the Apple menu the computer will begin the process, all open apps will be quit, the finder will quit, my desktop will go to blue to a few seconds. Then the monitor will go blank. Then nothing after that. I DO NOT get the startup chime. The machine is still powered on, the light above the power button is still lit. If I leave the machine for any length of time the fans will start speeding up gradually until they're at full tilt. After 4 or 5 minutes it becomes obvious that nothing is going to happen, so I need to manually shutdown via the power button.
    Does anyone know what logs I can post here to help in the diagnosis? This also happens if any installer application needs to perform a restart, ie Software Update.
    Thanks,
    Chris

    Hi chris catalano-
    I have had updates make my machine do some crazy stuff just as you describe. I would actually let it go for 15 or 20 minutes before declaring it a no-go.
    If that doesn't work, try resetting the SMU and see if that helps: How to reset the SMU on a Power Mac G5 (Late 2004) or Power Mac G5 (Late 2005)
    Luck-
    -DaddyPaycheck

  • I cannot use any external monitor, it appear like the port doesn't work , i'm using the mini-dvi port with a VGA adaptor ,

    I've always used the port normally with different monitor but by a couple of weeks it appear like no signal come out.
    Does Anyone knows what can i do ? i.e. How to check or reset the Mini-dvi port ? or if there's any key on the keyboard that can habilitate it or not ?
    Any Help will be appreciate
    Thanks

    Welcome to Apple Support Communities
    You don't have to do anything to make the port work. Reset the SMC > http://support.apple.com/kb/HT3964
    If it doesn't work, try with another monitor to see if it works or another cable. If you haven't got another display, take the MacBook Pro to an Apple Store or reseller, so Apple will test the port and see if it works correctly

  • My ipod touch 3G the bottom doesn't work. How do i fix it?

    Everything on the top works. From the bottom, its slowly moving up. now i'm not able to slide to unlock it.

    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.

  • My iPhone is frozen. Troubleshooting doesn't work

    My shiny new iPhone that I waited in line for on SF on Friday is iFrozen.
    I have about 30 threaded text conversations, 30 contacts, 3 email accounts, 20 photo's, 600 songs, 2 TV shows and 1 movie.
    I understand photo's, songs, video and contacts will synch back to my phone if reset.
    The device is not an iPod, it's a Phone, which means I would HATE to lose my threaded text conversations and have to setup up my email accounts AGAIN (after 3 days of use).
    iPod hard reset? No big deal, less is lost (sometimes).
    Phone hard reset? Not good at all.
    On top of these issues, Safari has crashed on me at least 7 times and while I was playing music on the ipod app i decided to hop over to my text messages to send a message. Once I got in the text message app the ipod app crashed (i.e. the music in my car stopped playing).
    Crashes and now it's frozen.
    Restarting (doesn't work):
    Try restarting iPhone. To turn it off, press and hold the Sleep/Wake button until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone on, press and hold the Sleep/Wake button until the Apple logo appears.
    Unfreeze (doesn't work):
    Does iPhone appear frozen or stuck? Try pressing and holding the Home button for 6 seconds to close a frozen application. Then try restarting iPhone again.
    Is the "reset" option in troubleshooting a hard reset?
    On my Windows Mobile phone I can pop out the battery and it will recover through the safe mode boot without having to hard reset the device.
    Is there another way to unfreeze this thing?
    Current iPhone state: Displaying Home screen, touch unresponsive, on/off switch unresponsive, home button unresponsive.
    Strangely iTunes still recognizes the phone when i connect it to my Mac and goes through the entire synch process fine.
    Why isn't there a soft reset in iTunes to send to the phone?
    Phone calls go straight to voicemail.
    Best,
    Rob
    (good thing I bought 2 8GB's on Friday in SF)

    No, get the screen fixed.

  • Game center doesn't work on imac

    I downloaded the W.E.L.D.E.R game and was using it without issues.
    I then upgraded to Mountain Lion.
    Since then when I start WELDER it stays on the screen for a few seconds then minimizes itself and starts Game Center.
    Game Center gives me a signon screen and an empty green screen that I assume is a playing surface.
    None of the Me, Friends, Games etc. buttons is active.
    I've tried signing on but nothing changes.
    I've tried starting Game Center first but nothing changes.
    What if anything am I doing wrong?

    It sounds like you're seeing the same problem others are discussing here -> Game Center for Mountain Lion not working
    That thread has some good ideas, like bringing up Game Center on a iPhone, iPod touch or iPad, so you can agree to the Terms of Use there.
    If that doesn't work, try skimming through that thread for other ideas.

  • Browser "flip" from portrait to landscape doesn't work consistently

    Hi, I just had to have my iphone replaced at the apple store because of a major dead spot in the touch screen. The second one now has a totally different problem. The feature that allows the orientation of the browser to "flip" between portrait and landscape (depending on the orientation of the phone) doesn't work most of the time. It will flip to landscape, but not go back. Sometimes it will flip opposite to the way I turned it, which means flipping the phone over. Now, it works, but only in one direction and won't flip back unless I hold it still for a few seconds.
    Anyone else experience this?

    you might want to try re-setting the phone. Hold the on/off switch and the center button down together until the screen goes black and the apple logo appears, then let go.
    If it doesn't work, try troubleshooting for the "accelerometer" (thats the mechanism that allows the phone to switch to landscape view mode...

  • Video Doesn't Work iTunes 7.0.1.8 WinXP Pro

    Video doesn't work. So far any video I have downloaded through iTunes has not played at all. Video player opens but displays a flouresent green then white then pink gradient and flickers. Reinstalled three time and reinstalled quicktime also.
    Windows XP Pro Asus 128 mb video card

    First try updating the video card/driver. If it came with the PC when you bought it, goto the PC makers site. If you installed a video card AFTER buying the PC, goto the maker of the video card.
    If updating the video card doesn't work, try the steps here http://docs.info.apple.com/article.html?artnum=303706

  • Downloaded iTunes video - doesn't work

    Hi,
    I am overseas and downloaded an iTunes video direct to my iPad. The download started fine but was going to take a while to download. Whe I looked back soon afer the download had disappeared, I checked the videos on my iPad, it was there. When I tried to play it, it's just a black screen, it's not possible it finished downloading.
    Any thoughts?

    First try updating the video card/driver. If it came with the PC when you bought it, goto the PC makers site. If you installed a video card AFTER buying the PC, goto the maker of the video card.
    If updating the video card doesn't work, try the steps here http://docs.info.apple.com/article.html?artnum=303706

  • For some reason just my iPod5 front camera doesn't work.

    My back camera does work and everytime I select my front camera, it doesn't open. I haven't dropped my ipod and I have reset my settings and turned the power off my Ipod. Is there an obvious way to fix this problem or should I get my iPod repaired?

    You can try a Reset first: hold down the home and sleep button, wait for the Apple logo, let go of the buttons.
    If that doesn't work try a Restore from Backup in iTunes. Still no go? Try a Restore as new.
    If that still doesn't work make a Genius Bar appointment at your nearest Apple Store.

  • My Microphone doesn't work this problem started after i updated to IOS 7.1.1 can someone please help me.

    I just noticed when i Facetimed my friend and she couldn't hear me.

    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without be charged again.  Also, if you have IOS-7, read this.

Maybe you are looking for

  • Two-sided printing with HP Officejet 6310

    When I go to layout the two-sided printing option is off. I'm not able to click on it and turn it on for some reason. How can I fix that? I have printed things double sided before with this printer. It's only with this computer that I haven't been ab

  • GUI_DOWNLOAD: problems with table containing char length 8000

    Hi I have some problems using GUI_DOWNLOAD. Here is some of my code: DATA: g_record TYPE Z_CHAR8000 OCCURS 0 WITH HEADER LINE. z_char8000 is a char of length 8000 insert code to fill data in g_record     CALL FUNCTION 'GUI_DOWNLOAD'       EXPORTING  

  • Vendor line item query

    Hi gurus Is it possible to create query which gives you same information as FBL3N, FBL1N or FBL5N? The problem is that i cannot get the header information right in the standard reports. If someone knows the help is warmly welcome. The infoset creatio

  • ITunes 10.5.2.11 MP3 tag import not working correctly

    Hi, I recently had a hard drive crash so I'm starting from a clean install of Windows XP SP3. Installed iTunes 10.5.2.11. When importing MP3's into iTunes now sometimes iTunes reads the MP3 tags correctly.  Sometimes iTunes ignores the tags and inser

  • Reg:Performence Issue in Web Dynpro for Java.

    Hi All, I have used an so many RFC's(approx 50)RFC's as models in my web dynpro applications and i have called an RFC to fill the EVS which is present in my home view and the problem is RFC holds around 7000 records because of this my application is