CSAP_BOM_ITEM_MAINTAIN Says ok but updates nothing. Code inside...

Can anyone tell me why this isn't working?
Here is the simplified scenario:
I have a BOM for material number 123456. The BOM has one component called component1. I want to update that component to component2.
When I run what you see below, it opens fine (ran debugger and it returned all info on the BOM as expected).
It runs supposedly with no issue.
When I look at the log, it in fact says BOM for Material 123456 Changed. But when I go back into CS03 to look at the BOM, it shows no changes. Still has Component1 instead of Component2. I can tell you that in reality there are about 6 items in the BOM to begin with and I run this FM to delete all of the first 5 items so there is just one left. It is this last (and now only) item that I am trying to change. The delete of the first 5 items works without any issues. I then close it and again open the BOM and try to modify the remaining item to have component2. (I tried updating the component on the first pass and it didn't work so I thought I would simplify it and only have one item to deal wtih).
Here is the code. Does anyone see anything obvious as to why it is not working?
*---- Field string BOM header data
data: begin of tstk2.
          include structure stko_api02.
data: end of tstk2.
*---- Table BOM items
data: begin of tstp2 occurs 0.
          include structure stpo_api02.
data: end of tstp2.
*---- Tables for dependencies:
*     basic Information
data: begin of tdep2_data occurs 0.
         include structure dep_data.
data: end of tdep2_data.
*     Description
data: begin of tdep2_descr occurs 0.
         include structure dep_descr.
data: end of tdep2_descr.
*     Source
data: begin of tdep2_source occurs 0.
         include structure dep_source.
data: end of tdep2_source.
*     Order
data: begin of tdep2_order occurs 0.
         include structure dep_order.
data: end of tdep2_order.
*     Documentation
data: begin of tdep2_doc occurs 0.
         include structure dep_doc.
data: end of tdep2_doc.
data: flg_warning like capiflag-flwarning.
DATA: CONV_EXIT(10).
*- Database log open
   call function 'CALO_INIT_API'
        exceptions
             log_object_not_found     = 1
             log_sub_object_not_found = 2
             other_error              = 3
             others                   = 4.
*- Open the BOM for changes
   call function 'CSAP_MAT_BOM_OPEN'
        exporting
             material = '000000000000123456'
             plant = '1001'
             bom_usage = '3'
             valid_from = '07/08/2014'
        importing
             o_stko     = tstk2
             fl_warning = flg_warning
        tables
             t_stpo     = tstp2
        exceptions
             error      = 1.
                  LOOP at tstp2. "Go through the list of items for this BOM and set the values
                  tstp2-component = 'COMPONENT2'.
                  tstp2-comp_unit = 'PC'.
                  "MODIFY TSTP2. "tried this with the modify and without both return same result of nothing updated
                  perform item_maintain.
        call function 'CSAP_MAT_BOM_CLOSE'
        exporting
              fl_commit_and_wait = 'X'
         importing
              fl_warning = flg_warning
         exceptions
              error   = 1.
   Form item_maintain.
      call function 'CSAP_BOM_ITEM_MAINTAIN'
           exporting
                i_stpo       = tstp2
           importing
                fl_warning   = flg_warning
*            tables
*                t_dep_data   =
*                t_dep_descr  =
*                t_dep_order  =
*                 t_dep_source = tdep2_source
*                t_dep_doc    =
            exceptions
                error        = 1
                others       = 2.
   ENDFORM.
--------------END OF CODE---------------
All looks good other than the fact that nothing gets changed in the BOM. Looking for ideas here.
Thx

Hi Richard,
You can try using:
    CALL FUNCTION 'CSAP_MAT_BOM_CLOSE'
      EXPORTING
        fl_commit_and_wait = ''
      EXCEPTIONS
        error              = 1
        OTHERS       = 2.
and FM BAPI_TRANSACTION_COMMIT:
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
     EXPORTING
       wait          = 'X'
*   IMPORTING
*       RETURN        = .
I hope you help.

Similar Messages

  • Call function '' in update task - code inside is BDC

    hi to all,
    in using call function '' in update task
    the code inside is bdc. is this possible? 
    my scenario is from VA01 then post billing to VF01,
    i am using user-exit MV45AFZZ in subroutine userexit_save_document.
    i need to post billing after va01 save.
    thanks to all.

    To debug in the update task, you have to set that option on in the debugger.
    If the user exit runs in the update task, then you must have something like: CALL FUNCTION MODULE my_fm_to_do_BDC STARTING NEW TASK.   ( This function module should wait until the SD is created.  You might want to check in a loop, with a WAIT command.   Once it is created, then you start your BDC and CALL TRANSACTION. )  This is NOT an update function module.  It may need to be RFC enabled - I'm not certain at the moment.
    If the user exit doesn't run in the update task, you need to create, and call from the user exit, an update function module that calls your function module "my_fm_to_do_BDC" STARTING NEW TASK. 
    The attribute "collective run", which is V3, means that the update task won't run that function module until a regularly scheduled job on the application server runs.  For processing to run during the rest of the SD save, you must use V1 (could be run in any order with other V1s) or V2 (Will run after V1, but in any order with other V2s).  Typically, I use V2 for this kind of task.
    matt

  • Last played updates wrong songs on shuffle, but updates nothing in iTunes

    I recently upgraded from a 2nd to a 3rd generation iPod Shuffle. The 2nd had real problems updating the "Last Played," "Last Skipped," and other settings in iTunes so I wasn't that sorry to see it go belly up recently.
    But the 3rd Generation's problems in this regard are so much more complex. I want to use Autofill but right now it updates the wrong songs on the Shuffle (as viewed through iTunes) which is fine, I guess, because the main music library doesn't get updated at all.
    What is going on? Why is it so difficult to play a song on a Shuffle (whatever the generation) and have these settings update correctly in both the Shuffle and iTunes?

    I think it is a virus on your shuffle or it is on another file extension. If it is a virus try to reformat it.

  • How do you download BBm if it keeps saying waiting but doing nothing

    How do you download snapchat and BBm if you try download it it keeps saying waiting then saying unable to download app

    Have you considered contacting itunes support?

  • Trying to update to Firefox 3.6.4, - Software Update window says "Connecting to Update Server", but nothing seems to be happening.

    The Software Update screen says Connecting to Update Server, "Paused Downloading Firefox 3.6.4". Nothing seems to be happening.
    * I have shut down my computer and restarted.
    * I have cleared my history.
    I'm hoping the upgrade will help with the crashes. How can I get the update?

    If there are problems with updating then best is to download the full version and uninstall the currently installed version.
    Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 7.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Uninstall your current Firefox version.
    * Do not remove personal data when you uninstall the current version or you lose your bookmarks and other data in the profile folder.
    Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere in the Firefox Profile Folder and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    * http://kb.mozillazine.org/Profile_backup

  • Im trying to download cod 4 and it says give password for billing info which i do and submit but then nothing happens

    im trying to download cod 4 and it says give password for billing info which i do and submit but then nothing happens

    Did you provide a credit card?
    FOR ASSISTANCE WITH ORDERS - iTUNES STORE CUSTOMER SERVICE
    For assistance with billing questions or other order inquiries, please refer to our online support page by clicking here: http://www.apple.com/support/itunes/store/. If you cannot find the answers you are seeking in our robust knowledge base, you can contact us by visiting the following URL http://www.apple.com/support/itunes/store/, clicking on the appropriate Customer Service topic, then using the contact button or email form at the bottom of the page. Responses to emails will be provided as soon as possible.
    Phone: 800-275-2273 How to reach a live person: Press 0 four times
    Hours of Operation: Mon-Fri: 9am-5pm ET
    Email: [email protected]
    How to report an issue with Your iTunes Store purchase
    http://support.apple.com/kb/HT1933
    How to Get a Refund from the App Store
    http://gizmodo.com/5886683/how-to-get-a-refund-from-the-app-store
     Cheers, Tom

  • I've updated my phone and I've made a backup. but now it says I must enter my code to restore all my files and I haven't got this code. If I cancel the process or choose something else, all my stuff will be deleted, and I really don't want that.

    I've updated my phone and I've made a backup. but now it says I must enter my code to restore all my files and I haven't got this code. If I cancel the process or choose something else, all my stuff will be deleted, and I really don't want that.
    HELP ME PLEASE!!!

    If, for some reason, your backup got encrypted and you don't know the code, you'll have to set up your phone as new device and start all over again without the backup.
    Warning: If you encrypt an iPhone backup in iTunes and then forget your password, you will not be able to restore from backup and your data will be unrecoverable. If you forget the password, you can continue to back up and use the device, however you will not be able to restore the encrypted backup to any device without the password. You do not need to enter the password for your backup each time you back up or sync.
    If you cannot remember the password and want to start again, you must perform a full software restore and when iTunes prompts you to select the backup from which to restore, choose set up as a new device.
    If you can't get pass the lock screen, connect in recovery mode and restore the phone, you'll have the option to reset the lock secreen passcode.
    iOS: Unable to update or restore and iPhone and iPod touch: Wrong passcode results in red disabled screen
    If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone, iPad and iPod touch software.

  • Need camera raw plugin 8.5 to switch between Lightroom and PS CC. Tried to update CC. It say installing but nothing happens.

    Need camera raw plugin 8.5 to switch between Lightroom and PS CC. Tried to update CC. It say installing but nothing happens.

    You may need to do a manual install:
    http://helpx.adobe.com/x-productkb/multi/camera-raw-applictions-cannot-updated.html

  • HT202157 Apple TV says it is updating date and time after a power outage here.  But nothing happens.  The wheel just keeps spinning.  What do I do to be able to use my apple tv?

    Apple TV says it is updating date and time after a power outage. But the wheel just spins and nothing happens..  The software is updated and my wifi router is on and working fine and recognized by the Apple TV.  How do I get Apple TV to work again?

    Thanks for the tip.  Unfortunately "Restart" did not change the situation.  I then used the "Restore" option.  After about 45 minutes of the unit going through the process, Apple TV was up and running again.

  • I accidentally removed the application, trying to download a trial version again, but the Adobe installer keep saying it is update and do nothing. what am I going to do?

    I accidentally removed the application from my Mac by moved it to trashcan. trying to download a trial version again, but the Adobe installer keep saying it is update and do nothing. what am I going to do?

    Run the cleaner tool and reinstall.
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    Mylenium

  • I am trying to INSTALL the free trials of AI and PS when I click on the link to install it goes to another page says installing but nothing is happening. I have the FREE TRIAL Creative Cloud Membership.

    I am trying to INSTALL the free trials of AI and PS when I click on the link to install it goes to another page says installing but nothing is happening. I have the FREE TRIAL Creative Cloud Membership.
    I am getting very frustrated with this. When I try to install the Creative Cloud thing it asks me to pay even though it says try for free.

    Hi Mirrormonolith,
    Please try the following steps assuming its a MAC:
    1) Open Activity monitor and Force quit Adobe CEF Helper, Creative cloud, Adobe IPC Broker & Crash Deamon if available.
    2) Try to open, if doesn't work then go to Applications>> Adobe Creative cloud>> Right click>> Get Info>> Click on the Add sign>> Select the user you are logged in>> Give Read and write access.
    3) If that doesn't work then enable the root user and launch to update there, check this link on how to enable/sign in to root user Enabling and using the "root" user in Mac OS X
    Please let me know of that worked.
    -Ankit

  • When I swipe phone to open, and hit the phone icon, then make a call, most times it says "calling mobile" but then nothing happens.

    Same thing here.  I'm getting very frustrated.  When I swipe phone to open, and hit the phone icon, then make a call, most times it says "calling mobile" but then nothing happens.  Then I try to end the call and hit the END button.  Sure, it looks like the call disconnected, but as soon as I try to make another call, I see the same screen (the first called) and the words "calling mobile".  The only way I can rememdy this, naturally, is powering off and restarting.  But, c'mon...$300 for a phone that you have to power down between calls???
    I've got the latest OS update, no jailbreak, or anything exotic on my 4s.  What's more, when I try to make a call 2 out of 3 times, the dumb SIRI opens up and stops me from making the call.  (and, yes, I have very carefully checked my process that I am not intentionally activating SIRI with my cheek.)
    Again, $300 for all this in just trying to make a call?

    reset your phonr by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider. Takes about 5-15 secs of button holding and you won't lose any data or settings.

  • Have iphoto 9.0 working on a mac osx 10.7.4 yesterday ilife with idvd was downloaded into my mac,i can't open my iPhoto now its telling me to update app, but when i do it says no new updates are available at this time,and iPhoto update mesg pops up again.

    Have iphoto 9.0 working on a mac osx 10.7.4 yesterday ilife with idvd was downloaded into my mac,i can't open my iPhoto now its telling me to update app, but when i do it says no new updates are available at this time,and iPhoto update mesg pops up again.

    Hi,
    I scoured the web looking everywhere for a solution to this.
    Exit Code 15
    OSX 8.5 with Work@Home DVD media for CS6
    I followed instructions to run 3rd party cleaner software
    I tried the adobe removal tool
    removing all copies of adobe software manually
    installing from a new account, safe mode, plist everything suggested that i found did not work.
    A colleague suggested that removing the below folder would allow the installation:
    /Library/Application Supports/Adobe
    They turned out to be correct, so i am passing this on, because this took far too many hours of my time.
    Cheers,
    Smokey

  • HT1338 i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created.

    i have apps to be updated but when i try to update them a message pops out saying "You have updates for other accounts, please sigh in with the other id". Can some one help me how can i still update the same with the new apple id ive created. As i dont have the access to the earlier id anymore.

    You cannot. The apps are assigned to that Apple ID and there is nothing you can do to change that. You could choose to download them again with the new Apple ID, any paid apps will need to be purchased again.
    Hope that helps.

  • Creative cloud says it has updated and installed Photoshop CC 2014, but I can not find it on my PC

    What the subject says. I updated/installed PS CC 2014 through the Creative cloud menu on my Windows 7 Pro 64-bit PC. It says it is installed. But I can't find it anywhere on my computer - nothing in teh start menu, nothing in the Programs or Programs x86 folders. Is there a way to re-install?

    http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html

Maybe you are looking for

  • Problem with ARD3 keeps losing the cursor

    I am having problems with ARD3 whereby I keep losing the cursor when controlling another machine. The cursor is still there but you have to click-drag to see it moving. There was a similar problem a few months ago after a system update and pre ARD 3.

  • RAC : User equivalence  check failed

    Hi All, Platform linux CentOS 4.5 and oracle 10g. I facing an issue with " user equivalence failed" while executing cluvfy command. On accessing node 2 from node 1 using ssh it is asking for password(oracle user) after configuring SSH. I have configu

  • Pop-up window - slideshow

    Hi! Is there any way that the slideshows created by iWeb can be displayed in the main browser window and not pop up in a new one? Sincerely, Tom - Norway

  • IWork to html?

    How do I convert iWork Pages document to html so it can be sent in an email?  I tried to export pages to PDF and use Acrobat Pro (Windows version) to convert PDF to html.  The hyperlinks are gone.  Any suggestions?

  • Having a view of the bitrate of ALL tunes on mi

    Is there anyway to use the software that came with the micro, or WMP, or Musicmatch, or Napster - whatever. to see the bitrate as a column in all of the songs on my micro? I haven't found this anywhere - I can get columns on just about anything but b