Update and create a new version of a PO

Hi all experts,
I'm doing a simple report to synch POs between an R3 and the SRM system. In order to do this, the report (who's running on the SRM) does as follows:
1) given a PO number, retrieves from the backend all the PO-related tables (and translate them into SRM-like structures, but this is a minor note);
2) retrieves details for the PO specified in SRM (BBP_PD_PO_GETDETAIL);
3) perform a mapping between SRM items and corrispective R3 ones.
4) update eventually some fields from the R3.
5) then, finally, tries to do an update. And here the mess begins... I can't manage the update phase to do what I want...
First of all; I retrieve all the data I need from the SRM system as follows:
CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
    EXPORTING
*     I_GUID                           =
      I_OBJECT_ID                      = p_ebeln
*     I_ATTACH_WITH_DOC                = ' '
      I_WITH_ITEMDATA                  = 'X'
*     I_READ_BE_DATA                   = ' '
*     I_ITEM_SORTED_BY_HIERARCHY       =
*     I_WITHOUT_HEADER_TOTALS          =
    IMPORTING
      E_HEADER                         = srm_header
*     ET_ATTACH                        =
    TABLES
      E_ITEM                           = srm_item
      E_ACCOUNT                        = srm_account
      E_PARTNER                        = srm_partner
      E_CONFIRM                        = srm_confirm
      E_LONGTEXT                       = srm_longtext
      E_LIMIT                          = srm_limit
      E_ORGDATA                        = srm_orgdata
      E_TAX                            = srm_tax
      E_PRIDOC                         = srm_pridoc
      E_MESSAGES                       = srm_messages
      E_ACTVAL                         = srm_actval
      E_ACC_ACTVAL                     = srm_acc_actval
      E_VERSION                        = srm_version
      E_HEADER_REL                     = srm_header_rel
      E_ITMLIM_REL                     = srm_itmlim_rel
      E_STATUS                         = srm_status.
Then, since the modifications required are just at item granularity, I work on the srm_item table (i.e., let's say that the X item has its description changed).
The problem is the UPDATE task: basically, I tried to use the BBP_PD_PO_UPDATE as follows:
CALL FUNCTION 'BBP_PD_PO_UPDATE'
    EXPORTING
     i_park                       = 'X'
     i_header                     = s_headeru
     I_SAVE                       = ''
*   IV_REJECT                    =
*   IT_ATTACH                    =
    IV_WITH_CHANGE_VERSION       = ''
* IMPORTING
*   E_CHANGED                    =
*   ES_HEADER                    =
   TABLES
     i_item                       = v_item
*   I_ACCOUNT                    =
*     i_partner                    = t_partner
*   I_CONFIRM                    =
*   I_LONGTEXT                   =
*   I_LIMIT                      =
*   I_ORGDATA                    =
*   I_TAX                        =
*   I_PRIDOC                     =
     e_messages                   = t_messages    .
CALL FUNCTION 'BBP_PD_PO_SAVE'
EXPORTING
*    IV_WORKITEM_ID               = srm_header-object_id
*     IV_USERTYPE                  =
     IV_HEADER_GUID               = srm_header-guid
     IV_CREATE_HIST_VERSION       = 'X'
COMMIT WORK AND WAIT.
where s_headeru is simply an adeguate structure for the FM (MOVE-CORRESPONDING srm_item TO s_headeru), so nothing new.
Issues: this code actually updates the PO. I can see on the SRM web interface that the order's been updated (e.g. modified description)... BUT there's no trace of the previous version. Calling the UPDATE FM in this way pratically overwrites the order on SRM.
IV_WITH_CHANGE_VERSION field seems not working: if I flag this field ('X') the update fm seems not working.
Can anybody help me understanding how these FM calls and parameters works?
I'd like to manage 3 different cases:
- overwrite the version in update (OK, I got it),
- overwrite the version in update and try to distribute (OK, got it just flagging the 'iSave' param);
- don't overwrite, but create a new active version and don't distribute (that's still missing.. )
Thanks in advance and forgive this huge post
EDIT: sorry, I forgot to specify that if I flag the IV_WITH_CHANGE_VERSION input parameter for the UPDATE FM, the update doesn't work. More precisely, it terminates without any error message but the effect is that nothing seems to be done.
Edited by: Matteo Montalto on Feb 27, 2009 5:55 PM

Well, I'm now back on the system I was working on and can confirm that the version management is active in SRM.
Maybe I can formulate the question in a simpler way...
My task is quite simple: retrieve a Purchase Order in SRM (using the BBP_PD_PO_GETDETAIL function module), do some modifications on it (this step has been already tested) and then simply create a new version of the same purchase order (that obviously, will become the active version).
What I have in hand are the structures I got from the BBP_PD_PO_GETDETAIL, eventually modified.
Any hint? The solution posted above allows me to overwrite the PO active in SRM, I'd like to manage also the case in which the user wants to create a new version of the PO .

Similar Messages

  • I just updated and downloaded the new version of iTunes. I then downloaded some music and now the music won't play on my iPod or in my iTunes. The tracks play for a few seconds and then skip to the next track

    I just downloaded and updated the newest version of iTunes. After updating I downloaded some new music and synced the iPod. The music doesn't play. It'll play about 30 seconds of the song and then skip automatically to the next song. I restarted the iPod. I restored it. It still didn't work. Then I tried listening to the music from my laptop straight from iTunes...and it's still doing it.
    How do I fix it?

    I'm assuming the tracks that won't play copy/are displayed with exclamation marks. This happens if the files are no longer where iTunes expects to find them. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

  • Fatal error in attempting update and synch to new version

    I attempted to update to new iPhone version and to synch today. The update totally failed with unknown error. The attempt to restore was unsuccessful, with the unhelpful message that an "unknown error occurred (1603)." The iPhone is now totally useless and inoperative. Yes, I can get an Apple logo in B & W. I can also get a color image showing that I should connect to iTunes, but of course that totally fails to work.
    What do I do now, folks?
    jerry

    At the genius bar at a local Apple store the consensus is that the error I experienced is not unheard with this large iPhone update from a Windows machine to an iPhone. The iPhone was connected to an in-store Apple machine which did a clean-up and then did a restore. I was then able to connect the iPhone to my PC to re-synchronize calendar, contacts (etc.) -- after losing all date during the restore. Everything is fine once again.

  • I keep getting a message to update and download a new version of Adobe Flash Player I also received

    I keep getting a message to downlod an updated version of Adobe Flash Player.  I also received a notice to change my password because of phishing problems.  I changed my password but should I download the different Flash Player or is that phishing also?
    Message was edited by: Nana Noland

    Find the ADDRESS box at the top left corner of your browser ( where http://forums.adobe.com appears ). On the far right side of the ADDRESS box is a clockwise circular arrow that will REFRESH your current web page. Immediately to the left of the REFRESH arrow is a small circle with a diagonal line thru it ( the universal symbol for negation as in the traffic sign NO LEFT TURN ). Left click on the small circle and then click on the TURN OFF ACTIVE X FILTERING button that appears in the drop down box.
    Flash Player is probably already properly installed on your computer. Internet Explorer ( your browser ) just blocks certain TYPES of content as potentially harmful and when it does, ABC.com ( for example ) thinks you don't have Flash Player installed and offers a way for you to install it. You don not want to turn off Active X filtering using the tools menu because that will make you vulnerable to malicious applets that the filter was constructed to protect against.

  • My itunes cannot be update on my windows xp. so i delete my itunes and install new, but now i got new problems, it says "The file itune.library.itl cannot be read because it was created by newer version of itunes." so how can it be solved?

    my itunes cannot be update on my windows xp. so i delete my itunes and install new, but now i got new problems, it says "The file itune.library.itl cannot be read because it was created by newer version of itunes." so how can it be solved?

    Hello Bebyida,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    http://www.apple.com/itunes/download/
    Best of luck,
    Mario

  • Every time I update LR to a new version I seem to need a patch to make it work..... once again here I am SOS! I've just update LR to the 5.7 version and It wont let me start it: The application was unable to start correctly (0xc000007b).

    Every time I update LR to a new version I seem to need a patch to make it work..... once again here I am SOS! I've just update LR to the 5.7 version and It wont let me start it: The application was unable to start correctly (0xc000007b).

    Your system is missing a couple DLLs that LR needs, but the fix at Adobe is to copy them to the LR folder which gets replaced for each install, so you have to redo it after each LR install.  It would be worth documenting the process and saving the DLLs so you don’t have to ask about it each time:
    http://helpx.adobe.com/lightroom/kb/error-unable-start-correctly-0xc00007b.html
    You might also use the AIO210 program to add them as detailed in this YouTube video—maybe this is a more permanent fix, but since the files are from media-fire be very careful about what you do so as not to install a virus on your computer. 
    I’d scan the downloaded ZIP you download with whatever virus and internet security software you have and don’t be fooled by extraneous popups you might see during the download process.  I was able to download the aio210.zip after authorizing one Captcha window and closed at least one bogus popup trying to get me to install other software.  I also scanned the downloaded zip with two virus scanners and both said it was clean.  Here is the YouTube video, where the link to the ZIP to download is in the description once you expand it:
    https://www.youtube.com/watch?v=vlT0N2CX50g

  • I just upgraded my mac book to 10.6.8 and downloaded the new version of itunes. When I try to open it and error message appears saying, "The iTunes Library file cannot be found or created. The default location for this file is in the "iTunes" folder.

    I just upgraded my mac book to 10.6.8 and downloaded the new version of itunes. When I try to open it and error message appears saying, "The iTunes Library file cannot be found or created. The default location for this file is in the "iTunes" folder in the "Music" folder."
    I have tried a few things but iTunes closes right after i click okay. Anyone know anything?

    Look in your Home > Music folder.  There should be an iTunes folder there and it should have a number of files and folders including one called library.itl  You want to guide iTunes to that file.  If you don't see that file or folder then in your next post you will have to be very specific as to what you do see or how you have your iTunes set up because that's where it should be according to default settings.

  • Unable to update to ios 5 on windows 7. please can someone help me i have tried everything? i deleted itunes and downloaded the new version when i plug my iphone 4 in it does a back and then I try and update the software it extracts error 3194

    unable to update to ios 5 on windows 7. please can someone help me i have tried everything? i deleted itunes and downloaded the new version when i plug my iphone 4 in it does a back and then I then everything runs normal and it extracts and then i get an error code at the end 3197. had the iphone for two months and its new.
    Please can somene help me, i am currently on version 4.3.3 (8J2)
    Modem Firmware 04.10.01

    followed someones instructions and it has worked ios 5 is now working on my iphone 4

  • I just tried updating ITunes to the new version and it will not completely download and now I get an error message of MSVCR80

    I just tried updating ITunes to the new version and it will not completely download and now I get an error message of MSVCR80. Is there a problem with the new iTunes version?
    Now ITunes won't open.Help!!!

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features(Later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    See also HT1925: Removing and Reinstalling iTunes for Windows XP or HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    Should you get the error iTunes.exe - Entry Point Not Found after the above reinstall then copy QTMovieWin.dll from:
    C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    and paste into:
    C:\Program Files (x86)\iTunes
    The above paths would be for a 64-bit machine. Hopefully the same fix with the " (x86)" omitted would work on 32-bit systems with the same error.
    tt2

  • Upgraded to 11.3.1 now can't open library. Won't read. I have an older iMac (2008). Message I get is: cannot be read because was created by newer version of iTunes. Would you like to download iTunes now?' ... so I do and it fixes nothing. OS 10.6.8

    Upgraded to 11.3.1 now can't open library. Won't read. I have an older iMac (2008). Message I get is: cannot be read because was created by newer version of iTunes. Would you like to download iTunes now?' ... so I do and it fixes nothing. Same message again. OS is 10.6.8.

    Thanks again. The option thing got me further than I've gotten thus far but when I went to choose a library I got that same message.
    I do have options. I have 2 iMacs. I can still access my music through 'sharing' and download it onto my newer iMac. Trouble is it doesn't have a CD port and I like to burn. From what I've read about their new Mac portable CD/DVD drive, it's shaky at best. Incidentally, do you know of any drives that work well with Macs and cost less than $89.00?
    I've figured out I can download a previous library from my old Mac then upload it from the new one which should put me back in business, but what do I do with the corrupt one that's there now, just trash it? Also, when I do the option key my other choice is Create A New Library. Should I do that and put the good previous library into it?
    Thanks a million, I really appreciate your time. I'm an old fogey and computers often mystify me, especially when they lock me out of things for no apparent reason.

  • So I just updated my MacBook Pro and installed the new version of iPhoto and rebooted it and now there is a logo of the world blinking on my screen and it will not go away please help

    So I just updated my MacBook Pro and installed the new version of iPhoto and rebooted it and now there is a logo of the world blinking on my screen and it will not go away please help

    You can force quit by holding the power button down for extended period.
    During boot up hold down the Option key and choose your Macintosh HD OSX.
    In >System Preferences> Startup Disk>choose your internal OSX System as Default.

  • Numbers file created w new version of Numbers on my mac and then transferred  via Dropbox to my ipad: file cannot be opened by iOS version of Numbers

    Numbers file created w new version of Numbers on my mac and then transferred  via Dropbox to my ipad: file cannot be opened by iOS version of Numbers

    Hi Jocomo,
    That's correct. Dropbox does not handle Numbers 3.0 for Mac and Numbers 2.0 for iOS documents well at all. They will probably fix this.
    But why are you using Dropbox for this?  Numbers has built-in iCloud integration for the very purpose of syncing documents back and forth.  It's much easier than using Dropbox even if Dropbox could handle the new Numbers format.  And it's now quite reliable.
    To enable iCloud with Numbers on your Mac:
    In System Preferences>iCloud make sure you have Documents & Data turned on:
    And after clicking Options, make sure you have checked Numbers.app:
    On your iPad you need to make sure iCloud sync is turned on in TWO places:
      Settings>iCloud>Documents & Data>Numbers
      Settings>Numbers>Use iCloud
    If you have entered the right iCloud credentials on your Mac and iPad, Numbers will then sync back and forth. It's much easier than putting in Dropbox and then having to Open in... , etc.  You can of course still keep backup copies of your documents in Dropbox if you want.
    SG

  • After new update, itunes will not launch says "itunes library. itl" cannot be read because it was created by newer version. What do I do to correct this?

    After the newest update, itunes will not launch says "itunes library. itl" cannot be read because it was created by newer version. What do I do to correct this?

    See Empty/corrupt iTunes library after upgrade/crash.
    tt2

  • IPad Air iOS8.0.2. I used the photos app to edit my photos and created a new album for them. When I transfer my photos to my PC via cable (not allowed to use cloud services by my boss) i can only transfer the unedited versions. Any tips? Thanks!

    iPad Air iOS8.0.2. I used the photos app to edit my photos and created a new album for them. When I transfer my photos to my PC via cable (not allowed to use cloud services by my boss) I cannot choose this edited album, only transfer the unedited versions. Any tips? Thanks!

    Hi Anjohi,
    Thanks for visiting Apple Support Communities.
    If you've edited photos on your iPad and only see the original version when you import them to your computer, the tips in this article may help:
    iOS: Edited photos show original photo after import or in other apps
    All the best,
    Jeremy

  • I've tried updating iTunes for Windows but it won't work. I removed iTunes and downloaded the new version (10.6.1.7) but it won't load. It says it cannot removed the older version of iTunes.

    I've tried updating iTunes for Windows but it won't work. I removed iTunes and downloaded the new version (10.6.1.7) but it won't load. It says it cannot removed the older version of iTunes.

    It says it cannot removed the older version of iTunes.
    Doublechecking before proceeding ... what's the precise text of that message, please? (There's a couple of different ones I can think of that you might be getting.)

Maybe you are looking for

  • Be sure to update the App Catalog ASAP!

    Many of us received this email from the webOS team: Mandatory webOS system update A certificate used on webOS devices expires on July 23, 2013. For the system to be able to use cloud services such as Backup/Restore and App Catalog the certificate nee

  • Roundong-off excise duty values

    Hi all! I need to round-off the excise duty values while passing it through J1IEX. I did the following, 1. I have changed the rounding rule for condition types JMOP, JEC1, JSEP & JVRD as 'A'  (Also i checked with 'B' ) and 2. In SPRO - Logistics gene

  • Data syncup issue - Custom extractor for revenue recognition data from ECC into BW

    Hi there, We have created a custom extractor on top of a Function Module (FM) in ECC that reads data primarily from VBREVE table. Currently, we have close to 10 million records and full load isn't a preferred option so we built in a delta mechanism u

  • Oracle.xdb.XMLType extract function

    I have an external java program that connect to the database using a thick connection so I can use the methods extract and existsNode available with the XMLType from oracle.xdb.XMLType. DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver

  • Drag-n-Drop problem in DataGrid with custom ItemRenderer

    Hi, I am trying to use a DataGrid to set the ordering of a group of images. I want to do this with a DataGrid which will show me some properties of the images in different columns including a thumbnail of the image. The problem is when I use any cust