COMMIT WORK AND WAIT does not work

Hello,
I know this question has been asked many times in various forums. But the fact remains that there is no definitive solution found for this problem which does not involve WAIT UP TO n SECONDS or SELECT until the DB commit has been completed.
We have an IDoc based inbound interface for creating Project Defintion and WBS Elements. Here is how the code looks like in the processing function module:
* Create Project Defintion
CALL FUNCTION 'BAPI_PROJECTDEF_CREATE'
  EXPORTING
    project_definition_stru = lwa_proj_bapi
  TABLES
    e_message_table         = lt_messages.
* If no errors
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = 'X'.
* Other code
* Create WBS Element (BAPI could not be used because not all fields are allowed to be updated)
CALL TRANSACTION 'CJ11'
Now while creating the WBS Element, transaction CJ11 returns an error that 'Project does not exist'. This is not correct because the same Project was successfully created in the previous step.
It is clear that the problem is because of the delay in database commits.
This happens only with few IDoc's and not all of them. And of course, the problem does not occur if I induce WAIT UP TO n SECONDS after BAPI_TRANSACTION_COMMIT. But this is not the best practice.
The question is why BAPI_TRANSACTION_COMMIT does not wait even though we are forcing it to?
Thanks in advance
Sagar Acharya

Suhas wrote:
But i am baffled that although the COMMIT has happened earlier why is the data not updated in the DB ?
Well, it's just a [COMMIT WORK|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm] and not a [COMMIT WORK AND WAIT|http://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm#@@AND%20WAIT@@COMMIT%20WORK@@]. Let me quote the ABAP help:
If you do not specify the addition AND WAIT, the program does not wait until the update work process has executed it (asynchronous updating), but instead is resumed immediately after COMMIT WORK. However, if the addition AND WAIT is specified, program processing after COMMIT WORK will not continue until the update work process has executed the high-priority update function modules (synchronous updating).
@Sagar Acharya: Well, I thought you were looking for an explanation why sometimes the project isn't created (and you only had posted coding that showed details for step 1) - I'm trying hard, but my mind reading skills are rather limited yet...
So let's think about step 2 and 3: I assume that you made sure that your coding always references the correct WBS element. Again the commit (without wait) is done already via CJ11 (e.g. check form BUCHEN in SAPLCJWB). I'd expect though that the synchronous update mode should make this work. Since it doesn't, I'd try local update mode, which is what I'd choose in your case anyhow.
Apart from that my mind is pretty blank, except for the usual silly things to check. E.g. are you sure you're coding is correct, you are handling all return messages and log them for inspection later (e.g. application log), you are certain that the WBS was actually created by the same IDoc that throws the fit (and IDoc was not reprocessed), etc.
So maybe somebody else has better ideas...

Similar Messages

  • My iphone bluetooth  not connect to my hands free or parrot i have been using iphone 4s with6.0 software always worked now called apple no help so i restored my iphone 4 and that does not work i then tried my daughters iphone

    my iphone 5 bluetooth  not connect to my hands free or parrot i have been using iphone 4s with 6.0 software always worked now called apple no help so i restored my iphone 4  with 6.00 net work and that does not work i then tried my daughters iphone and blackberry and they connected
    I then tried i phone 5 in my daughters and sons car and no luck. I cant  get help from anyone  its a joke

    I found the solution to your problem. It solved mine right away and now I'm able to upload videos directly from my iPhone.
    Go to this thread: https://discussions.apple.com/message/17366529#17366529#17366529

  • Hello, I am a user of the iPhone is not the place for bi çıkıcak turkey apple brand products and product support and equipment does not work as it used to fix and send back waiting for your help. Please support me in this regard quit

    Hello, I am a user of the iPhone is not the place for bi çıkıcak turkey apple brand products and product support and equipment does not work as it used to fix and send back waiting for your help. Please support me in this regard quit

    We are all iphone users just like you.
    Do you have a question for fellow iphone users?

  • Updated to IOS 7.1 and now my "Call Waiting" does not work, nor will the "Call Waiting" indicator stay on..... Any help?

    Updated to IOS 7.1 and now my "Call Waiting" does not work, nor will the "Call Waiting" indicator stay on..... Any help?

    Settings > General > Reset > Reset Network Settings

  • Ipad displays "ipad is disabled connect to itunes", I have tried putting the ipad into recovery mode and then restoring but that does not work. I have also tried doing a hard reset of the ipad and that does not work either. Any ideas?

    Ipad displays “ipad is disabled connect to itunes”, I have tried putting the ipad into recovery mode and then restoring but that does not work. I have also tried doing a hard reset of the ipad and that does not work either. Any ideas?
    My son let one of his friends use his ipad. The next time he tired to use it he could not get it unlocked, I tired to unlock it but it kept telling me that I had the wrong pass code. With out me knowing my son continued to tire until it completely disabled it self.

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • HI my name is Ehab Hejazeen. Im from Mapusa  goa india.i have lost my iphone some time back. i recieved it as a gift from my uncle from dubai so i dont hav the imei number and he does not work there anymore. Please track my iphone . My icloud id is jacobm

    HI my name is Ehab Hejazeen. Im from Mapusa  goa india.i have lost my iphone some time back. i recieved it as a gift from my uncle from dubai so i dont hav the imei number and he does not work there anymore. Please track my iphone . I will be waiting for your response. please help me..
    yours sincerely,
    Ehab hejazeen
    <Email Edited By Host>

    As already stated, no one but the police can help you. I suggest you follow Apple's recommendations as quickly as possible: http://support.apple.com/kb/HT5668

  • Commit work and wait don't work,why

    Hi All,
    I call BAPI 'BAPI_PO_CREATE1' and create PO, then commit via
    commit work and wait.
    after creating, query the new PO via
    SELECT ebelp pstyp INTO TABLE lt_ebelp
      FROM ekpo
      WHERE ebeln = p_lv_ebeln.
    but no result.
    If creating and waiting a moment, it do work.
    why, I already used 'commit work and wait' but not 'commit work'.
    thanks.
    regards.
    dou

    Okay ,first check whether po number is getting saved or not .
    If po is saving then use BAPI_TRANSACTION_COMIITT FM ..
    Now check ur select query like : Since wait upto n seconds ( This may not work)
    data : n Type i.
    n = 10.
    write the below code after  BAPI_TRANSACTIOn_COMITT.
    do n times.
    select query
    if sy-subrc eq 0.
    exit.
    endif.
    enddo.
    still document number is not coming ,testing purpose increate n as 20 and see the results.
    Thanks
    Seshu

  • I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time and it does not work in iChat. Why Not ?

    Question:-
    I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time or other portal and it does not work in iChat. Why Not ?
    Answer:-
    For a Name to work in iChat it has to be an Valid AIM screen Name.
    Only Apple IDs from the @mac.com ending names registered here  and the Mobileme (@Me.com ending) names are Valid with the AIM service as well as being Apple IDs
    (I am still working on info about registering with iCloud at the moment but if this does give you an @Me.com email it may well be a valid AIM name as well)
    NOTES:-
    The @mac.com page works by linking an external (Non Apple) email with a @mac.com name.
    This External Email cannot be one linked to an Existing Apple ID (you have to use a second email or register at AIM )
    The options at AIM are to use your existing email or create new name and link the existing only for Password recovery
    MobileMe (@me.com ending names) were valid Emails addresses, Apple IDs AND a Valid AIM Screen Name
    @mac.com names look like emails but are only Apple IDs and iChat/AIM Valid Screen Names.
    The AIM registration page seems to be pushing you to register [email protected] This is relatively new and I have not followed through the pages to find out if it a valid AIM email (Previously you could register a name without an @whatever.com suffix)
    8:16 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

    Question:-
    So I have my current [email protected] email in iChat as I thought as I had linked that to an Apple ID it was a Valid iChat Name.  It keeps coming up with a UserName or Password Invalid message.  What do I do next ?
    Answer:-
    Open iChat
    Go to the Menu under the iChat name in the Menu Bar and then Preferences and then Accounts in the new window.
    Commonly written as iChat > Preferences > Accounts as directions/actions to take.
    If it displays with a Yellow running name in the list you have a choice.
    Either register it at AIM (I would use a different password to the ISP Login) and then change the password only in iChat  (It may take you to confirm any Confirmation email from AIM first) in iChat > Preferences > Accounts
    Or you register a new Name at AIM (Or at @mac.com) and enter that (details below)
    If you have a Blue Globe name  (@mac.com) that will not Login the chances are that it the password that is the issue.
    Apple lets you create longer passwords than can be used with the AIM Servers.
    Change the Password at iForgot to no more than 16 characters.
    Then change the password in iChat as details above.
    Adding a new Account/Screen Name in iChat (that is valid with the AIM servers)
    Open iChat if not launched.
    Go to iChat Menu > Preferences > Accounts
    Click the Add ( + )  Button at the bottom of the list.
    Choose in the top item drop down either @Mac.com or AIM depending on what you registered
    Add the name (with @mac.com the software will add the @mac.com bit)
    Add in the password.  (If you don't add it now iChat will ask you each time you open it)
    Click Done.
    The Buddy List should open (New Window)
    The Accounts part of the Preferences should now have the new name and you should be looking at the details.
    You can add something in the Description line which will then title the Buddy List (Useful when you have two or more names) and make it show up as that in the iChat Menu > Accounts and the Window Menu of iChat when logged in.
    You can then highlight any other Account/Screen Name you don't want to use and use the Minus ( - ) Button to delete it.
    8:39 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • After installing Mountain Lion, iMessages and Facetime does not work. When I try to sign-in I get a message that says: The server encountered an error processing registration. Please try again later. Apple care does not know what is the cause. Please help

    After installing Mountain Lion, iMessages and Facetime does not work. When I try to sign-in I get a message that says: The server encountered an error processing registration. Please try again later. After 4 calls to apple and 8 and a half hours on the phone. The apple people does not how to solve the problem. The last thing they told me is that they will send the problem to their engineers and I will hear from them. unfortunately they have not contact me.
    During the phone calls I tried putting the date and time in automatic, changing the username and password, I even tried using somebody elses username and password. Please help, facetime is my tool to telecomute, and it is hurting my job.

    I had the same problem and found the solution here:
    https://discussions.apple.com/thread/3189272

  • I have an iPad 2 and so does my mom.  We both have the app Slotomania and now all of sudden after having it for months, our games connected and we don't know how to fix it.  Deleting it and reinstalling does not work.

    I have an iPad 2 and so does my mom.  We both have the app Slotomania and now all of sudden after having it for months, our games connected and we don't know how to fix it.  Deleting it and reinstalling does not work.

    Does the app now use iCloud, do you use iCloud and do the two of you use the same account on iCloud?
    Just a guess.

  • Purchased an App and it does not work. How can I get a refund for it.

    I purchased an app for my son, for his ipad and it does not work. Halo Waypoint for $5.99. When you log in, it just starts loading then an message saying "Sign in Trouble, we couldn't sign you in to Xbox live. Your windows Live ID information is correct, but Xbox Live is unavailable. PLease try again later. We have been trying to for the past 4 days. Reading the reviews it appears that several people have the same problem. So how can we get our money back?

    pituiri wrote:
    I purchased an app for my son, for his ipad and it does not work. ...
    Contact the Developer of the App...
    If no joy...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • My Ipad did work on my wireless at home and works on other wireless but no longer at home. My IPhone works at home and others can use the wireless Confused that it did work and now does not?

    My Ipad did work on my wireless at home and works on other wireless but no longer at home. My IPhone works at home and others can use the wireless> Confused that it did work and now does not?

    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    Additional things to try.
    Turn Off your iPad. Then turn Off the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    On your iPad go to Settings > General > Reset > Reset network settings and see if that enables you to connect.
     Cheers, Tom

  • Lan and WLan does not work on Satellite L40-18W

    Hi all
    I have TOSHIBA Satellite L40-18W and my problem 1- wireless not work & wired lan does not work.
    I have download driver and every thing is ok but it does not work ( when i search by wireless i do not find any network. My router is working fine)
    plzz help meeeee

    Hi
    Its hard to understand what you mean by not working.
    What does this mean exactly?
    Are you not able to connect to the internet or what?
    Usually if the WLan card and the LAN card have been recognized properly in device manager then the drivers are working fine and the issue could be related to wrong router configuration or maybe to some enabled firewalls, etc
    Firstly I recommend checking the router settings. Check if the router has been configured with the right data from ISP and if all other common options have been set correctly.
    The notebook supports Realtek Wlan and LAN card.
    Check if Wlan card uses the same WLan standard like the WLan router and if right encryption has been used too.

  • I bought Iproxify throught app store and it does not work. I contacted the creator but I have not had any answer. What can I do to get my money back? and please take him down.

    I bought IPROXIFY throught APP STORE and it does not work. I contacted the creator and he has not answered.
    How can I get my money back? and please take him down of your page as we (users) think that we are buying products that worked backed up by MAC.
    Looking forward for an answer in order to keep buying in APP Store

    This article may clear up some confusion you may have regarding third party developers and Apple.
    The Mac App Store Discussion, what is it for?

  • I downloaded Elements 13 to my PC, but my PC has windows Vista and it does not work.  How can I download it to my laptop that has Windows 8?

    I downloaded Elements 13 to my PC, but my PC has windows Vista and it does not work.  How can I download it to my laptop that has Windows 8?

    You can get it at this link and validate with your 24 digit serial number - click here for PSE downloads

Maybe you are looking for

  • Problem with Profiles

    My Emac has several user accounts. I noticed some time ago that the S key has stopped functioning in the Admin. account, but it functions normally in the others. Can anyone advise what the problem might be, and how to solve it? emac   Mac OS X (10.3.

  • Context Menu for Data Controls (List,DatGrid)

    I need a contextMenu over a List and a DataGrid, but how do I get the data item that the right click was on ? I saw a hack with rollOver and rollOut events to track the current item, but when I move the mouse on the contextMenu it gets the rollOut an

  • Whats the best way of using "tables" in XMLForms

    Dear Guru's, I have the following query for you... I'm currently working on a XMLForm for a customer. The XMLForm is for promoting "Specials". A special is a featuredproduct that is available in the SRM Catalog for purchasing. Its format is something

  • JavaME SDK 3.0 storage capacity

    Hi, I am using Sun JavaME sdk 3.0 for developing JavaME applications. I want to know how to increase the storage capacity in sdk 3.0. In sdk 2.5 i can go to edit->preferences in the toolkit and change the storage location and the maximum storage capa

  • Windows 8.1 + Windows Phone 10 emulator

    Hi, when I try it I get an error about an unregistered class. Should the WP 10 Emulator work on Win 8.1 or does this don't work at all? Hanno