GetAsXML hangs on SAPbobsCOM.Documents invoiceObject

Hi there. We have recently moved a customer to a new server, and upgraded from SBO 2005 to SP01.
We have an addon that has worked smoothly before, that loops through invoices for a given date, and generates XML that is then sent to a third party which uses this for electronic invoicing instead of getting them on paper. The addon we use is written in C#, and the code is basically this:
String sql = "SELECT T0.DocEntry, T0.DocNum, T0.Comments, T0.PaymentRef FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode INNER JOIN NNM1 T2 ON T0.Series = T2.Series  WHERE T0.DocDate = '" + date + "' AND T2.SeriesName = 'XML-UF'";
rs.DoQuery(sql);
int total = rs.RecordCount;
String[] xml = new String[total];
while(rs.EoF == false)
     int docEntry = (int)rs.Fields.Item(0).Value;
     int docNum = (int)rs.Fields.Item(1).Value;
     SAPbobsCOM.Documents invoiceObject = (SAPbobsCOM.Documents)MainClass.SBOCompanyObject.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
     invoiceObject.GetByKey(docEntry);
        xml[t] = invoiceObject.GetAsXML();
     //... more happens here
     rs.MoveNext();
The problem is this: After moving to a new, improved server, the application hangs after xml[t] = invoiceObject.GetAsXML(); The cpu goes 100%, and it just hangs. After some 5-10 minutes it seems like it continues to the next row. This used to take no time at all on the previous PC where it ran. What might be the problem? Is there some XML-library that is missing on the new computer? Everything else seems to work fine, including other addons, but the GetAsXML() doesn't work as it should anymore.

I managed to reduce the 15-minutes of fame for the getAsXml() to 2.5 minutes by adjusting SBOCompanyObject.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode;
However, that is still waaay too slow. As I said, it took max 7-8 seconds in PL:06, and as there is a lot of invoices, I simply don't have the time to wait even 2 minutes for each.
Well, as time was running out, I have finally managed to implement a workaround for the problem, sort of. Since getAsXml() did not work as it should in pl45, I had to manually loop through Documents and Document_Lines and make the Xml myself, gladly omitting fields that I don't need. Luckily it seems to work fine. And I'm down to a couple of seconds again. Hopefully the getAsXml() will be fixed so that others don't have to stumble into the same problem as I, but maybe the function will work more smoothly for others, who don't have complex invoices with 200-300 lines based on several different orders.

Similar Messages

  • SAPbobsCOM.Documents.Lines.Text ReadOnly

    I'm trying to do something like this
    oSapInvoice.Lines.Text = oDocDett.Text
    where oSapInvoice is a SAPbobsCOM.Documents, but the Text property is readonly.
    How can I do to copy the column "Item Details" (Text property) in a document line using the SDK?

    Dear Gianluca D'Alessandro,
    Please try following code to add Item Details:
    oSapInvoice.Lines.ItemDetails = oDocDett.Text
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • InDesign CS6 (8.1) hangs when opening documents, intermittent

    InDesign CS6 (8.1) hangs when opening documents, intermittent, and a document that hangs InDesign, after restarting InDesign, will open fine. I found the following track, Re: InDesign CS5.5 Not Responding  for instructions to "force a hang into a crash" and am posting the crash logs to  pastebin.com
    This is the sample process report OPI_Sample9MAY15 - Pastebin.com
    This is the corresponding InDesign Crash log OPI_InDesignCrashLog9MAY15 - Pastebin.com
    I am hoping that someone might be able to read the logs and tell me what is causing InDesign to hang
    For more background information we are using Mac OS X 10.10.3, Within indesign we are using an editorial management software called "NewsEngin GPS" that utilizes Rohohiko's ADIP ToolAssistant plugin and an advertising management plugin "Pagelink" from Mactive/NewsCycle Solutions. These are the only 3 third party vendors that are being used and of course all claim that their products separately are stable under Mac OS 10.10 and InDesign CS6 v8.1.

    Did you try to export the INDD file to IDML, open that and work with the new files?

  • Error when accessing SAPbobsCOM.Documents Object (ErrorCode: -2147417851)

    Hello!
    I have a problem when running this code:
    private SAPbobsCOM.Documents comObject;
    comObject = (SAPbobsCOM.Documents)c.Connection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);
    comObject.Address = "Address";
    Then I get the exception:
    'comObject.Address' threw an exception of type 'System.Runtime.InteropServices.COMException'
    ErrorCode: -2147417851
    I have read the Help and I thinkt that this statements are correct.
    Has anyone an idea to solve this problem?
    Thank you very much.

    Hi Martin,
    The error you get is a COM "Server threw an error"-error. As far as I understand it (which is not very far at all), you've got an invalid underlying handle somewhere.
    You might google for it and find some answers. Mind you the error code is commonly written in hex, so that'll be 80010105.
    IMHO there are two possibilities. Either your code is bogus or your OS is bogus. The problem may have been unveiled by the last patch/upgrade of whatever.
    Firstly, the code. I'm not sure I quite understand what kind of "pooling" you speak of. You said:
    > If there is no Object in the pool a new one will be created, otherwise it will be taken from
    > the pool.
    But that's not really a pool, that's an initialisation-on-demand. Why would you need a collection structure for that?
    You could need a pool if you had connections to multiple databases/companies simultaneously. But why would you need a LIFO ("Stack") for that? Or maybe you multi-thread?
    Anyway, I'd address this possibility first, if I were you. Instead of obtaining a Company Object from witherever you got it until now, create one just before the critical portion of the code. That's just for debugging, of course.
    The other possibility is that your OS is bogus, not in the general kind of way of being Win32, but in the sense that there may be a trouble with your COM service. Try updating it, apply a MS "Service Pack" or however it is called -- maybe you'll find something in in the "Knowledge Base", too.
    But the latter might be kind of tedious, so I'd try to rule out the former, as far as possible, first.
    BTW, have you been able to reproduce this error on different machines?

  • Trouble with SAPBobsCOM.Documents

    Hello everyone.  I am having strange trouble with SAPBobsCOM.Documents that I cannot seem to resolve.  I have used this code before and now it is not working and I don't know why.  When I instantiate an object  as follows:
    Dim oAPCredit As SAPbobsCOM.Documents
    Set oAPCredit = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseCreditNotes)
    If I look at the oAPCredit object, every row says:  Application-defined or Object-defined error
    Then when I try to set the values, the add on completely bombs out.  What is even more strange is that it only fails on me for PurchaseCreditNotes in this company but if I point to another company on another server, it won't work for oDeliveryNotes or oInvoices either, but those do work in my current environment.  Has anyone ever seen anything like this?  I am working in 2005A PL 16 and the DI API is 6.80.318.0.  Any help would be greatly appreciated.
    Thanks so much in advance!  Have a great day!

    One time I had a problem like this, and I saw that the user of B1 that I was using it didn't have enough permissions into SAP B1, so you check the permissions of your user.

  • Retrieving the list of properties SAPbobsCOM.Documents,SAPbobsCOM.Payments,SAPbobsCOM.JournalEntries and SAPbobsCOM.StockTransfer

    Good day,
    Is there a way to get the list of properties of SAPbobsCOM.Documents,SAPbobsCOM.Payments,SAPbobsCOM.JournalEntries and SAPbobsCOM.StockTransfer objects?
    The only thing I can think of now is create a .net function and this function will list the properties one by one which will be tedious because of the number of properties of each object.
    Like this:
    SAPbobsCOM.Payments targetPayment = new SAPbobsCOM.Payments();
    System.Collections.ArrayList arrayListProperties = new System.Collections.ArrayList();
    arrayListProperties.Add(targetDocument.Address.ToString());
    arrayListProperties.Add(targetDocument.<property n>.ToString());
    return arrayListProperties;

    Hi,
    Please repost above discussion in SDK forum and close this thread here.
    Thanks & Regards,
    Nagarajan

  • Acrobat 9 hangs with multiple documents open

    HP pro 6200 4 G RAM, Win7Pro, Acrobat 9(fully updated), single computer affected, multiple users, documents are from C drive, network, and USB
    I've run a repair install, removed the popups/lines and other markup notifications, held shift down when starting to not load add-ins, logged in as another user, updated video card drivers, sprinkled fairy dust, changed desktop resolution(set at 800x600 per user preference), opened same documents on another computer with no problems, and yet I still cannot find out what is causing Acrobat 9 to hang after multiple pages are opened.  Sometimes it will hang completely and I have to go into task manager and kill it, other times the page has a hard time painting as I scroll.  The memory usage doesn't go over 100k in task manager.  If we  close out of the documents with task manager and open them back up it is fine for a while, then it starts back up again.  This seems like a common issue but all the common fixes I found aren't working.  I was not able to find a "preferences" folder under his user folder to delete those settings.
    Anyone have any other ideas?

    From: <[email protected]><br /><br />| I need to scan multiple documents and the "hide scanners interface" is grayed out. I<br />| recently upgraded from Acrobat 8 professional, which occassionally would allow me to<br />| scan multiple docs. Called Adobe and they suggested I upgrade to 9. Still can't scan<br />| multiple docs at a time. Need to set my scanner as not being recognized as a flatbed.<br />| HELP PLEASE!!!<br />| Apparently has something to do with the scanners interface setting.<br /><br />If you really need to scan multiple documents then what you may realy need is a scanner <br />with and Automatic Document Feeder (ADF).<br /><br />-- <br />Dave

  • InDesign CS5.5 and CS6 Hang while opening document

    hello,
    I have the following problem:
    Indesign CS5.5 CS6 and hang up several times a day when opening documents on. the user can not make more in the program and must kill the process. After reopening the document opens without problems (probably the recovery file). I have tried all known solutions (delete Preferences, user with admin privileges, delete caches, safe boot, ...)
    here a hang report, which meanwhile has been created.
    InDesign CS6 hang report - Pastebin.com
    Can anyone see something in it and help me?

    Try SING removal :- http://helpx.adobe.com/indesign/kb/hang-freeze-open-create-file.html

  • Excel 2013 Hangs When Sharing Document as Attachment

    When i have any Excel 2013 document open and click on File, Share, Email, Send as Attachment. A blank email opens with the Document attached, if i save the email as
    a draft Excel will hang/freeze even if when i send off the draft. <o:p></o:p>
    I am aware of the hotifx https://support.microsoft.com/kb/2817349 this has been installed and doesnt make any difference. I have tired repairing
    Microsoft Office and rebooting but doesnt make a difference. Microsft Office 2013 pro is running on Windows 2008 r2 terminal server. 
    Event Log Created:
    The program EXCEL.EXE version 15.0.4420.1017 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Action Center control panel.
     Process ID: 23c0
     Start Time: 01cfeca45978e7ca
     Termination Time: 0
     Application Path: C:\Program Files\Microsoft Office\Office15\EXCEL.EXE
     Report Id: b876f500-5897-11e4-b87d-005056943393
    Has anyone had this issue or know if there is a fix?

    Hi,
    In regarding of the issue, it might be caused by some reasons:
    Firstly, the Outlook and Excel add-ins might cause this issue, please try to disable them to test first. Similar issue:
    Secondly, this issue also might be caused by "Mapi32.dll", please rename Mapi32.dll (found in C:\Windows\system32) to Mapi32.old and then run
    FIXMAPI.exe .
    Thirdly, check the properties for your outlook shortcut. Under the compatability tab uncheck "run as administrator".
    If this issue still exists, please try to collect the app crash dump file to do further troubleshooting:
    Enable app crash dump collection by copying following words into notepad, saving it as dump.reg and importing
    it:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\localdumps\EXCEL.EXE]
    "DumpFolder"=hex(2):63,00,3a,00,5c,00,63,00,72,00,61,00,73,00,68,00,64,00,75,\
      00,6d,00,70,00,73,00,00,00
    "DumpCount"=dword:00000010
    "DumpType"=dword:00000001
    "CustomDumpFlags"=dword:00000000
    Then, open excel
    to repro the issue. If crash issue appeared, please find the crashdump file under c:\.
    To further help you, please upload this file into Skydrive and shared the link here.
    Also, you can try to analyze dump by yourself if you would like to:
    How to analyze app crash dump file:
    http://blogs.technet.com/b/askperf/archive/2007/05/29/basic-debugging-of-an-application-crash.aspx
    Regards,
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

  • Microsoft Word Hangs When Opening Document From SharePoint 2010 Document Library

    I am running into an issue where Word hangs when opening certain files from a document library.  When the issue occurs, Word opens and hangs at the Downloading <Doc URL> stage.  I have tried disabling the SharePoint plugins in IE and that
    makes no difference.  I can download a local copy of the file and open in just fine.  The file in questions exists in a separate document library where it can be opened just fine (The file was copied to the library where the issue is occurring by
    a Workflow).  The issue also has only occurred on .docx files and not .doc, however, not all docx files are having the issue.
    Does anyone have any thoughts on what might be causing this?
    Thanks.

    Hi,
    According to your post, my understanding is that when you opened a certain files from a document library, it hanged at the downloading stage.
    I tried to reproduce the issue, after coping by a workflow, the .docx files opened well in my environment.
    Did the issue occur in other documents libraries? You can copy the files to a new documents library by workflow, then check whether it works.
    For more details we also can check the SharePoint ULS logs.
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
    Have you check your IE settings (Tools->options->connections->LAN settings->uncheck Automatically detect settings).
    Please also use fidder tools to detect the process. You can download it by the following link.
    http://fiddler2.com/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Excel 2013 hangs after sharing document per email

    Hello everyone.
    We have an issue with Outlook 2013.
    If you disable local email caching in Outlook 2013 and you are trying to share a document via email in e.g. Excel (but also Acrobat reader and several other programs) the email gets send, but Excel hangs (not responding). 
    When you enable the local cache the problem disappears.
    This is an issue for us, since we are using ssd's with limited capacity and the cache file can increase untill somewhere between 25 and 30 GB.
    Is there a different solution to this issue? And why is this happening in the first place?

    Hi,
    Try to test whether the issue will occur to all the computers. If not, then try to repair and disable all the add-ins to check the issue.
    Jaynet Zhang
    TechNet Community Support

  • Dreamweaver hangs when opening document

    I am using Dreamweaver CS5, 11.0 Build 4964 on a MAC.
    I have a couple of pages that I was editing and then for no reason Dreamweaver decided to hang in the middle of editing. And now Dreamweaver will not open the document anymore. I just get the spinning beachball and have to force quit Dreamweaver.  Other co-workers can open the pages without any problems. I've checked the coding and don't see anything that would cause Dreamweaver to freak out.
    I've tried new preference files and adding resolveremoteurltoipaddress=FALSE to the Remote Downloads section of the prefs. Nothing works.  Anyone have any other suggestions as to why Dreamweaver just suddenly stops opening certain files?

    I'm trying to remember. I believe there was something in the HTML that Dreamweaver just didn't like. I don't think I ever figured out exactly what. I ended up working with the pages that crashed Dreamweaver in notepad.  It only ever happend to me on a page here or there not everything.
    I believe once I edited the page in notepad and got past the part that was freaking Dreamweaver out I could then work with the page without any issues.
    Not much help there...

  • CS3 hangs on multiple document data merge

    I am using data merge to create documents for high school graduation issues for two different high schools for the newspaper I work for.
    For each school, I have created a single document data merge to print proofs of the individual students. For the first and largest school,
    I've done a successful test run of a multiple document data merge of all the students. I then used the Excel .txt file from high school #1 to create the .txt file for high school #2. We have successfully done the individual data merges for proofs for each of the students in high school #2.
    However, when I try to run the multiple document data merge for high school #2, InDesign gives me the spinning wheel of death. Forever.
    I cand run or preview a single item, but it hangs up if I try to run them all or a range (even just 1-2).
    I am stumped as to why in what are basically the same documents one works and the other does not. Can anyone help?

    Brainstorming with a co-worker solved the problem. A graphic I was using was too large for InDesign to handle on the multiple document data merge. So I reducd the file size, and that did the trick.

  • SAPbobsCOM.Documents.Lines Delete/Remove

    Is it true that there is still no API to delete line items for Document objects? (I cannot find one in version 6.5)
    Does 2004 include this feature? Is there a workaround?
    Making the Price and Quantity zero is not an option for me.

    Same as My Problem We Cannot Force to Use Recordset. Because it is directly manipulate to the SBO SQl Server (even SAP Manage refuse to say that )
    John Mackin said that we can use dummy item. And I have tried that way. It works in header decoument summary (For Total Document,Sum Tax,etc) but in appearance users are dislike to see item that have no price and quantity in Documents Forms Matrix and off course  the cancelled item will be appeared in Report.
    ==========================================
    oOrder.Lines.SetCurrentLine (sFields(1))
                  oOrder.Remove
                  oOrder.Lines.ItemCode = "Cancelled"
                  oOrder.Lines.Price = "0"
                  oOrder.Lines.Quantity = "0"
                  oOrder.Lines.Currency = sFields(6)
                 lRetCode = oOrder.Update
                 If lRetCode <> 0 Then
                    Call oCompany.GetLastError(nErr, errMsg)
                    If (0 <> nErr) Then
                    SBOApplication.SetStatusBarMessage "Found error:" + Str(nErr) + "," + errMsg "
                    End If
    ==================================
    I dont know what to do , maybe we can wait from SAP Manage how to handle this problem.
    Cheers,
    Hamdi

  • Illustrator CS3 hangs when opening document

    Hey
    Since this morning, on one of our Intel iMacs, Illustrator just won't open any documents. The program load screen shows up, completes and gives you the dialogue box about opening recent files or new files etc. But when you try and open anything you simply get the colour "wheel of death" and you have to Force Quit Illustrator.
    I have tried deleting preferences, reinstalling, and running programs like Onyx to clean disks etc, but nothing seems to work. We have also taken the files over to other Macs where they open perfectly fine. It's really just on this one iMac.
    Any ideas would be very very helpful.
    Thanks

    Very strange. I'm looking into it now. It was just a DVD with some of our old backup files. The designer was trying to look at previous work files. It caused the crash on his iMac and on a Macbook Pro that we have extra. I also put the disk into my G5 PPC and I wasn't having any problems, until I tried to open a specific Illustrator file on the disk itself. Must just be a corrupt file of some sorts. But as soon as I remove the disk again, everything runs smoooothly :-)

Maybe you are looking for

  • How do I view attachments in iCal

    Hi All, I'm trying to use iCal for my work appointments. My appointments comes with files attached (schedules, notes, all in rtf format) and when I open one, highlight the file attached (that at this point has lost his original name and became someth

  • SQL (Injection) Vs Flat File TXT Vs XML (XPath Injection) For Database.

    I will have to deal with robust login sessions so I need some advice on what type of database and language I will use. PHP and MySQL is the choice but I hear that flat file TXT are more faster so I am thinking about Perl. Perl is very flexiple and ha

  • Help! flash player problem

    Well i just downloaded the new version of Flash and well ever since i cant open any page that contains flas thingy... i cant even open youtube or this page http://www.adobe.com/products/flash/about/ that is where the thing takes me i get this msg: Th

  • How to show bookmarks on the navigator toolbar using userchrome?

    Hello, I am suing Firefox in the kiosk mode using R-Kiosk, and I have hidden the exit button, urlbar and searchbar in fullscreen using userchrome. I would like to put my bookmakrs instead of the urlbar, using userchrome - simple drag and drop does no

  • IW32 - Print Attachment Document at the time of form printing

    Hi, Anyone help me how to print attachement document in Maintenance Order Document ( IW32 ), by the time of Form printing ? Regards, Hary