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

Issue with multiple Users working on Same Addon

Hi,

We have an addon which will insert a record into a particular UDT on creation of GRPO, Goods Receipt, and Inventory Transfers. The add on works perfectly when used in a Single User enviornment. But when multiple users create the document from different locations, some entries are not created in the UDT. ie; On an average 2-3 entries are missing per day. The UDT updation is done by using DI API.

Note: The issue happens only randomly.ie; We guess, when two users create document exactly the same instance of time this happens.

Is there any way to resolve this issue?.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2010 at 10:10 AM

    Hello,

    Could you share us your code how the insert is made. When working with recordsets in SAP SDK it is important to drop the object and clear memory when you're done with the transaction. This should be coded. If you do not do this properly this can cause memory allocation problems which can occur on an irregular basis.

    In my opinion the failure of insert into a table because of a locking table is less likely as it is handled by SQL server: SQL server will automatically lock and unlock tables. If this happens you maybe find some errors in the SQL server logs.

    Kind regards,

    Winfried Tiemessen

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      if it is an issue with DI API object as Winfried assumed, you have to release and clear the object.

      I have created a small method for this procedure when creating tables. Just put your Recordset object in the parameter sapObjectMD.

      private void releaseObjectMD(object sapObjectMD)
      {
      	System.Runtime.InteropServices.Marshal.ReleaseComObject(sapObjectMD);
      	sapObjectMD = null;
      	GC.Collect();
      }

      Regards

      Sebastian

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2010 at 09:11 AM

    Hello

    You transactions to update the complete processes in your code.

    This issue happens when 2 users would like to access to the same data (table) and 1ts user is started a transaction, and the second user cannot access to any data during the transaction is processed. Please note: company transaction can handle this situation, but slows done the performance.

    Tip: Use statusbar.Settext method to save the error messages into the system log for more analisys: the SetText method is writing the system log, which can be readed later on from SAP B1. in 2007 version.

    for transactions read the following thread:

    Regards

    János

    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.