Skip to Content
author's profile photo Former Member
Former Member

Multithread DI API.

Hello,

Is the DI API Multithread safe?

I have to generate hundreads of orders and hundred of deliveryNotes programatically, but the time each document object takes to save the data into the database is hugh, because it makes several round trips to the DB, in the visinity of 0.5 to 1 minute for each document. Because my total time is the accomulative round trip time, i have only one solution, to generate one thread for each document in witch I will have two steps:

1º add all the lines in a cycle.

2º add the document (header)

Note: The is a litle problem of getting all the numbers of the documents generated because the interface only get's the last document generated, but I can work around it.

The problem is to know if DI API is thread Safe?

Best regards,

Carlos Goetz

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Apr 11, 2008 at 12:56 PM

    Hi Carlos,

    If speed is of great importance, consider going to a 64Bit Windows and SQL server, we di some test for a customer and has DI API improvements up to 80%.(creating a Goods Issue and Goods Receipt, and Journal Entry and Stock Transfer went from 10 seconds down to 2 seconds).

    going to 64bit will also improved the speed of the SBO Client.

    ps. The DI API is thread safe, but you have the possibility of lock (error -2038).

    Regards

    Ad

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 11, 2008 at 12:26 PM

    Carlos,

    i think DIAPI ist Multithread safe, but you will have no real advantage.

    because when one thread adds a big document the sap is anyway "frozen".

    so the second thread can create the document but the add will anyway happen sequently.

    regards

    David

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.