Exporting Item from One DB to another DB using SDK

Dear Expert,
I have tried to add / update the item master details from one DB to another Db through the SDK and it was working fine long time. But now i faced the error message "This entry already exists in the following tables (ODBC - 2035)" and not updating the items.
below is my code.
If any body have suggestion to resolve this issue let me know
objMainRecset = objMainCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
        objMainRecset.DoQuery("Select ItemCode from OITM where U_Action<>'N'")
        For intItemLoop As Integer = 0 To objMainRecset.RecordCount - 1
            FileName = System.Windows.Forms.Application.StartupPath & "\Item.xml"
            If File.Exists(FileName) Then
                File.Delete(FileName)
            End If
            strItem = objMainRecset.Fields.Item(0).Value
            objMainItem = objMainCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
            If objMainItem.GetByKey(strItem) Then
                objRemoteItem = objRemoteCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems)
                If objRemoteItem.GetByKey(strItem) Then
                    strDflWhs = objRemoteItem.DefaultWarehouse
                    objMainCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                    objMainItem.SaveXML(FileName)
                    objRemoteCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                    objRemoteItem = objRemoteCompany.GetBusinessObjectFromXML(FileName, 0)
                    If objRemoteItem.Update() <> 0 Then
                        WriteErrorlog("Failed to Update item : " & objRemoteItem.ItemCode & ":" & objRemoteCompany.GetLastErrorDescription, sPath)
                    Else
                        WriteErrorlog("Item Code updated : " & objRemoteItem.ItemCode, sPath)
                        If objRemoteItem.GetByKey(strItem) Then
                            objRemoteItem.DefaultWarehouse = strDflWhs
                            objRemoteItem.Update()
                        End If
                    End If
                Else
                    objMainCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                    objMainItem.SaveXML(FileName)
                    objRemoteCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
                    objRemoteItem = objRemoteCompany.GetBusinessObjectFromXML(FileName, 0)
                    If objRemoteItem.Add() <> 0 Then
                        WriteErrorlog("Failed to create item : " & objRemoteCompany.GetLastErrorDescription, sPath)
                    Else
                        WriteErrorlog("New Item Created : " & objRemoteItem.ItemCode, sPath)
                    End If
                End If
            End If
            objMainRecset.MoveNext()
        Next
Thanks in Advance
SenthilKumar

I have the same problem with Business Partners Export/Import, here's my code:
  SAPbobsCOM.BusinessPartners BP = (SAPbobsCOM.BusinessPartners)compaFrom.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
  SAPbobsCOM.BusinessPartners BPDest = (SAPbobsCOM.BusinessPartners)compaTo.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
                                BP.GetByKey(cardcode);
                                compaFrom.Company.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
                                compaTo.Company.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
                                    // Create a temp file to store the new XML file
                                string xml = BP.GetAsXML();
                                XmlDocument doc = new XmlDocument();
                                doc.LoadXml(xml);
                                doc.Save(sTempFileName);
                                if (BPDest.GetByKey(cardcode) == true)
  BpDest = (SAPbobsCOM.BusinessPartners)compa_destinazione.Company.GetBusinessObjectFromXML(sTempFileName, 0);
                                        int ret=BPDest.Update();
I always get, for every BP the error "This entry already exists in the following tables (ODBC - 2035)".
I tried to copy all the properties manually and it works fine, but i don't understand why the xml is not working, i use xml for updating items and it works properly!
I use SAP 8.81 PL 10

Similar Messages

  • Transfer items from one calendar to another (on iMac)

    I have a question: how can you transfer all the items from one calendar into another calendar? I thought I had come up with an ingenious solution, but it didn't work (see below).
    Years ago, I set up a calendar for my wife and I to use as a "family" calendar. After uploading iOS8, I decided to try transfer all the calendar items from our "family" calendar to the newly created Family calendar. I used the Export command  to export all the items in the "family" calendar, and then the Import command to bring them into the Family calendar. BAD IDEA. I got a dialog box telling me the items could not be imported because they were already on the iCloud calendar. This dialog box had to be dismissed by choosing either "Ignore", "Try Again", or "Revert to Server". This dialog box popped up FOR EVERY CALENDAR ITEM. At first I thought I was in an endless loop. I finally put a stapler on my keyboard to hold down the Return key to dismiss the dialog boxes. Even then, it took several minutes to clear the dialog boxes. Apparently, I learned how NOT to transfer items from one calendar to another.

    Okay. I have answered my question. The key is to actually read and follow Apple's instructions (i.e. delete the original calendar AFTER exporting it, but BEFORE importing it into the new calendar.) 

  • How to transfer a calendar items from one month to another

    How can one transfer a calendar item from one month to another month by drag and drop.

    Click it and hold, then drag. If you want to duplicate it, hold down the option/alt key while dragging.

  • Is there a way to move multiple Calendar items from one date to another?

    Hello. I have far too many Calendar items every day in my iCal. Until I finally pare them down to a reasonable level, I need to "reschedule" all of my unfinished ToDo items and reminders, to another day, later in the week.
    There doesn't seem to be any "Select All" feature available.
    Is there a way to move multiple Calendar items from one date to another?
    Thanks in advance!

    Still no ideas? Apple, please come up with a fix. Thanks.

  • Transfering items from one customer to another customer

    Hi Gurus,
    I have a requirement where we have to transfer the items from one customer to another customer in the same company code.
    We should also be clearing the items from the old customer as part of the transfer.
    Is there a way/transaction in ECC 6.0 to achieve this.
    This is not a one-time transfer and the business would like the option of doing it every period (on a case to case basis.) so any standard SAP (transaction) way of doing it would be preferred.
    Best Regards
    ew

    Dear,
    SAP provides you F-51 t code to post transaction with clearing.
    Select radio button transfer posting with clearing and press choose open item button. Give customer name whose blance is to transferred and account key as D. Press process open item and in next screen select line items which needs to be posted. Proceed further give other customer number with posting 01 and do the transfer. Hope it will help
    Regards

  • Standard program to transfer open items from one vendor to another

    Hello to you all,
    Does anyone know of a standard program to transfer open items from one vendor to another,
    Thanks
    Yoav

    Hi,
    i dont know whether there is any program but there is one t.code which is meant for one of this purpose.
    We can do the same through F-51 also. First specify the document header information. for the first line item specify the customer debit or credit posting key, vendor number, and special gl if you want (Here you have to give vendor number to whom you want to transfer) press enter
    in this screen specify the amount. and go to Choose open items new screen will come
    Specify the vendor number and in additional selections choose document number and then click enter. the one line item only appear here then go for simulate. if required specify the narration by double clicking on the line item.
    hope this is clear,
    Regards,
    Sankar

  • A/R transfer open items from one payer to another

    Hello,
    has someone transferred open customer invoice items from one payer to another after the new payer was associated with the customer as a partner? which transaction to best use?
    thanks a lot
    Patrick

    Hi Andreas,
    unfortunately I didn't succeed in posting the transfer. somehow I seem not to be able to pick up the items for clearing in order to transfer them to a new invoice, although I can see them in the open item list. Would you have any hints on how to pull the old invoice into the posting and then create the new one in the same posting?
    thanks a lot
    Patrick

  • Transfer Items from one warehouse to another

    hi,
        i have to transfer Items from one warehouse to another warehouse.
    i have a item which has 3 quantity in warehouse1 now i find that this item belongs to warehouse2  ,i want to shift all it's quantity in 2nd warehouse as well as sets  warehouse2 as default warehouse for that item.
    Regards

    Hi,
    Check this, it will help your query :
    http://help.sap.com/saphelp_sbo2005asp1/helpdata/en/0c/87353e7a069028e10000000a114084/content.htm
    Regards,
    Jitin

  • Using the content aware move tool, I want to move an item from one image to another image but it does not seem to work. I think I need two layers on one document so how do I do this

    Using the content aware move tool, I want to move an item from one image to another image but it does not seem to work. I think I need two layers on one document so how do I do this

    Good day!
    A simple Paste does not work for you?
    It should place the clipboard content as a new Layer which you can then move around.
    If there is any chance that the elements need to be scaled, rotated etc. I would prefer to place them as Smart Objects (File > Place …) and do the masking that is specific to the images themselves in those.
    Regards,
    Pfaffenbichler

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Move workbook item from one sheet to another

    I wonder if anyone else has come across this one...
    According to SAP Help it is possible to move workbook design items from one sheet to another (see http://help.sap.com/saphelp_nw70/helpdata/en/54/a493f7256b43698191a2623e5a0532/frameset.htm
    which says:
    To move a design item, enter different values for the coordinate or both coordinates. To move an item to a different sheet, prefix the values with proper syntax to designate the sheet. To move an item from Sheet1 to Sheet2, for example, enter a value such as Sheet2!$E$5:$G$6.
    However, every time I have tried I get program termination. Has anyone else managed to do this, or experienced the error (and even better, solved it!)?
    Best regards,
    Patrick
    PS. I'm still on the lookout for anyone who has completed a satisfactory upgrade of workbooks to version 7... please do get in touch if you have - it might just provide a light at the end of the tunnel!

    No answer, but I managed to get it to work in the end (albeit painfully). I would be interested to hear from anyone who is currently working with version 7 workbooks, to understand whether you find it a workable solution. We opted to remain with version 3.5, having spent several months investigation version 7.

  • I would love to be able to drag and drop items from one page to another from the plan window. Is that possible?

    In desiging my website, I would like to be able to move items from one page to another by dragging and dropping from the plan architecture screen. It might also help if the window could have a zoom in and out feature to facilitate that.

    I just tried zooming in the plan window and discovered it works.

  • Can I transfer info from one macbook to another by using a firewire cable?

    Can I transfer info from one mac to another by using a firewire cable?

    You can boot the computer that you would like to get the file from into target disk mode.
    This document will help you.
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8443.html

  • How do I transfer files from one computer to another without using cables??

    How do I transfer files from one computer to another without using cables?

    Wifi network
    Email
    Thumb Drive
    Online storage such as, iCloud Google Docs, SkyDrive, etc.

  • How to transfer songs from one iPad to another iPad using iTunes?

    How to transfer songs from one iPad to another iPad using iTunes?

    You can't without a third party app. If you didn't purchase the Music with your Apple ID or if the music was imported from CD's on your friends iTunes library, syncing will not work ....nor will transferring purchases.
    Look at this app .... TouchCopy
    http://www.wideanglesoftware.com/touchcopy/index.php

Maybe you are looking for

  • Problem in alv report output

    Hi friends, i have created alv report .no problem of getting output . but i m getting question mark in the standard menu. it is displaying 10 question mark (sub menu has print preview etc), edit ,question marks(ABC Analysis) ,question marks (abap lis

  • Calendar Program Question

    Hello! Among the lab assignments I have done for my class, I have this calendar project I've been working on for a good while now. My only question is how do I set the days of the month properly with the empty columns I have encoded in the program? T

  • Report Server Misbehaviour

    Hi, We encountered a typical issue on our production AS box and would request your attention to understand this issue & its reason. The details are: Platform: Oracle9iAS R-2 9.0.2.3 on Windows-2000 SP-4 1. We have Oracle9i Reports deployed on Applica

  • What should I do with my white 20" iMac G5 w/ cracked screen?

    I have an old white 20" iMac G5 with a badly cracked screen. I think the LCD itself is cracked because when boot it up i can't see anything but a light gray color. I looked into Apple Recyling and found that they thought the computer had no value, bu

  • Is it possible to change data during a selection

    Hi, is this possible?? E.g. I've a table with a column "first name" and I want to change each appearance of "xy" with some other value. I tried it with an update order at the end of the select statement but didn't work. Anybody some suggestions?? so