User Defined Table locked when multi users try to save data?

Hi All,
I am having a problem with User Define Table (UDT). I am just checking if somebody having the same problem as mine (any patch level).
I've developed an add-on to save additional data to some UDTs upon saving a Production Order. I added my code in FormDataEvent (After Action = True and ActionSuccess = True).
Here are my sequences to save the data:
1. Start Transaction
2. Remove Existing Data from 3 UDTs linked to the production order number.
3. Save to table 1, using UserTable object
4. Call function A to save to table2 , using UserTable object
5. Call function B to save to table 3, using UserTable object
6. Commit Transaction.
Note: I have a try catch and rollback the transaction if any exception thrown by .NET and SAP. Below are parts of my coding to handle exception from SAP
                If oUserTable.Add() <> 0 Then
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    Throw New ApplicationException(ErrCode & "-" & ErrMsg)
                End If
in the try catch block, i add the following code
            If oCompany.InTransaction Then
                oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
                SBO_Application.MessageBox("[SaveRoute]:" & ex.Message)
                Return False
            End If
Now, the issue is in some occasions, when multi users try to save the Production Order, the data get deleted from the UDTs, but some of the data did not get saved yet it did not throw an exception. From our observation, it only happens when multi users are trying to save to the same table.
Does anybody having the same or similar issue? Really appreciate if you can share on this.
Many Thanks,
Harianto Ng

I Believe you should look carefully where in your code writting, you should start transaction and be sure of using end.transaction commit if the insert sends a succesfull message, and rollback it for negative message.
I used to start transacción right before .add method
Wha DBMS are u using?
Hope it helps.

Similar Messages

  • Releasing table locks when user closes browser

    Hi, I've read the blogs and tried some of the code that people have suggested but it just never seems to work.  I have locked table entries belonging to a stateful 2003 BSP.  The user closes the browser by means of the 'X' and the table locks remain.  I have table lock releases in the 'OnDestroy' event but that never seems to occur.  I have tried inserting JavaScript to capture the closing of the window but either it captures every other event or it gets confused when navigating to another page.  I have the redirect examples however they all seem to be part of a proper logoff procedure, rather than the cowboy approach of just shutting down the browser.  There must be a simple procedure out there to do this.  Is there a complete example somewhere?
    Any help will be appreciated,
    Kevin

    Hi Raja, ok I discovered why it isn't working and it really is quite obvious.  The browser that it's being tested on has a Google toolbar installed. Among other things this toolbar allows users to block the display of popups.  If this is selected the script will not run properly as it needs the alert to allow the server side to run.  This is going to be frustrating because while most of the user's desktop is managed by the corporation they still have the ability to add toolbars to their browsers and configure them, and I'm sure most people will select the popup blocker. 
    Kevin

  • Data in the table changes when multiple users try to submit data

    I have a dynamic table. The table is created in the wdDoModifyView. The user can load data into the table from an excel file. So I have a "Load" button that loads the data from the selected excel file to the table. I also have a "Submit" button. This "Submit" button converts the data to an xml file and make a call to an oracle stored procedure for validation check. If there's an error it will be returned and displayed to the user. If none, a summary of data for posting will be displayed to the user. If the data is correct and the user hit the ok button, the same data will be return to oracle sp for loading in the table.
    The problem we encountered is when multiple users are loading and submitting at the same time, the data displayed in the dynamic tables changes after clicking the ok button. It is as if, the table displays the data being loaded by other user.
    This is an error that is difficult to recreate. This doesn't happen all the time. I hope you somebody could enlighten me why this is happening. I'm not sure if it has something to do with multithreading or session.
    Edited by: Marlyn Agco on Apr 14, 2009 3:57 PM

    Hi Armin,
    Did you mean storing view instances in static references and accessing them outside the wdDoModifyView is not a good idea? In wdDoInit the nodes are dynamically created according to the xml file being returned by the database. This node is stored in a static variable which is also used in wdDoModifyView to create the dynamic table.
    What do you suggest? We're still encountering same issue when multiple users are uploading data.

  • Cube lock when multi-request insert at same time

    Hi, experts,
       I don't requite understand cube lock mechanism in BW.
    right now I found if I load two data source A request into one cube when data souce B request is running, the cube is lock which cause both two job is go to dead waiting.
       but I heard BW can allow two request loading to CUBE at same time, right?  and cube only will be locked when it roll up data to aggregate.
    anybody can make me more clear conception. thanks a lot

    Hi,
    See the locking logic:
    http://help.sap.com/saphelp_sem40bw/helpdata/en/bb/bdd69f856a67418962d74bfd7bd8af/frameset.htm
    Probably, reconstructing of indexes or updating statistics locks the cube.
    Also here:
    http://help.sap.com/saphelp_sem40bw/helpdata/en/91/270f38b165400fe10000009b38f8cf/frameset.htm
    they said that "During parallel loading of requests in an InfoCube, these automatic processes can lock each other out".
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • Users unable to save data in .pdf

    Greetings,
    I created a rather simple form in LiveCycle Designer 8.2.  However, when users open the form in Acrobat Reader 9.0+ they are informed that they cannot save the data in the file and that it must be printed out.  I've looked through Ted Padova/Angie Okamoto's PDF Forms using LiveCycle Bible and have found nothing that can remotely explain this.  Perhaps I have missed a step, an option or saved it correctly.  Can anyone out there give me a hint, an explaination, or a fix for this problem?
    Thanks!

    Hi,
    The issue is that the form will have certain restrictions when opened in Reader. For example, users cannot save the data that they have entered into the form.
    There is a step you can take, which is to "Reader Enable" the form before you send it out. There are two approaches:
    You can Reader Enable the form using Acrobat Standard v9 and above or Acrobat Pro v8.
    You can use the full server product LC Reader Extensions ES2 to apply the Reader rights. 
    The features that are available to the user will depend on which was you apply the Reader rights.
    For example:
    In your situation, you are at Option 2: form is not Reader Enabled and the user opens the form in Reader.
    In order to enable the user to be able to save the data in the form, you need to get to Option 3 (enabling the form using Acrobat) OR Option 4 (enabling the form using LC Reader Extensions).
    There is more information here: http://assure.ly/etkFNU.
    Please note that there are licensing restrictions in Reader Enabling a form in Acrobat. Also you need to Reader Enable the form before you send it out to the users.
    Hope that helps,
    Niall

  • How do I give user rights to save data entered into a form?

    I created a form in LiveCycle and open it using XI.  When I open the form, I can fill out the form but I can only print the form.  I have tried changing the security in Livecycle to allow users to save the form with their changes.  I have tried to distribute the form but it doesn't send.  I don't need the information sent back to me though.  This is a form that everyone in my department uses and saves to their local drives.  Any suggestions?

    You don't Reader-enable a form with Reader, you have to do it with Acrobat. Once the form is Reader-enabled with Acrobat, it will be savable with Reader. In Acrobat 9 you'd select:
    Advanced > Extend Features in Adobe Reader
    By the way, there is no Acrobat/Reader IX, though there is a version 9. They didn't start with the roman numerals until version 10 (X).

  • User exit for save data in T.code PA40 ABAP-HR

    Hi Expart,
    what is the user exit which is trigger when we save the data through pa40 transaction which check the latest update in the database.
    Kindly give me exit name .

    Hi Vikash ,
    Please refer to below Exits :
    HRPBAS01            User Exit for HR Master Data
    HRPC0001            HR: PC download authorization
    HRRPAI01            User exit for FB HR_ENTRY_DATE and HR_LEAVING_DATE
    PARA0001            Enhancement for Determining the Number of Periods
    PARA0002            Enhancement for Calculating Annual Salary; IT0008,14,15
    PBAS0001            PA: Pers.Admin./Recruitment: Default values and checks
    PBAS0002            PA: Enhancements for Personnel Administration - Menu
    PBASRP01            PA: User exit distributed reporting
    Hope this will help you.
    Regards,
    Nikhil

  • Error while linking user defined table to user defined field using vb6.0

    Hi,
    I am creating a userdefined field on a SAPB1 table(PDN1) using vb 6.0
    I am trying to link this field to a user defined table.
    When i do that i get the following error:
    "The field 'Related table' should consist of 8 alphanumeric chracters with no valid or default values"
    When i try to do the same thing from SAPB1(not using code) there is no such problem.
    My vb code is as follows:
    Set oUserFieldsMD = oCmp.GetBusinessObject(oUserFields)
    oUserFieldsMD.TableName = "PDN1"
    oUserFieldsMD.Name = "OB_Locn"
    oUserFieldsMD.Description = "WH Location"
    oUserFieldsMD.Type = db_Alpha
    oUserFieldsMD.EditSize = 30
    lRetCode = oUserFieldsMD.Add
    If lRetCode <> 0 Then
        oCmp.GetLastError lErrCode, sErrMsg
        MsgBox sErrMsg
        GoTo Err_
    End If
    If Not oUserFieldsMD.GetByKey("PDN1", 0) Then
        MsgBox "Error"
        GoTo Err_
    End If
    oUserFieldsMD.LinkedTable = "OB_TEST"
    lRetCode = oUserFieldsMD.Update
    Your help will be much appreciated.
    Thanks.

    Great Sébastien!
    Looks like we could not survive here one day without your contribution
    Best regards,
    Frank
    PS: For readers of this thread who don't understand why
    EditSize
    must be "8":
    This is the size of the
    Code
    field in the user-defined table to which the new field OB_Locn (in the DB it will be U_OB_Locn) is linked to...
    So, it should be preferrably of the same size.

  • How to insert data into a table only when data has changed its value (when compared to the previous inserted value)

    I wish to insert data into a table only when the value of the inserted data has changed. Thus, in a time series, if the value of the data at time, t-1, is 206 then if the data to be inserted at time t is 206, then it is skipped (not entered).
    If the value of the data at time t+1 is 206, it is skipped also; until the value changes, so if the value at t+1 was 205, then that would be inserted, and if at time t+2 the data is 206, it would be inserted too.
    What is the best way to do it without increasing overheads?

    This view works:
    SELECT
    i.IDNO,i.[Date],i.[Level]
    FROM
    mytable i
    INNER
    JOIN mytable
    d
    ON
    d.IDNO
    = i.IDNO-1
    WHERE
    i.[Level]
    <> d.[Level]
    on this mytable below.  A trigger could be quite useful here although I am cautious using them. However I wish to avoid the overhead by not having a temp table (which could be sizable).  mytable below
    should give 3 lines. The IDNO is an identity column.
    IDNO
    Item
    Date
    Level
    1
    X24
    12/23/13 10:41
    22996
    2
    X24
    12/23/13 10:41
    22996
    3
    X24
    12/23/13 9:21
    23256
    4
    X24
    12/23/13 9:21
    23256
    5
    X24
    12/23/13 9:22
    23256
    6
    X24
    12/23/13 9:22
    23256
    7
    X24
    12/23/13 9:22
    22916

  • DI error when binding user defined table

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

    Hi,
    I am using matrix. Im binding a User defined table '@NEW' to a Datasource
    oForm.DataSources.DBDataSources.Add("@NEW")
    I also bind the fields to column of the matrix as given below
    oColumn = oColumns.Item("CodeNo")
    oColumn.DataBind.SetBound(True, "@NEW", "U_CodeNo")
    When the table @New contains no records i get error while binding the fields to the matrix.
    I tried the same using STANDARD SAP tables.I am not getting any error and it works fine.
    Can anyone help me?

  • Syntax error when creating a user-defined table type in SQL Server 2012

    Why am I getting a syntax error when creating a user-defined table type in SQL Server 2014?
    CREATE TYPE ReportsTableType AS TABLE 
    ( reportId INT
    , questionId INT
    , questionOrder INT );
    Results:
    Msg 156, Level 15, State 1, Line 1
    Incorrect syntax near the keyword 'AS'.

    Hope these posts could help, 
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/37a45a9a-ed8c-4655-be93-f6e6d5ef44be/getting-incorrect-syntax-while-creating-a-table-type-in-sql-server-2008-r2?forum=transactsql
    Regards, Dineshkumar,
    Please Mark as Answer if my post answers your question and
    Vote as Helpful if it helps you

  • User defined table type output not coming

    hi all,
    i have a userdefined type delcared as:
    create or replace TYPE SAMPLE_SEARCH AS OBJECT (
    -- LIST OF VARIABLE NAMES AND RESPECTIVE DATA TYPE
    i have a user defined table type defined as:
    create or replace TYPE SAMPLE_SEARCH_TABLE IS TABLE OF SAMPLE_SEARCH;
    I have a stored proc which has an output paramter of type SAMPLE_sEARCH_TABLE.
    that is,
    sp_sample_proc(sample_search_tb OUT SAMPLE_SEARCH_TABLE);
    When i invoke the above stored proc from an anonymous pl/sql block , how can i display the contents of the output parameter using dbms_Output statements?

    Try this.........This is just a sample code.
    CREATE OR REPLACE TYPE address1 AS OBJECT
    (country VARCHAR2(1000),
    city VARCHAR2(1000),
    zip NUMBER,
    add1 VARCHAR2(4000),
    add2 VARCHAR2(4000));
    CREATE OR REPLACE TYPE t_addObj IS TABLE OF address1;
    CREATE OR REPLACE PROCEDURE Sp_Address_Obj(Out_Add_Obj OUT t_Addobj) IS
    v_Addobj t_Addobj := t_Addobj();
    BEGIN
    SELECT Address1(u.Object_Name,
    u.Object_Type,
    u.Object_Id,
    'Add01' || Rownum,
    'Add02' || Rownum) BULK COLLECT
    INTO v_Addobj
    FROM User_Objects u;
    Out_Add_Obj := v_Addobj;
    END Sp_Address_Obj;
    DECLARE
    v_Addobj t_Addobj := t_Addobj();
    BEGIN
    Sp_Address_Obj(v_Addobj);
    Dbms_Output.Put_Line(v_Addobj(1).City);
    FOR i IN 1 .. v_Addobj.Count LOOP
    Dbms_Output.Put_Line(v_Addobj(i).Country || '-' ||
    v_Addobj(i).City || '-' ||
    v_Addobj(i).Zip || '-' ||
    v_Addobj(i).Add1 || '-' ||
    v_Addobj(i).Add2);
    END LOOP;
    END;

  • Problems adding new rows to a simple user defined table manually

    Hi
    I have just created a user defined table ( SAP 2007 SP01 PL9 ) but when I try to add a line using tools ->userdefined tables I get the following error -
    conversion failed when converting the nvarchar value '-3 @GLMAP to data type int ( CINF )
    The table is called GLMAP and I simply added 3 alpha fields
    I  put 1 into all the fields on screen
    Can anyone suggest anything please as ideally I would like the end user to be able to update this simple table
    Many thanks
    Regards Andy

    Andy
    I think in your case you have used  DBDataSource to display data from UDT on your form. 
    Easyier to use UDO than User Defined Table, because you do not have to programming at UDO based forms.
    What István tried to say:
    Check your sp_transactionnotification procedure, maybe you have used @object_type variable as integer instead of nvarchar
    Regards
    J

  • CANT execute query with parameter on user defined tables using query genera

    Dear All,
    I have problem when executing query with parameter on user defined tables using query generator.
    It seems SBO cannot accept parameter to query user defined tables.
    I've tried these:
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = [%0] --- this FAIL
    I try to pass the value directly without using parameter and It works
    SELECT T0.U_Status FROM [@ST_PR_H] T0 WHERE T0.U_Status = 2 --- this SUCCESS
    This one works
    SELECT * FROM RDOC T0 WHERE T0.width =[%0]  --- this SUCCESS
    and this one works too
    SELECT * FROM RDOC T0 WHERE T0.width = 595  --- this SUCCESS
    Is there anyone can help me ....???
    Thanks,
    Alfa

    I  generated this code using query wizard ....
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = (N'2' )
    and replaced the (N'2' ) with [%0]
    SELECT T0.[U_Status] AS 'Document Status' FROM  [dbo].[@ST_PR_H] T0  WHERE T0.[U_Status] = [%0]
    and It worked ......
    Thanks 4 all .....

  • Problem in EIS with "user-defined table"

    Platform : z/osrdbms : db2 v7Olap : Db2OlapMy problem :I try to make a "User-Defined table" in a meta-model whith this SQL definitionselect a.idele, a.idele0, b.lbele from u1g.fordv0 a, u1g.eledv0 b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim(description of the two simple table :CREATE TABLE U1G.ARBD ( IDDIM INTEGER NOT NULL, IDARB INTEGER NOT NULL, LBARB VARCHAR(255) NOT NULL, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP ) CREATE TABLE U1G.ELED ( IDDIM INTEGER NOT NULL, IDELE INTEGER NOT NULL, LBELE VARCHAR(255) NOT NULL, DDVAL DATE NOT NULL, DFVAL DATE, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP, MDCEL CHAR(1) NOT NULL, TYPE CHAR(1) NOT NULL ) )When i look at this "user-defined table" data in the meta model, it's okWhen i try to use this table as a dimension in a meta-outiline, it's okexcept when i try to load members in a cube.The load result say "the load terminated with errors"I look in the IS log :?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Error/-104/Build-PQ72292 {DB2 for OS/390}{ODBC Driver}{DSN07011} DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL ".". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: + - AS <IDENTIFIER> DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = 0 0 0 -1 69 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF' X'00000045' X'00000000' SQL DIAGNOSTIC INFORMATION ERRLOC=1:13:1 ?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Informational/-104/Build-PQ72292 SELECT. aa."IDELE0", aa."IDELE", aa."LBELE" FROM.(select a."idele" .., a."idele0" .., b."lbele" from u1g.fordv0 a, u1g."eledv0" b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim) aaI don't understand why it's working in the meta model (the sql is good, i got the data)and why it's not working in the meta outline ?

    Platform : z/osrdbms : db2 v7Olap : Db2OlapMy problem :I try to make a "User-Defined table" in a meta-model whith this SQL definitionselect a.idele, a.idele0, b.lbele from u1g.fordv0 a, u1g.eledv0 b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim(description of the two simple table :CREATE TABLE U1G.ARBD ( IDDIM INTEGER NOT NULL, IDARB INTEGER NOT NULL, LBARB VARCHAR(255) NOT NULL, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP ) CREATE TABLE U1G.ELED ( IDDIM INTEGER NOT NULL, IDELE INTEGER NOT NULL, LBELE VARCHAR(255) NOT NULL, DDVAL DATE NOT NULL, DFVAL DATE, DTCRE TIMESTAMP NOT NULL WITH DEFAULT, DTMAJ TIMESTAMP, MDCEL CHAR(1) NOT NULL, TYPE CHAR(1) NOT NULL ) )When i look at this "user-defined table" data in the meta model, it's okWhen i try to use this table as a dimension in a meta-outiline, it's okexcept when i try to load members in a cube.The load result say "the load terminated with errors"I look in the IS log :?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Error/-104/Build-PQ72292 {DB2 for OS/390}{ODBC Driver}{DSN07011} DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL ".". SOME SYMBOLS THAT MIGHT BE LEGAL ARE: + - AS <IDENTIFIER> DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = 0 0 0 -1 69 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF' X'00000045' X'00000000' SQL DIAGNOSTIC INFORMATION ERRLOC=1:13:1 ?Tue Jul 27 10:56:40 2004~ /IS/Worker/0x0/1090922163/Informational/-104/Build-PQ72292 SELECT. aa."IDELE0", aa."IDELE", aa."LBELE" FROM.(select a."idele" .., a."idele0" .., b."lbele" from u1g.fordv0 a, u1g."eledv0" b where a.iddim = 4 and a.idarb = 10 and a.idele = b.idele and a.iddim = b.iddim) aaI don't understand why it's working in the meta model (the sql is good, i got the data)and why it's not working in the meta outline ?

Maybe you are looking for

  • How to call a parametrized procedure from a htp.formsubmit

    Hi there, i'm trying to call a procedure with parameters from my formsubmit. i would like to call that procedure once my submit button is pressed. I did this : HTP.formOpen(twbkwbis.f_cgibin||'MyPackage.MyProcedure(param1, param2, param3, param4)');

  • Chinese characters in TextInput

    Hi I'm unable to paste chinese characters in a textInput control, no characters are added... The users of my flex application could be of any language and should be able to enter characters in the TextInput... Any idea ? Antoine

  • Column Headings on 2 line with Interactive reports

    I neecd to have my column heading take up two line (wrap), Like this: Order Time I can do this with :Order </br>Time" but the "</br>" tag now shows in the all the Interactive dropdowns. Any idea on how to get around this?

  • Sql to extract data from XML column

    Hi I am able to get the the following data to Apex_collection, Can you help me how to transform it to muliple rows for EventNumber,EventDesc columns. I have tried with Extractvalue it returns null. <?xml version="1.0" encoding="ISO-8859-1"?> <ResultS

  • I know this has been discussed

    I did a search but I guess im not typing something in right. I was wondering if there is anyway to put everything that is on my ipod on to itunes. My itunes has been completely erased and I have all the tunes on my ipod but I am not sure if they can