This entry already exist when adding an alert

Hi,
I still have this error every time I send an alert to a group of recipient.
It seems that for some reason,  some users receiving messages that aren't loging in for some times I have this error poping up when sending alerts :
"This entry already exists in the following table (ODBC - 2035)"
What do I have to know about sending alerts ?
Here's the code used to send alert.
SAPbobsCOM.CompanyService oCmpSrv = null;
MessagesService oMessageService = null;
SAPbobsCOM.Message oMessage = null;
MessageDataColumns pMessageDataColumns = null;
MessageDataColumn pMessageDataColumn = null;
MessageDataLines oLines = null;
MessageDataLine oLine = null;
RecipientCollection oRecipientCollection = null;
try
    oCmpSrv = oCompany.GetCompanyService();
    oMessageService = ((SAPbobsCOM.MessagesService)(oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)));
    oMessage = ((SAPbobsCOM.Message)(oMessageService.GetDataInterface(MessagesServiceDataInterfaces.msdiMessage)));
    oMessage.Subject = Subject;
    oMessage.Text = Body;
    oRecipientCollection = oMessage.RecipientCollection;
    foreach (string RecipientName in Recipients)
        oRecipientCollection.Add();
        oRecipientCollection.Item(oRecipientCollection.Count - 1).SendInternal = BoYesNoEnum.tYES;
        oRecipientCollection.Item(oRecipientCollection.Count - 1).UserCode = GetUserCode(RecipientName, oCompany);
    // Don't add a document link if we pass -1 as parameter.
    if (ObjectType != -1)
        // get columns data
        pMessageDataColumns = oMessage.MessageDataColumns;
        // get column
        pMessageDataColumn = pMessageDataColumns.Add();
        // set column name
        pMessageDataColumn.ColumnName = ColumnName;
        // set link to a real object in the application
        pMessageDataColumn.Link = (ObjectType != -1 ? BoYesNoEnum.tYES : BoYesNoEnum.tNO);
        // get lines
        oLines = pMessageDataColumn.MessageDataLines;
        // add new line
        oLine = oLines.Add();
        // set the line value
        oLine.Value = ObjectKey;
        // set the link to BusinessPartner (the object type for Bp is 2)
        oLine.Object = ObjectType.ToString();
        // set the Bp code
        oLine.ObjectKey = ObjectKey;
    // send the message
    oMessageService.SendMessage(oMessage);
    return "";
catch (Exception ex)
    return ex.Message;
if I send message only to the current user there's no problem.  but since the recipient list have 3 users, the 2 other users are rarely opening SAP
It can be the way I'm filling the recipients but I'm not sure.

Hi,
It's in C# but enjoy this :
/// <summary>
                /// Send an alert to a recipient
                /// </summary>
                /// <param name="RecipientName">The name of the recipient</param>
                /// <param name="Subject">The subject of the message</param>
                /// <param name="Body">The message</param>
                /// <param name="ColumnName">The name of the column shown on for the document sent</param>
                /// <param name="ObjectType">The object type : for instence (int)BoObjectTypes.oOrders</param>
                /// <param name="ObjectKey">The DocEntry of the document to be linked to this alert</param>
                private static string _SendAlert(string Subject, string Body, string ColumnName, int ObjectType, string ObjectKey, SAPbobsCOM.Company oCompany, System.Collections.Generic.List<string> Recipients)
                    SAPbobsCOM.CompanyService oCmpSrv = null;
                    MessagesService oMessageService = null;
                    SAPbobsCOM.Message oMessage = null;
                    MessageDataColumns pMessageDataColumns = null;
                    MessageDataColumn pMessageDataColumn = null;
                    MessageDataLines oLines = null;
                    MessageDataLine oLine = null;
                    RecipientCollection oRecipientCollection = null;
                    Recipient oRecipient = null;
                    try
                        oCmpSrv = oCompany.GetCompanyService();
                        oMessageService = ((SAPbobsCOM.MessagesService)(oCmpSrv.GetBusinessService(ServiceTypes.MessagesService)));
                        oMessage = ((SAPbobsCOM.Message)(oMessageService.GetDataInterface(MessagesServiceDataInterfaces.msdiMessage)));
                        oMessage.Subject = Subject;
                        oMessage.Text = Body;
                        oRecipientCollection = oMessage.RecipientCollection;
                        foreach (string UserCode in Recipients)
                            oRecipient = oRecipientCollection.Add();
                            oRecipient.SendInternal = BoYesNoEnum.tYES;
                            oRecipient.UserCode = UserCode;
                        // Don't add a document link if we pass -1 as parameter.
                        if (ObjectType != -1)
                            // get columns data
                            pMessageDataColumns = oMessage.MessageDataColumns;
                            // get column
                            pMessageDataColumn = pMessageDataColumns.Add();
                            // set column name
                            pMessageDataColumn.ColumnName = ColumnName;
                            // set link to a real object in the application
                            pMessageDataColumn.Link = (ObjectType != -1 ? BoYesNoEnum.tYES : BoYesNoEnum.tNO);
                            // get lines
                            oLines = pMessageDataColumn.MessageDataLines;
                            // add new line
                            oLine = oLines.Add();
                            // set the line value
                            oLine.Value = ObjectKey;
                            // set the link to BusinessPartner (the object type for Bp is 2)
                            oLine.Object = ObjectType.ToString();
                            // set the Bp code
                            oLine.ObjectKey = ObjectKey;
                        // send the message
                        oMessageService.SendMessage(oMessage);
                        return "";
                    catch (Exception ex)
                        return ex.Message;
And make sure tou send only ONE recipient in the collection like {Recepient ONE} because sending more then one wasn't working for me and I never knew why !
WHY WHEN EDITING THIS MESSAGE EVERYTHING IS FINE BUT WHEN LOOKING AT IT ALL THE SPACES ARE GONE ?
Edited by: Marc Roussel on Aug 26, 2009 12:19 PM

Similar Messages

  • Hi,Error when adding chart of account This entry already exists in the foll

    Hi,
    I am getting these below error while adding new chart of account.
    This entry already exists in the following tables  '' (UDO1) (ODBC -2035)  [Message 131-183]
    This entry already exists in the following tables  'G/L Accounts' (OACT) (ODBC -2035)  [Message 131-183]
    please suggest solving .  Thanks Advance.
    Regards
    Rajkumar Gupta

    Hi,
    You may check this thread:
    Re: This entry already exists in the following tables -Message
    Also check SAP Note Number: 1054713 to see if it applies to you. It might be a bug too.
    Thanks,
    Gordon

  • Error when updating Budget-This entry already exists...Budget (OBGT)

    SAP 2007A SP00 PL49
    When updating Budget, get following error:
    This entry already exists in the following tables 'Budget' (OBGT) (ODBC-2035) [Message 131-183]
    Any ideas?
    Thanks,
    Ajay Audich

    Hi,
    Vitor Vieira,
    Thank you that your answer helped me solving my problem to some extent.
    I solved the problem by creating document and document lines table and creating a UDO with it. Because the problem was with assigning some data to the u201CCodeu201D field when using master type tables.
    I didnu2019t get any problem after using the document and document lines table.
    Also,initially I didnu2019t bind the # column of my matrix with the LineID field of table. After doing that it is working fine and I am able to update the records.
    But still this is not a proper solution and I didnu2019t get answer for why master type UDO doesnu2019t support updating.
    Thanks,
    V.M.Nivasini

  • "This entry already exists in the following table 'Vat Transactions' (OTAX)

    Hi Experts,
    I have  some trouble adding new invoices into SAP. Copying from the Sales order to an AR Invoice the following error occurs
    Firstly, I get a system message "The Customer ref. no of this type already exists" on processing it follows with a status error when copying the order to AR Invoice
    "This entry already exists in the following table 'Vat Transactions' (OTAX) [Message 131-183]"
    "Exclusive code already exists '1486759'"
    any ideas to resolve this
    SBO 8.8 SP00 PL11.
    Regards,
    Rakesh N

    Hi Gordon,
    What happens if  the user had performed a Update Query on the OTAX table and then added the invoice he was unaware that he should not run UPDATE queries on database. But invoices to which the update query was not executed cannot be added.
    The query follows :
    UPDATE TAX1
    SET AbsEntry = XXXXXX where AbsEntry = YYXXXXXX
    Select Top 15* from OTAX INNER JOIN TAX1 on OTAX.AbsEntry = TAX1.AbsEntry
    ORDERBY OTAX.AbsEntry DESC;
    Regards,
    Rakesh N

  • This entry already exists in the following table ALR2

    Hi All
    A client gets this message when trying to add a sales order.
    They copy it from a quote,  but when they click add they get this messge :
    "This entry already exists in the following table ALR2"
    This is happening for every user and for any quote..old and newly created quotes.

    Hi Experts,
    I am at the client currently and there has been no recent upgrades,they are on PL 46.
    I also checked the alerts and they have no alerts set up on SAP?
    Also tried to restart the server??
    There is one superuser and when he logs in there is no problem.
    He can add sales orders etc. - no problem
    Thank you,
    Kind Regards,
    Alexander
    Edited by: Oberholzer Alex on Oct 16, 2009 10:13 AM

  • Getting error message 2053 "This entry already exists in the following tab"

    Hi all
    i have a user form which is connected to UDO of type document which has a document line user table which is bounded to a matrix within the user form.
    when i add a new line to the matrix and press update it works fine. when i change a value in one of the fields of the newly added row and press the update button, i recieve the error message:
    "2053 This entry already exists in the following table".
    question is what is causing this error and how can it be fixed?
    appreciate the help
    Yoav

    Hi Yoav,
    If you run "Restore numbering"from the administration/.../Restore menu it will probably be solved.
    Regards
    Ad

  • This Entry Already Exists in the Table (UDO1)

    Hello All,
    I have created a Document Type Form with one Document and one Document Rows Table .
    Their is no Manage Series option checked in the Registration as it is without any series.
    Now the entries were going smoothly untill the record no. 116 then after that the user tries to add the document no. 117
    system is showing an error message " This Entry Already Exists in the Table ( UDO1) " and the data is not getting added.
    I have checked the Header & Line Tables both tables conatins data upto 116 record.
    But still is not getting saved.
    Their is no Series feature in this form (No Manage Series ) the numbering the going as per SAP .
    Please suggest how to solve this problem  without hampering the already entered data.
    Thanks & Regards,
    Amit

    Hello Amit,
    Sometimes the restore document numbering function from help makes miracles....
    By the Way, please check your UDO tables and look for keys, docentries, etc,
    Regards
    János

  • "This entry already exists in the following tables DLN1"

    Hi there,
    We create a Delivery from Sales Order using the Copy To option with a batch managed item. When we try to add the document, the error message appears:
    This entry already exists in the following tables '' (DLN1) (ODBC -2035)
    I think it is something to do with the chosen batches but I'm not sure about it. Did someone already have the same issue before?
    Thanks and regards,
    Nat

    Hi,
    I would suggest to escalate this issue to SAP support.
    Our client has experienced similar issue but they want to update item master data. They duplicated existing one and then delete last 3 digits of the original item code and then update it, the error message appears but it refers to AIT1 table and ODBC 2035.
    There is a note relate to it but it is just a query and the result must be sent to SAP support.
    However, have you tried to use copy from ? I mean you open the DO, put the customer code and then copy from the SO ? Will the error appear ?
    Rgds,

  • This entry already exists in the following tables OCRD

    I'm trying to create a Business Partner Master Data in SBO2007 SP 01 PL 05 and I got the following error: 
    This entry already exists in the following tables 'User-Defined Object' OUDO) -(ODBC - 2035) also this error:
    This entry already exists in the following tables 'Business Partner' (OCRD) -(ODBC - 2035)
    Any idea what should I do ?
    I  try the restore function, run a RSP task, comment the code in the Transaction Notification and the problem continue and I need to create new Busines Partner Master Data in the database.  
    Any comment will be useful.
    Thanks.
    Regards,
    Gabriela.

    Hi,
    If you are trying to create a Business Partner code where the code is same as another added in the database already as a G\L Account, then the error also occurs.
    If the issue is not fixed by running the task, it is a database corruption for which further investigation from support is necessary.
    Please log a support ticket to get the issue investigated.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • This entry already exists in the following tables  '' (ADO4) (ODBC -2035)

    Dear All,
    When user try to update UDF in ar invoice,It's showing error message
    This entry already exists in the following tables  '' (ADO4) (ODBC -2035)
    UDF get updated in all other ar invoice,error occurs in very few cases.
    Jeyakanthan

    Hi,
    I believe this is a bug,kindly mention the cluster and version.
    Also refer these note:[1359365|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&;;note_numm=0001359365],[1254435|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&;;note_numm=0001254435] might be helpful.
    I request you to raise a support ticket in SAP support portal inorder to clarify whether its a bug.

  • This Entry already exists in the following tables Department(OUDP)

    Hi All,
    When i am trying to add new department in Employee Master Data I am facing the following error.
    "This Entry already exists in the following tables Departments(OUDP)(ODBC -2005)[Message 131-183]"
    I am not able to add new department.
    as i checked in backend table there is no such data is available.
    Please suggest how to resolve the same.
    Regards,
    Vikram
    Edited by: Challa Vikram Reddy on Dec 2, 2008 9:01 AM

    Hi,
    The issue seems to be a DB specific issue which needs to be investigated by the SAP Support. Please log a message at the Service Market Place to get the issue analysed.
    Regards,
    Jitin
    SAP Business One Product Support

  • This entry already exists in the following tables -Message

    Hi,
    Im getting a [RDN1.WhsCode][line:3], 'This entry already exists in the following tables(ODBC-2035)'
    This message is presented frequently in returns and credit memos. Our company uses batch numbers for our items. When the item is returned, is returned to a different warehouse from it was originally delivered, so we change the warehosue in the return form and credit memo form. So we need to click the "create" button in the batch selection window, because there are no batch numbers to be selected.
    Any Ideas as how to solve the problem?
    Thank you.

    Hi,
    This entry already exists in the following tables Message is always related to duplicated record creation or application error.  For you case, I think it is better to return to original warehouse first and do inventory transfer to the actual return location in the second step.
    Thanks,
    Gordon

  • "This entry already exists in the following table"

    Hello Friends
    I use SAP 2005 B PL05.In my UDO screens when i try to update an existing record in matrix, i get the error message
    This entry already exists in the following tables: "Tablename"
    But i'm not restricting anything  through code in the Update mode.What could be the reason for this?
    Thanks
    Ram

    Raghu,
    Have a look at this thread. might help you.
    restore numbering files
    BTW, is your linenum column in matrix bound to Linenum in the table?
    regards,
    Binita

  • "this entry already exists in the following table "(MSN2)(ODBC-2035)"

    Dear All,
    Im running the MRP wizard with a multilevel BOM I created and when I run the MRP wizard the first time using the item, it runs through fine and I can view the recommendations. If I run the MRP scenario again using the same item, an error message is displayed "this entry already exists in the following table "(MSN2)(ODBC-2035)"
    I have several items in the database with the same description but different item numbers but I dont think this could be the problem.
    Any suggestions ?
    Thanks,
    Indraj.

    Dear,
    Please try the query in note 930001 below, if you get any result, I would like to recommend you to report
    a message for your issue and request a DB fix.
    The following error message appears when running the MRP Wizard:
    "Violation of primary key constraint" in the MSN2_primary".
    In order to confirm whether the above issue affects your DB, please run
    the following query:
           Select T0.itemcode, T1.Objectcode, T1.itemcode from OITM T0
           inner join
           (Select 'OITT' ObjectCode, code Itemcode from OITT
           union all
           Select 'ITT1-Father', Father from ITT1
           union all
           Select 'ITT1-Code', Code from ITT1
           union all
           Select 'OWOR', Itemcode from OWOR
           union all
           Select 'WOR1', Itemcode from WOR1
           union all
           Select 'MSN2', Itemcode from MSN2
           union all
           Select 'MSN3', Itemcode from MSN3) T1
           on T0.itemcode = T1.itemcode where
           CONVERT(binary(5000),T0.itemcode) <>
           CONVERT(binary(5000),T1.itemcode)
    Thanks & Regards
    Apple

  • This Entry Already Exists in the following table (DLN1) ODBC-2035

    Hello Experts,
    I am getting the following error while entering the Deliveries :
    "This Entry Already Exists in the following table (DLN1) ODBC-2035 Message: 131-183"
    can not enter deliveries.
    Kindly Help

    Hi,
    This error comes when the table DLN1 is updated but no update is made in ODLN. So when you enter any delivery there is mismatch between these
    tables. This isssue is related to missing header or Row. So this is a database corruption issue. You should log a message on channel partner portal
    for SAP Support.
    Regards
    Vikas

Maybe you are looking for

  • Solaris 9 x86 installation problem on dell 600sc

    I am trying to install Solaris x86 on a Dell 600sc machine. But the installation always abort. It can boot from CDROM and perform hardware scaning. It then fails and reboots itself when loading kernel from CDROM. The error message is: Warning /pci@0,

  • By product

    Dear guru, i have one problem, in process indusry, i am producing one material during this one material produced as a by product which is also consumed in next stage. which setting should be made in material master of that material? how can i create

  • Inserting br in xml files

    Hi all, I create a new XML file in the "i18n\en" folder. I retrieve from it some text strings that I display using the UIError class. My problem is that if I put <br> it is not interpreted by the browser. Do you know how can I set it correctly? Thank

  • Select/option with cfquery - how to pass selected value to field downform

    I have a form that has a basic select/option dropdown using a cfquery result.  I would like to use the value that the user selects to pre-populate an editable 'title' field further along on the form.  For example: <form action="index.cfm?fuseaction=s

  • Expanded Metadata and Keywording Support

    I have been trying to work with Metadata and Keywording for photographs lately, and I have been a bit frustrated with how vague the subject is. I feel that the ability to find photos using a standardized controlled language is a very important topic