- 5002 error!!!

hey All,
Does anyone know why this code would throw the - 5002 error with just a dash for the error description? it works for an update of an existing purchase order but throws the error when I am creating a new PO. Any ideas?
if (update)
    thisDoc.GetByKey(Int32.Parse(currentPO));
    thisDoc.Lines.Add();
   thisDoc.Lines.ItemCode = currentItemCode;
    thisDoc.Lines.ItemDescription = myItem.ItemName;
     //TODO ADD IN SALES ORDER AND PO NUMBER LINKS salesOrderNum
     //Set values to the fields
     thisDoc.CardCode = currentVendor;
     //Invoice Lines - Set values to the second line
               //poDoc.Lines.UserFields.Fields.Item("U_ShipFrom").Value = shipFrom;
     thisDoc.Lines.Quantity = Double.Parse(qty);
     thisDoc.Lines.Price = Double.Parse(cost);
     thisDoc.Lines.BaseEntry = Int32.Parse(salesOrderNum);
     thisDoc.Lines.BaseLine = soLineNum;
     thisDoc.Lines.BaseType = 17; // 17 is sales order;
               //poDoc.Lines.UserFields.Fields.Item("U_PQR").Value = pqr;
               //poDoc.Lines.UserFields.Fields.Item("U_LogNotes").Value = logNotes;
     int returnVal;
     if (update)
     //Update the purchase order
          returnVal = thisDoc.Update();
     else
          returnVal = thisDoc.Add();

Hi Curtis
I'm not sure if you can base a PO on a sales order, didn't realize you were doing that earlier. If you go to Purchase Order, you can't base it on sales order. The only way you can do it through the front end is if you tick the Purchase order box on Sales order form.....the system then creates one for you.
I tried on my own code that works perfect with invoice based on sales order. But as soon as i say PO based on Sales Order it gives the same error code. The description says something like the BP Codes are different. Now for this it must be different because it's not a customer anymore but a vendor/supplier. But all other circumstances the bpcodes would be the same for docs that are based on previous docs. I'm not sure if we can do it based. You might have to just create the PO without basing it on the sales order.
Hope this helps

Similar Messages

  • Error Code :-5002 Error Message :Enter valid currency  , '51100000-01-001-0

    Hi all,
             I have found a error "Error Code :-5002 Error Message :Enter valid currency  , '51100000-01-001-01'" while adding the DELIVERY document.
    I have made a customer and assign then "EURO" currency and add delivery document then it prompts error.
    Could anyone solve this problem. is there any setting which i am missing..??
    Regards
    Sandesh

    HI Sandesh,
    Check Sap note :1252328
    and also check below thread of similar issue:
    Re: 'Invalid Currency' error when attempting to deliver order
    Hope this will solve your issue.
    Thanks,
    Neetu

  • 5002 error with iTunes 9.1 when updating apps

    I'm getting a 5002 error whenever I attempt to update an individual app via a 'Get Update' button in iTunes on all accounts on the machine. The app still downloads, but the error dialog comes up every single time. This did not occur prior to an update to Mac OS X 10.6.3 and iTunes 9.1.
    Anyone else having this problem or know of a fix? Note that I have already tried the following:
    - Clean/reinstall of iTunes.
    - Removal/re-add of all apps (and confirmation that even with iTunes only having one app 'installed' the same problem occurs).
    - Update of account details.
    - Removal and deletion of all ad-hoc builds/apps with 'generic' icons.
    Full error message:
    "We could not complete your iTunes Store request. An unknown error occurred (5002).
    There was an error in the iTunes Store. Please try again later."
    This doesn't happen with 'Download All Free Updates', but with multiple account downloads still broken, that button's only an option for me if the apps are for a single account.
    Message was edited by: CraigG

    The updates still download on my Mac, too - but the dialog is clearly something that shouldn't be there. Regarding the 'major version' error, that, as I stated, is down to multiple accounts. According to my communication with Apple, this is not intentional, but there's also not a timeframe for a fix. (This error started when the update screens started showing apps from all accounts, not just the one signed in.)

  • 5002 error in itunes all of a sudden

    So my main itunes install is now acting up. I'm getting the 5002 error. It used to work fine. I purchased some songs on my iphone today and sync'd them to my mac mini itunes install where all my music is. I tried to go into my account and it asks for my password, then it says the 5002 error try later. I've tried deauthorizing the mini (doesn't let me, 5002), tried authorizing the mini (it is already authed but it doesn't let me do that either 5002). The shopping cart is not enabled (never has been).
    I was able to sync to my phone and get the songs copied over but I can't access buy anything from the mini nor can I pull up my account information.

    I can preview songs audibly, but when I try to buy, I also get the error, same thing when I tried to access my account. Some people have been able to access their account, and they said that they refreshed their State info and this negated their 5002 Error, but I cannot get there.

  • Getting 5002 error

    Getting 5002 error, seems like others are not able to download or update either.

    Exactly the same here (though iMac instead of Mac Pro!) - have seen advice elsewhere to repair and/or manually reset permissions on iTunes Music folder but this didn't help.
    I remember it happening ages ago when we still had Shopping Carts, but I can't see how to fix it this time. I can only assume it's something to do with the possible iCloud links for this coming Monday...?
    One other piece of advice suggested removing any apps with blank icons (of which I have several - presumably indicating that the files are corrupted?) but I'm unwilling to do this as some of these are no longer available for fresh download...?

  • Machines can't connect "-5002" error

    Hi There,
    I have a Leopard machine that won't connect to our Tiger server 99% of the time. I get a -5002 error most of the time but every few months it will connect.
    If I enable guest access in the AFP tab in Server settings and try to connect as the registered user I get a password error instead of the -5002 error.
    The machine is a new laptop running 10.5.8, is connected via ethernet and has the server listed in the Directory Access app - Appletalk is also enabled on the Ethernet port.
    Not sure what I've done wrong with this machine as the other Leopard machines connect fine.
    Any help would be much appreciated.
    Cheers

    I assume you've tried to unbind and rebind to the AD?
    If you go in to terminal and do a 'dscl', can you navigate to the AD path and get into a known user and read their account information?

  • What is a 5002 error when i try to sign in to itunes

    why is there a 5002 error message when i sign into itune?

    none of which solve the problem for me, thanks for your stellar advice though.
    Jay.

  • 5002 - Error In itunes Store - Try Again Later?

    New to iTunes, Windows7 - Logging in to iTunes Store - I get 5002 error.  Should I just do what's suggested and "Try again later" ?  My Apple ID is good on the website and I was able to change my password, rebooted my computer and even obtained this support forum id. I just keep getting the 5002 error when logging in to the iTunes store.  Help !

    So you already followed these steps?
    This alert is often the result of an issue with verifying your billing.
    Quit iTunes.
    Open iTunes.
    Test the issue.
    If it persists, sign in to store.apple.com using your iTunes account
    Click on Change account information
    Modify or remove your credit card information.
    Click Continue.
    Test the issue.
    If you have I'd try calling AppleCare back and telling the it is error 5002 and already tried troubleshooting steps as listed in TS3297 and that you have already tried to email iTunes support and have yet to recieve a response.

  • What is the 5002 error on itunes called

    hi i wanted to watch Captian America The First Avenger on my ipod touch 4th generation, and i was following tyhe steps and a tab came up and it said that a 5002 error occured and said to try agian later; So i could not download my video.  If you could help me that woulde be grat.

    knarfrh60 wrote:
    Really? Funny!
    What is funny? I searched Google for that error and easily found what webkit2webprocess is.

  • Anyone getting a 5002 Error when trying to Download a Tv show or Movie?

    I am getting a 5002 error any time I attempt to download a movie or tv show right now, at 11:50pm Pacific Standard time on December 15th.....anyone else gettting this......I can download music but not tv/movie...????

    Found this post (still seems weird we are all having this error at the same time):
    “We could not complete your Music Store request. An unknown error ocurred (5002). There was an error in the Music Store. Please try again later.”
    I emailed iTMS support about it and received the following reply:
    Dear Richard,
    Thank you for contacting the iTunes Music Store.
    I sincerely apologize for any inconvenience this Error 5002 issue may have caused. Please note that it was necessary to clear the contents of your shopping cart to resolve the issue you have been experiencing.
    It seems like one of the songs you are trying to purchase is in the middle of being modified and is unable to be purchased at this time. So this is preventing you from checking out and giving you this error code. What we recommend you doing on this particular order would be to add one
    or two items time, checking the cart after each item. When the cart shows that error “5002” we have found our song that is being modified. When you find this song we would appreciate it if you would report back to us which song is giving you this error. From there we can take appropriate actions to getting this fixed.
    Thank you for being an iTunes Music Store customer. We appreciate your business.
    I don’t recall what was in my shopping cart, so I won’t be much help to iTMS. But maybe it’ll be help to you.

  • 5002 Error then, says Itunes cannot Authorize my account

    New Macbook, but I have used itunes for years. When I set up HomeSharing on my PC, everything is fine. I can connect with itunes, the Store, and the computer is authorized.
    When I get on the Macbook to start Homeshare, it says I need to authorize, and when I try to authorize it, it either gives me a 5002 error, or it tells me I need to authorize my account. BUT when I get to the store, I can log in and download music, just not play any old music I have purchased.
    Please HELP!!!

    Hello, norman larry scott, jr. 
    Thank you for the question.  Normally when I see this error, it has to do with syncing photos.  I am unsure if you have the preference to sync photos from your Mac to your devices however.  See the section labeled iPhoto or Aperture in the article below.  This may resolve the issue with the error that you are receiving. 
    iTunes: Understanding the iPod Photo Cache folder
    http://support.apple.com/kb/TS1314
    Make sure to test the results by processing a sync after these steps. 
    Cheers,
    Jason H. 

  • 5002 error when purchasing

    I am trying to purchase Wishlist  I get 5002 error   I have deleted and reentered crdit card nfo - used two different credit cards - still same error message

    I'm having the same issue too. (On OS X 10.5.8 w/ iTunes 10.2.2 & iPod Touch 4g w/ 4.3.3)
    I was able to download a Coldplay song, but nothing by Lauren Fairweather, The Whomping Willows, Justin Finch-Fletchley and Sugar Quills, The Butterbeer Experience.... it seems like I can only buy popular songs/artists... but that might be coming to the wrong conclusion.

  • 5002 error while signing in

    Hello there,
    i am trying to sign in to itunes with my apple id. I have never used it with itunes, i have created it when i signed as apple developer. It keeps doing this in mac or windows but there is really no problem with the account when connecting through the apple site. Do you know what i can do to solve this situation?
    Thanks a lot,
    Nikos

    No it wasn't helpful nut thanks anyway. When i try to login it says that i must review my account and then i click OK and after that 5002 error. Is there any way of reviewing an itunes account without using itunes?
    Nikos

  • I can buy individual episodes of TV series however when I try and buy a full series I get a 5002 error.  Any ideas?

    I can buy individual episodes of TV series however when I try and buy a full series I get a 5002 error.  Any ideas?

    This Apple article might help ya out -> iTunes: Advanced iTunes Store troubleshooting
    "Error 5002"
    This alert is often the result of an issue with verifying your billing.
    Quit iTunes.
    Open iTunes.
    Test the issue.
    If it persists, sign in to store.apple.com using your iTunes account
    Click on Change account information
    Modify or remove your credit card information.
    Click Continue.
    Test the issue.

  • Adding a delivery, -5002 error

    We have an addon that adds a Delivery. It always worked good, but recently it gives an error for only 2 Business partners (so for all others it works fine). I think it goes wrong since we have the 2005 version of SAP Business One.
    This is the error:
    Error code: -5002
    Error message: [ODLN.DocRate], 'Federal Tax ID - The ID Country Code [80] is not valid'
    Any idea what it can be or where to look?

    Search the forum and you'll find the answer. For instance:
    Re: Error Code -5002

Maybe you are looking for

  • Photoshop CS6 has out of memory errors under Mac OS X 10.7.4

    Has anyone who has a 2008 MacBoo Pro with the NVIDIA GeForce 8600M GT 512 MB graphics card tried running Photoshop CS6 under Mac OS X 10.7.4? On my MacBook Pro, PS CS6 launches; however, any action results in an out of memory error.  The CS6 versions

  • *** How to resume movie rental download?

    I started to download a movie and then had to quit iTunes and restart my Mac. When I opened iTunes it wasn't there so I searched for it and the message said "you've already rented this, do you want to rent it again?". I was only about 75mb into a 1.0

  • I wish I could remember what exactly happenned the last time I upgraded iphoto years ago, but something

    I wish I could remember what exactly happenned the last time I upgraded iPhoto years ago. Did my address book go kaflooey? But whateverit was, it discouraged me from any updating eversince.  Believe it or not, I have been limping along with Iphoto 6.

  • Defining values on SD Billing Plan during order entry

    Scenario- User enters a sales order with 10 line items. Based on specific material master information (material group, etc), items will be split on two billing plans. For example, lines 1, 3, and 10 would go on the first billing plan at 5% of the pri

  • Setting the DPI of a picture

    I am trying to create an image and then save that to a file to be printed later.  I notice that the picture functions seem to default to a 96 DPI image.  Is there some way to increase that?  I need to add some pretty small text to the picture and it