Using sd_salesdocument_change to update vbak-lifsk

Hi all,
I want to update vbak-lifsk based on some conditions using the function module sd_salesdocument_change. Could anyone of you who has done something similar help me with some tips and code snippets?
Helpful posts WILL be rewarded.
K

Just pass the order number and set ORDER_HEADER_IN-DLV_BLOCK to your new value and ORDER_HEADER_INX-DLV_BLOCK to 'X'.  Also set ORDER_HEADER_INX-UPDATEFLAG to 'U'.
PARAMETERS: p_order LIKE vbak-vbeln.
DATA: ord_in  LIKE bapisdhd1,
      ord_inx LIKE bapisdhd1x,
      t_ret   LIKE bapiret2 occurs 0 with header line.
ord_in-dlv_block = '01'.
ord_inx-dlv_block = 'X'.
ord_inx-updateflag = 'U'.
CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE'
  EXPORTING
    SALESDOCUMENT               = p_order
    ORDER_HEADER_IN             = ord_in
    ORDER_HEADER_INX            = ord_inx
  TABLES
    RETURN                      = t_ret
LOOP AT t_ret WHERE type = 'E'.
ENDLOOP.
IF SY-SUBRC <> 0.
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
ENDIF.
Message was edited by: Michael Malvey

Similar Messages

  • How to update vbak,vbap in MV45AFZZ

    DATA:  lw_WZEIT TYPE marc-WZEIT,
                lw_date  type sy-datum.
    LOOP at XVBAP where PSTYV = 'ZRET'.
    SELECT single WZEIT
             into lw_WZEIT
             from marc
            where matnr = xvbap-matnr.
    IF sy-subrc = 0.
        lw_date = lw_WZEIT + sy-datum.
       if vbak-VDATU < lw_date.
         move 'Z1' to xvbak-LIFSK.
          move 'A' to xvbap-ABGRU .
       endif.
    ENDIF.
    ENDLOOP.
        how to update vbak vbap table in MV45AFZZ ( while saving va01).
    Thanks
    Suresh

    Hi Suresh,
    It is not recommended to code custom update to table VBAK and VBAP directly in MV45AFZZ ( i don't think that would work either since the lock is taking place ).
    Use the appropriate procedure instead ( that is USEREXIT_SAVE_DOCUMENT and USEREXIT_SAVE_DOCUMENT_PREPARE depend on requirement ) , and
    perform modifications you need to internal table vbak and xvbap. Standard SAP program will then update the database tables for you.
    XVBAK is available through all part of MV45AFZZ since this is defined globally to include non vbak header information.
    Rettung von VBAK Feldern nach AG-Änderung.
    DATA:    BEGIN OF XVBAK.
            INCLUDE STRUCTURE VBAK.
    DATA: AGUPDA LIKE RV02P-AGUPD,
              WEUPDA LIKE RV02P-WEUPD,
              AUARTUPDA,
              END OF XVBAK.
    Rgds,
    Tuwuh Sih Winedya

  • Windows Update Client failed to detect with error 0xc8000247 after using Lenovo System Update 5

    My Windows 7, SP1 was running fine, until I installed few updates on 10/15 using Lenovo System Update 5 then Windows Update stopped working, shows as RED:
    {CE3119AD-35EF-41CF-9C21-C7698FEB8393}    2013-10-14 21:53:00:256-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Software Synchronization    Windows Update Client successfully detected 4 updates.
    {EB17A01A-EB6E-49FF-9EA2-AA0DD063B4B1}    2013-10-15 04:15:54:069-0700    1    162    101    {C61A0D00-3E51-48AC-B0AF-1D3E02B9E5D3}    201    0    AutomaticUpdates    Success    Content Download    Download succeeded.
    {77DAE88F-2795-4258-8BBF-8D27E53662CF}    2013-10-15 12:10:38:196-0700    1    193    102    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Content Install    Restart Required: To complete the installation of the following updates, the computer must be restarted. Until this computer has been restarted, Windows cannot search for or download new updates:  - Security Update for Windows 7 for x64-based Systems (KB2862330)
    {1398F777-3AEF-4D1D-BE4C-407EC4AEAD4C}    2013-10-15 12:15:25:676-0700    1    183    101    {C61A0D00-3E51-48AC-B0AF-1D3E02B9E5D3}    201    0    AutomaticUpdates    Success    Content Install    Installation Successful: Windows successfully installed the following update: Security Update for Windows 7 for x64-based Systems (KB2862330)
    {A220898A-E5FE-4FE7-8413-2B0C7B4013D0}    2013-10-15 12:15:25:766-0700    1    202    102    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Content Install    Reboot completed.
    {A5400FF2-33ED-4A47-8409-13E5DFE16A6D}    2013-10-15 19:29:31:486-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    ChkWuDrv    Success    Software Synchronization    Windows Update Client successfully detected 0 updates.
    {43C533EE-775D-445E-A652-06648B72DE65}    2013-10-15 19:29:49:702-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    ChkWuDrv    Success    Software Synchronization    Windows Update Client successfully detected 0 updates.
    {D6AAAFFB-7F18-4A7E-B39D-1BA09CDC5E6D}    2013-10-15 19:30:05:744-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    AutomaticUpdates    Success    Software Synchronization    Windows Update Client successfully detected 3 updates.
    {4E73B1C1-5BA2-415D-AB34-92F7AB3DB418}    2013-10-15 19:30:08:753-0700    1    147    101    {00000000-0000-0000-0000-000000000000}    0    0    ChkWuDrv    Success    Software Synchronization    Windows Update Client successfully detected 0 updates.
    {51248882-41AC-4E59-B813-87AD326310AD}    2013-10-15 20:00:05:044-0700    1    183    101    {DBD3B4E9-0357-47DA-8317-D0CF2163BFE6}    501    0    wusa    Success    Content Install    Installation Successful: Windows successfully installed the following update: Hotfix for Windows (KB2661796)
    {FB2B8E5E-442C-4E76-B23D-6A41B4324C9D}    2013-10-16 00:11:39:832-0700    1    148    101    {00000000-0000-0000-0000-000000000000}    0    c8000247    AutomaticUpdates    Failure    Software Synchronization    Windows Update Client failed to detect with error 0xc8000247.
    Lenovo Thinkpad W500, Intel (R), Windows 7, SP1, latest updates as of Oct 15
    (1) Checked Setting,  set to automatic update whenever, even changed to never update, rebooted the OS and changed back to automatic update and rebooted the OS.
    (2) Stopped Windows Update Services, renamed SoftwareDistribution folder and started the window update services and rebooted.
    (3) Ran MS FIXIT
    (4) Ran System File checker Scan (sfc /scannow)
    (5) Ran CHKDSK /F
    (6) Installed "Intel Rapid Storage Technology" drivers from Lenovo site
    (7) Ran Update for Windows 7 for x64-based Systems (KB971033)
    None of the above possible recommended solutions were able to fix the issue yet and now I am getting a message your Window is Not Genuine!
    Any help or guidance is appreciated.
    Solved!
    Go to Solution.

    The Lenovo System Update installed the "Intel Matrix Storage Manager driver 8.9.2.1002" right before the Windows Upgrade got broken. So in the Device Manager under IDE ATA/ATAPI Controllers, I choose Intel ICH9M-E/M SATA AHCI Controller, on the Driver Tab, I choose the option "Roll Back Driver" and after rolling back the driver and restarting the OS, now Windows Update is working like a Champ!
    The End!

  • I have an apple ID, I'm trying to use this to update and download apps etc. however, whenever I try this, it keeps asking me to use my old ID, which is attached to an email that no longer exists! I can't download or update anything! Help!

    I have an apple ID, I'm trying to use this to update and download apps etc. however, whenever I try this, it keeps asking me to use my old ID, which is attached to an email that no longer exists! I can't download or update anything! Help!

    You can log out of the currently logged in account by taping on the id in Settings > Store (Settings > iTunes & App Stores on iOS 6) and you can then log back in.
    If you updated your existing account with a new email address then that shoud 'refresh' it on it
    If you created a new account then any content that you purchased/downloaded via the old account will remain tied to that old account, and only that old account can redownload its content and download updates to its apps. You should be able to update an account's email address via this page : http://appleid.apple.com

  • HT4623 Please  help!  i have just update my iphone 4s with 7.4 update and my phone is now asking for a password which i dont have.  I have tried my keypad lock i used before the update and also my itunes password and neither work, how do i rectify this ??

    Please  help!  i have just update my iphone 4s with 7.4 update and my phone is now asking for a password which i dont have.  I have tried my keypad lock i used before the update and also my itunes password and neither work, how do i rectify this ???

    Did you buy this iPhone new from an authorized seller?

  • How can i use Itunes to update more than one IPad with more than one owner

    How can i use Itunes to update more than one IPad with more than one owner?  I own an IPad and my wife owns an IPad.  I want to use my system to update both IPads.  We have different Apple Accounts and different applications.  Is this possible?

    Of course, that is too easy.  I am such a bonehead.

  • I use Lightroom 5 (update)on my PC. Now I want to use Lightroom also on my notebook but it has no CD-drive. Can you help me - Wilhelm Habermalz

    I use Lightroom 5 (update)on my PC. Now I want to use Lightroom also on my notebook but it has no CD-drive. Who can help me - Wilhelm Habermalz

    The easiest way would be to download the trial version, and then use your existing serial number to activate.  Or, if you have already downloaded the update to use to update your original installation, you could copy the file that you downloaded to a flash drive and use it on your other computer.

  • The front camera on my iPod touch 4th generation is frozen. I cannot use it. Updating software does not help. This started right after I bought it, new from BestBuy. What can I do?

    The front camera on my iPod touch 4th generation is frozen. I cannot use it. Updating software does not help. This started right after I bought it, new from BestBuy. What can I do? When i go to the camera, it is stuck on a black screen. the only way to use my camera is through other camera apps, but if I try to switch it to the front camera, it freezes again.

    If you still have the problem after retoring the iPOd to factory defaults/new iPod then The iPod is likely defective and replacement is required.  You can make an appoinment at the Genius Bar of an APple store or take it back to BestBuy if within warranty

  • Using BAPI_PO_CHANGE to update PO with item actegory B

    Hi Experts,
    I have a requirement to update the PO with item category B which is created by referring  PR having account assignment category N(.( So I have a PO with Acc assignment N now have to update the item category with B ). I am using BAPI_PO_CHANGE to update the item category with B  .in me22n system will prompt the Limits ( overall limit , expected value) and Network details ( like GL acc and Network and activity code) so i am passing lt_poitem,lt_poitemx,lt_polimits,lt_poaccount,lt_poaccountx,lt_POSRVACCESSVALUES. System is issuing a message Buffer table is not up-to-date . Please let me know if any one updated the PO with item category B using BAPI_PO_CHANGE and please provide sample code for the same if possible. Thanks in advance.
    Thanks
    Pravee

    Hi Experts,
    I am passing the required structure as below .
    CALL FUNCTION 'BAPI_PO_CHANGE'
      EXPORTING
        purchaseorder = v_po
      TABLES
        return        = lt_return
        poitem        = lt_poitem
        poitemx       = lt_poitemx
        polimits      = lt_polimits
        poaccount     = lt_poaccount
        poaccountx    = lt_poaccountx
        POSRVACCESSVALUES = lt_POSRVACCESSVALUES
        POCONTRACTLIMITS = lt_POCONTRACTLIMITS
        POSERVICES    = lt_POSERVICES.
    Now i am getting a message below messages from BAPI :
    S     06     023     Indirect PO (ZSTA) 4506000481 changed
    I     ME     664     Change Item Category could not be effected
    I     ME     664     Change Item Category could not be effected
    I can see that the PO is not got updated with any of values.Please help me to resolve this issue.
    Thanks
    PRavee.

  • I bought iPhone 3GS(Used) recently and updated ios 6.1.3 my iPhone is taking blurry Pictures through basic default Cam app.Can anybody please let me know any solution for this?

    I bought iPhone 3GS(Used) recently and updated ios 6.1.3 my iPhone is taking blurry Pictures through basic default Cam app.Can anybody please let me know any solution for this?

    Basic troubleshooting steps right out of the user guide are restart, reset, restore from backup, restore as new.  If you've been through ALL the steps and you still have the problem, then you'll need to bring your phone to Apple for evaluation.

  • I have used the plugin updater to update most of my plugins, but i don't want to update one of them- is there a way to get the plug in manager to stop asking me to?

    i have used the plugin updater to update most of my plugins but i have one that i do not wish to update. is there a way to stop getting the plugin manager to pop up every time i open up firefox? i updated all other plugins except adobe reader- which i have adobe acrobat and wish to use that instead but when inside firefox it always uses reader as default so i just chose not to install the update. can i disable the update manager?

    That is stealing.

  • Using the software update created problems

    Ok so I bought Leopard and upgraded from Tiger, then updated using the software update. Now I have a whole bunch of problems. My Apple Works is now missing, the program is just gone. All my Adobe programs now give me the error of Incompatible with current OS or some Your Licensing is not working error. I have a whole load of Adobe programs that should be working, like Contribute CS 3 and Photo Shop and Illustrator and Designer and so on. All of which worked under the 4.11 and the 5.1 OSes but now no longer work. This isn't even touching on the elimination of the Classic environment which i have a lot of programs that will cost way too much money to buy again for the new OS.
    Anybody know how to get back Apple Works and how to get the Adobe products running again?

    First set of problems, I had two software packaged programs go missing. Totally erased from the system. iWeb and Apple Works.
    This would not happen after a software update, unless the directory got damaged somehow*:
    http://www.macmaps.com/directoryfaq.html
    That would give the machine a difficult time trying to find files on the computer.
    Next set of problems my external firewire drive stopped being seen from the system.
    This most commonly happens if a Firewire hard drive does not have the proper firmware to be used with the operating system in question. This is one reason most people recommend dismounting and disconnecting all third party devices before applying updates. This used to be a more common problem with 10.3, but not out of the realm of experience of people with 10.5.
    The next most common cause is the clock battery dying, but not quite dead. Replacing it can fix that problem as well.
    I should say that my system consists of several computers networked together.
    I would have completely disconnected the computers before applying the update.
    I can take my external firewire back up time machine drives and connect them to a PC and see the data. But my macs do not even recognise them, they don't even show up when plugged in.
    This is further evidence the firmware on the hard drive was not yet updated for compatibility with the operating system.
    Third set of problems, all the apple install disks became unreadable by my system.
    This can be commonly caused by a dying optical drive, or bad permissions on the system, or a dying clock battery.
    Fourth set of problems, all the Adobe programs became un-useable and returned errors. Adobe has been working with me on this and have been far more helpful than Apple has been.
    That's a case of corrupt files, or files which were migrated from another system. Migration that is done improperly from a PowerPC to an Intel system may create issues with powerpc plugins on an Intel Mac. If your hard drive got over 85% full and/or the directory was damaged for any reason (especially forced reboots), that can also trigger such a reaction during an update.
    Fifth set of problems just recently discovered, all my stored movies, music and podcast in iTunes is gone.
    This is usually due to a directory issue, but can also be a dying hard drive issue.
    Sounds like you have multiple symptoms pointing towards a few common possible causes. Directory damage, and clock battery malfunctioning, and needing a better firmware on your Firewire hard drive case. Replacing the hard drive case with a compatible one is simple enough. http://www.macsales.com/ makes the right cases. I would not go with LaCie, Western Digital, or Seagate cases. Western Digital and Seagate internal hard drives are fine in of themselves. Replace the MyBook hard drive cases with http://www.macsales.com/ cases and same with the LaCies.
    I have Apple TV and EYE TV and a Midi interface box attached to my G5 mac. My G5 is the one that lost Apple Works and iWeb.
    Remove the Midi interface box. It may help things work better.
    My systems have the super drive on them and I have virtual PC and Softwindows installed.
    Softwindows barely works if at all under Classic, and VirtualPC only works with version 7.0.2 under Leopard. If you got an earlier version working under Leopard you were lucky. You really needed to migrate to a supported emulator under Leopard listed on my FAQ*:
    http://www.macmaps.com/macosxnative.html#WINTEL
    It says you didn't research your options well enough before upgrading to Leopard. This has been well documented in the forums before this.
    Booted up from the Norton disks and repaired disk.
    This is the biggest flaw in your plans, which caused ALL your problems. Norton is not compatible with any version of Mac OS X. It eats directories for breakfast, lunch, and dinner. Only Alsoft Disk Warrior is safe and only after a data recovery attempt with Prosoft Data Rescue II, Subrosasoft Filesalvage, or Boomerang's Boomerang. We have constantly harped on the forums here that Norton is damaging to data. This has been known about since Mac OS X came out. It has even been called "Norton Kevorkian" by some.
    You can't blame Apple for this. Your lack of research and lack of asking in the right places at the right time led to your failures.
    - * Links to my pages may give me compensation.

  • Dear Sirs,when i use the computer updating my iphone to ios 7.1,suddenly black out.The computer has no power and my iphone does not work and keep display the screen that connect to itunes. so when i connect my iphone to iTunes, it says"itunes has detected

    Dear Sirs,when i use the computer updating my iphone to ios 7.1,suddenly black out.The computer has no power and my iphone does not work and keep display the screen saying the iphone need to connect to itunes. So when i connect my iphone to iTunes, the computer says"itunes has detected an iphone in recovery mode. you must restore this iphone before it can be used with itunes"
    So my question is if I click OK(restore the iphone),will i lose all my data and whatsapp??
    Thank you for your help and time.
    Regards,
    hopeless

    If you didn't back up the phone to iCloud or iTunes (on your computer) BEFORE attempting the update, the data will be lost.

  • How to use new patch updates in track

    Hi All,
    I am a developer working in NWDI. We have everything in place and working fine upto now.
    SAP has release a patch for the software component i am using in a track. Basis guys have updated the track and they confirmed the patch is updated successfully.
    Now when ever i rebuild my DC, the changes are not effected as per the new patch. Please let me how I will be able to use new patch updates in my DC(In NWDS I can see the old source code only, I did all SYNC's and refresh but didnt worked, even NWDI is restarted)
    How I can confirm that the patch is updated to track successfully, from a developer point of view.
    I have access to CMS and CBS.
    Regards,
    Sateesh Chandra

    Did you update your configuration in the studio?
    --MLS

  • Web Authorization using Jrun 4 Updater 7

    Hi
    I'm trying to implement Web Security Authorization using JRUN 4 updater 7. When I start the server, I'm getting an error.
    06/03 15:46:24 error An exception was thrown when initializing the security filters.
    java.lang.NullPointerException
    at jrun.servlet.security.StandardSecurityFilter.<init>(StandardSecurityFilter.java:59)
    at jrun.servlet.security.WebAppSecurityService.createSecurityFilters(WebAppSecurityService.java:462)
    at jrun.servlet.security.WebAppSecurityService.start(WebAppSecurityService.java:95)
    at jrun.servlet.WebApplicationService.start(WebApplicationService.java:223)
    at jrun.ea.EnterpriseApplication.start(EnterpriseApplication.java:194)
    at jrun.deployment.DeployerService.initModules(DeployerService.java:708)
    at jrun.deployment.DeployerService.createWatchedDeployment(DeployerService.java:243)
    at jrun.deployment.DeployerService.deploy(DeployerService.java:428)
    at jrun.deployment.DeployerService.handleEvent(DeployerService.java:382)
    at jrunx.kernel.JRunServiceDeployer.fireEvent(JRunServiceDeployer.java:710)
    at jrunx.kernel.JRunServiceDeployer.deployServices(JRunServiceDeployer.java:111)
    at jrunx.kernel.DeploymentService.loadServices(DeploymentService.java:46)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.jmx.mbeanserver.StandardMetaDataImpl.invoke(StandardMetaDataImpl.java:414)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at jrunx.kernel.JRun.startServer(JRun.java:575)
    at jrunx.kernel.JRun.<init>(JRun.java:493)
    at jrunx.kernel.JRun$1.run(JRun.java:346)
    at java.security.AccessController.doPrivileged(Native Method)
    Code:
    ===========
    My Web.xml has the configuration
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>mywebapp</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>viewer</role-name>
    </auth-constraint>
    </security-constraint>
    <security-role>
    <role-name>editor</role-name>
    <role-name>manager</role-name>
    <role-name>supereditor</role-name>
    <role-name>viewer</role-name>
    </security-role>
    </web-app>

    CFMX 7.0.2 is a separate application from JRun. If you have
    the multiserver or j2ee install of CFMX on JRun then you should
    install Updater 6. Also there are hot fixes on top of U6 that you
    might want to install. The following is a link to the JRun 4 hot
    fixes:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18526
    You should check each one individually to see if it applies
    to Updater 6.
    Ted Zimmerman

Maybe you are looking for