Insert into duplicate entries--exception in service ticket scenario

Hi All,
  I am facing small problem..
1. I have property field in service ticket component ICCMP_BTSHEAD.
2.I put some validations based on property .
3.when user clicks on create service ticket it will create service ticket with PROPERTY field filled up with some value.
  if user clear that value and clicks enter
  again if user enters the some value in field and click on save  it leads to exceptions that is of type insert duplicates array..like that..
    when i checked in debug....for the above procedure the service ticket guid is there in some internal table twice..
  if i did nt dne the steps like above,..i.e with out making property field blank..then no duplicates..
can any body through some light on this?

OSS note resolved it

Similar Messages

  • Insert into duplicate entries--exception in crm 2007 webclient

    Hi All,
      I am facing small problem..
    1. I have property field in service ticket component ICCMP_BTSHEAD.
    2.I put some validations based on property .
    3.when user clicks on create service ticket it will create service ticket with PROPERTY field filled up with some value.
      if user clear that value and clicks enter
      again if user enters the some value in field and click on save  it leads to exceptions that is of type insert duplicates array..like that..
        when i checked in debug....for the above procedure the service ticket guid is there in some internal table twice..
      if i did nt dne the steps like above,..i.e with out making property field blank..then no duplicates..
    can any body through some light on this?

    Actully for the same guid there are several entries of the PROPERTY Field , i think you are trying to fill the property field  through manually.  Actually u are clearing the values from the UI layer ( input field )  but not the underlying BOL contexts, so whenever u are clearing and adding the new value it is trying to add the newly added value along with the odl values also. So  make sure that whenever u are clearing the field, the corresponding field should be cleared in the BOL level.
    Regards
    Vikranth

  • Do we have a shortcut to insert a duplicate record except PK ?

    Do we have a shortcut to insert a duplicate record except PK ?
    Thanks.

    Do you want to insert another row with all of the columns the same but with a different PK? If so then:
    INSERT INTO t (pk, col1, col2, col3)
    SELECT new_value_for_pk, col1, col2, col3
    FROM t
    WHERE pk = <value>What you use for new_value_for_pk will depend on how the PK is generated.
    John

  • Service ticket  scenario

    Hello experts,
               Am very new to CRM & ICWC.
    Can anyone please tell me the steps or provide me a link to set up a simple demo Service ticket scenario?
    Your response in appreciated,will also reward points .Please help!
    the scenario could be as follows
    Customer Request(complaint) -
    > Handle Request(by IC represntative) -
    >Create Ticket and forward complaint to back office---->Process complaint->Inform Customer.-->End process
    Regards,
    Sandeep

    Hi Sandeep,
    This scenario is given in best practices C78, link for C78 http://help.sap.com/bp_crmv250/CRM_DE/BBLibrary/html/BBlibrary.htm
    Cheers,
    Madhu.

  • Insert - Ignore Duplicate Entry Error

    Hello
    I would like to use an insert statement which also contains a select statement in it and returns a set of records and gets inserted in to a particular table.
    But, when I tried to run the sql, it throws error as some of the records are duplicate entry insertions. Is it possible to modify the sql to ignore any duplicate entries and insert the new ones.
    Illustration:
    TABLE_A
    STUDENT_ID GROUP_ID
    101 200
    101 201
    103 200
    107 201
    and so on.
    Here, when I try to insert a set of records like
    101 200
    108 200
    101 300
    103 200
    103 201
    I would like the exact duplicate entries like (101,200), (103,200) to be ignored with out producing any error but insert the other records in to the TABLE_A table.
    Thr sql used is similar to this
    Insert into TABLE_A (student_id, group_id)
    select distinct person.studentid, groups.groupid from person, groups where
    Did any one know how to handle this?
    Thanks
    Shiv

    If I include 'NOT EXISTS' after insert and before
    select statement, it throws the error
    missing VALUES keyword
    The NOT EXISTS goes in the WHERE clause.
    Insert into Table_A (student_id, group_id)
    select distinct p.studentid, g.groupid
    from person p, group g
    where NOT EXISTS (select 1
                     from table_A a
                     where a.student_id = p.studentid
                     and a.group_id = g.groupid)or you could do
    Insert into Table_A (student_id, group_id)
    select distinct p.studentid, g.groupid
    from person p, group g
    MINUS
    select student_id, group_id
    from Table_A

  • Inserting a Duplicate Entries in ZTABLE

      Hi,
    I have Created a ZTABLE in that ztable having company code, sales org, employee no, from date , to date  and amount fields
    ZTABLE PRIMARY KEY FIELDS IS COMPANY CODE AND SALES ORG.
    now my requirement is to add 2 entries in a z table  same( employee company code and sales org).
    i have developed a module pool program to  enter the data by using table control.
    my logic is to insert the data from program to ztable
    loop at it_emp into wa_emp.
    insert zemp from wa_emp.
    endloop.
    Please give some suggestions to insert duplicate entries.

    The primary key are defined as UNIQUE and NOT NULL. So you cannot have two records with same keys, you MUST add another key so I suggest add a flag for "Employee to Bill" and "Employee Mobile Bill", you can define a domain with those two values to define a data element and add that data element in your table, defining this "Employee type" field as the last key of the primary keys of the table (and do not forget to set the client as the fist key)
    K
    Field
    Data Element
    Check table
    K
    MANDT
    MANDT
    T000
    K
    BUKRS
    BUKRS
    T001
    K
    VKORG
    VKORG
    TVKO
    K
    Z-name
    Z-name
    Regards,
    Raymond

  • HELP!!: Error inserting into table in exception block

    I have some pl/sql code. In the exception section I have several lines of code similar to:
    WHEN NO_DATA_FOUND THEN
    INSERT INTO SCHEMA.ERR_TABLE (err_num, line)
    values ('101', V_LINE);
    When I try to compile the code it gives me an error:
    (1):PLS-00201: identifier 'TEMP_ERRS' must be declared
    (2):PL/SQL: SQL Statement ignored
    (3):PLS-00201: identifier 'TEMP_ERRS' must be declared
    (4):PL/SQL: SQL Statement ignored
    TEMP_ERRS is just a table that exists in a schema?
    I tried inserting a record into this table in plain sql code and it worked.
    What am I missing??
    TIA-
    null

    I was able to insert a test record into TEMP_ERRS using plain sql, and it worked so I believe I should have the correct previlage.
    The only difference is that the PL/SQL code is part of a trigger, what specific previlage would I need?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Kaleem Mohammed Abdul ([email protected]):
    If the table/Synonym is not in the current schema, check for the privileges<HR></BLOCKQUOTE>
    null

  • Running INSERT into SQL Server using Heterogeneous Services

    I am running into a show stopping issue trying to insert into a SQL Server table via Oracle.
    Basically, I have my Heterogeneous Services set up correctly and I am able to hit the SQL Server database with my INSERT statement. But what is happening is I seem to be manually controlly row locks. I believe HS is issuing the following to the server before my INSERT statement is run:
    SET TRANSACTION ISOLATION LEVEL READ COMMITTED
    SET IMPLICIT_TRANSACTIONS ON
    Also, it does not seem that I ever issue the COMMIT TRANSACTION
    command. This leaves the row locked forever... unable to complete the
    insert generating an error and not inserting my record.
    I would GREATLY appreciate any help you could provide, this is a critical issue.
    Thanks in advance,
    ivalum21

    ORA-02047: cannot join the distributed transaction in progress
    ORA-06512: at "MY_PACKAGE_NAME", line 263
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC]DRV_Execute: DB_ODBC_ENGINE (1645): ;
    [Microsoft][ODBC SQL Server Driver][SQL Server]Disallowed implicit conversion
    from data type varchar to data type money, table 'tableA',
    column 'total_amount'. Use the CONVERT function to run this query. (SQL
    State: 37000; SQL Code: 260)
    ORA-02063: preceding 2 lines from SQLSERVER_LINK
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 875
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 791
    ORA-06512: at "RCDTPUMP.CAMPUSCALL_DATAPUMP_UNI", line 1156
    ORA-06512: at line 1
    That is what I get when I take out the TO_NUMBER()
    Message was edited by:
    ivalum21

  • ZipException -  Duplicate entry

    Hi all,
    I am trying to zip a number of files(reside in different folder) into the same zip file. However, i encountered duplicate entry exception due to i try to add two same zip entry into the zip file.
    The way i try to avoid such exception is as followed (I will simply ignored the duplicate exception due to the nature of my program.):
    public void addToZipFile()
        try
            //some code here
        catch(ZipEntry ex)
            String msg = ex.getMessage();
            if(msg.indexOf("duplicate") > 0)
                  //ignored such error
            else
                 throw ex;
    }Is the above method a right implementation to deal with the duplicate entry exception ? Any suggestion ?
    Thanks

    Thanks for your reply.
    As i said the files i try to zip are resided in different folder , so they can have the same filename.... And due to the nature of my program ..... i add only one of those repeated files.....and it satisfy my requirement .... it is too troublesome to explain why i only add one of those repeated file.
    I just try to find out is the way i handle the exception is correct ?
    thanks

  • Exception :java.sql.SQLException: Duplicate entry '1-0' for key 1

    Help me in fixing this error
    Exception :java.sql.SQLException: Duplicate entry '1-0' for key 1
    1>>User_ID is primary key and unique and
    2>>User_ID is also auto Incremented
    3>>User_ID is the First coloumn in the table
    PreparedStatement ps=con.prepareStatement("insert into User(user_name,user_email,user_password) values (?,?,?)");
    ps.setString(1,s11);
    ps.setString(2,s22);
    ps.setString(3,s33);
    int i= ps.executeUpdate();

    A growing trend it appears. Must be some new high school and/or college curriculum regarding moral relativism.

  • Files moving to NFS error folder - Could not insert message into duplicate check table

    Hi Friends
    Have anyone faced this error, could suggest me why.
    The CSV Files failed on Sender Channel and moves to NFS error path  and in the log it says as below.
    Error: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert message  into duplicate check table. Reason: com.ibm.db2.jcc.am.SqlTransactionRollbackException: DB2 SQL Error

    Hi Uma - is that a duplicate file? have you enabled duplicate file check in sender channel?
    please check if the below note is applicable
    1979353 - Recurring TxRollbackException with MODE_STORE_ON_ERROR stage configuration

  • Merge update insert into with exception

    I m opening a new thread for the same question i had posted earlier....
    create Table test(
    col1 varchar2(200),
    col2 varchar2(200),
    col3 varchar2(200),
    id varchar2(200),
    job_id varchar2(10)
    create Table test1(
    col1 varchar2(200),
    col2 varchar2(200),
    col3 varchar2(200),
    id varchar2(200),
    job_id varchar2(10)
    create Table test2(
    col1 varchar2(200),
    col2 varchar2(200),
    col3 varchar2(200),
    id varchar2(200),
    job_id varchar2(10)
    create Table err_tbl(
    col1 varchar2(200),
    col2 varchar2(200),
    col3 varchar2(200),
    id varchar2(200),
    job_id varchar2(10)
    ===============================================================
    merge into test t
    using (select distinct col1, col2, col3,id, job_id
    from test1
    where job_id = curr_job_id -- cur_job_id is variable which is declared in the procedure to sysdate
    union
    select distinct col1, col2, col3,id, job_id
    from test2
    where job_id = curr_job_id --cur_job_id is variable which is declared in the procedure to sysdate
    ) ss
    on (t.id = ss.id
    AND t.job_id = ss.job_id)
    when matched then update
    set t.col1 = ss.col1,
    t.col2 = ss.col2,
    t.col3 = ss.col3
    when not matched then insert into
    ( t.col1,
    t.col2,
    t.col3,
    t.id,
    t.job_id
    )Values
    ( ss.col1,
    ss.col2,
    ss.col3,
    ss.id,
    ss.jobid,
    exception
    when others then
    insert into err_tbl (
    col1,
    col2,
    col3,
    id,
    job_id )
    values ( ss.col1,
    ss.col2,
    ss.col3,
    ss.id,
    ss.jobid,
    Above, all i m trying to do is Updating or inserting into TEST table, and if there is any Duplicate records or any bad records then making use of exception i m INSERTING into ERR_TBL
    i get error with the merge insert update code ....
    The error i get is --- "ss.col1" column is not allowed here
    Any idea guys ????
    Hey one more quick question ....Can we use exception in merge insert update block ???

    user642297 wrote:
    I m opening a new thread for the same question i had posted earlier....
    Any idea guys ????
    Hey one more quick question ....Can we use exception in merge insert update block ???Did you learn nothing nothing from [Your other thread|http://forums.oracle.com/forums/thread.jspa?messageID=3810396&#3810396]
    (Maybe that's why you never bothered to close it)
    It looks like you did learn something, since you ended up saying
    Thanks alex...i think i got the answer.....so i cannot use exception handler in merge statement...
    Thank you so much!!!What beats me is that yu post the exact same question again, when you already got the answer
    ?:|
    Peter

  • Avoiding duplicate records while inserting into the table

    Hi
    I tried the following insert statement , where i want to avoid the duplicate records while inserting itself
    but giving me the errror like invalid identifier, though the column exists in the table
    Please let me know Where i'm doing the mistake.
    INSERT INTO t_map tm(sn_id,o_id,txt,typ,sn_time)
       SELECT 100,
              sk.obj_id,
              sk.key_txt,
              sk.obj_typ,
              sysdate,
              FROM S_KEY sk
        WHERE     sk.obj_typ = 'AY'
              AND SYSDATE BETWEEN sk.start_date AND sk.end_date
              AND sk.obj_id IN (100170,1001054)
               and   not exists  (select 1
                                                                   FROM t_map tm1 where tm1.O_ID=tm.o_id
                                                                        and tm1.sn_id=tm.sn_id
                                                                        and tm1.txt=tm.txt
                                                                        and tm1.typ=tm.typ
                                                                        and tm1.sn_time=tm.sn_time )

    Then
    you have to join the table with alias tml where is that ?do you want like this?
    INSERT INTO t_map tm(sn_id,o_id,txt,typ,sn_time)
       SELECT 100,
              sk.obj_id,
              sk.key_txt,
              sk.obj_typ,
              sysdate,
              FROM S_KEY sk
        WHERE     sk.obj_typ = 'AY'
              AND SYSDATE BETWEEN sk.start_date AND sk.end_date
              AND sk.obj_id IN (100170,1001054)
               and   not exists  (select 1
                                                                   FROM t_map tm where sk.obj_ID=tm.o_id
                                                                        and 100=tm.sn_id
                                                                        and sk.key_txt=tm.txt
                                                                        and sk.obj_typ=tm.typ
                                                                        and sysdate=tm.sn_time )

  • Insert into a table excluding duplicates of a selected column

    I have mytable:
    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
    that is a result of INSERT i.e.,
    INSERT INTO myTABLE(Item,[Date],[Level])
    values('X24','12/23/13 :22','22916')
    I want the INSERT to exclude the duplicate level defined as the previous level in a selected column [Level]. This would avoid having to 'view' the table using:
    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]
    IDNO is an identity column.
    How can this INSERT be achieved without the overheads? 

    Quite helpful comments particularly the ISO- 11179 and the design elements that can prevent the problem in the first instance. My apologies with regards to my impolite post omitting the DDL.  It is a small procedure and [Date] and [Level] can be accommodated
    by the server but are bad habits. My efforts to control the data input were in vain as the data was not from a software conducive to such controls. Because of the high frequency volume of the data, (suggested by the time-stamps with milliseconds cut), any
    effort to have 'The data... cleaned in a presentation/input layer ' would be futile.  The suggestions of  yourself
    and Erland Sommarskog, SQL Server MVP, [email protected], of a UNIQUE constraint to deal with the problem
    underscores the importance of design even in the 'smallest' of procedures. 
    This worked:
    drop table Foobar
    CREATE TABLE Foobar
    (item_name CHAR(5) NOT NULL, 
     foo_timestamp DATETIME2(0) NOT NULL
      CHECK (foo_timestamp 
        = DATEADD(MINUTE, DATEDIFF(MINUTE, '2000-01-01', foo_timestamp),
         '2000-01-01')),
     water_level INTEGER NOT NULL, -- why not be silly? 
     PRIMARY KEY (item_name,foo_timestamp, water_level));
    INSERT INTO Foobar
    VALUES
    ('X24', '2013-12-23 10:41:00', 22996), 
    -- ('X24', '2013-12-23 10:41:00', 22996), rejected by DDL!!
    -- ('X24', '2013-12-23 09:21:00', 23256), rejected by DDL!!
    ('X24', '2013-12-23 09:21:00', 23256), 
    ('X24', '2013-12-23 09:22:00', 23256), 
    -- ('X24', '2013-12-23 09:22:00', 23256), rejected by DDL!!
    ('X24', '2013-12-23 09:22:00', 22916);
    select *
    from Foobar
    item_name foo_timestamp
    water_level
    X24   2013-12-23 09:21:00
    23256
    X24   2013-12-23 09:22:00
    22916
    X24   2013-12-23 09:22:00
    23256
    X24   2013-12-23 10:41:00
    22996

  • Weird exception in 12c (ORA-01461: can bind a LONG value only for insert into a LONG column)

    I have a Windows app that accesses an Oracle 12c database via ODBC (the driver version is 12.01.00.01).
    I have a table that has a key column named REGION_ID (NVARCHAR2(9)), and about a dozen other columns, three of which are named REGION1, REGION2, and REGION3, all of type NVARCHAR2(40).
    When I try to insert a string into the REGION1 field that's greater than 9 characters (the length of REGION_ID), I get an ORA-01461 error ('Can bind a LONG value only for insert into a LONG column). If I define the length of REGION_ID to be NVARCHAR2(15), then I can add strings to the REGION1 field with a length up to 15 before I get the ORA-01461 exception again. Oddly, if I change the REGION1 column name to REGIONONE, I do not get any errors, and everything works fine. It's almost as if the column name REGION1 is being confused with REGION_ID behind the scenes.
    Any ideas? I’m using SQLBindParameter to bind the columns, and all of the calls succeed. I get the exception when I execute the insert statement. This same code worked for previous versions of Oracle (11g, 10g, and 9i). And if I use an 11g client driver against the 12c server, I do not get the exception.
    Thanks!

    Sorry, I was just now able to install the patch for bug 18232462, and it did indeed solve the issue I described above. Thanks!

Maybe you are looking for

  • 1 line item in invoice for Multiple line items of SO

    Hi SD Gurus, My client requirement is multiple line items of the sales order should reflect as a single line item in the invoice ..? For ex: I am using Service material type Dien & material created under different material groups. My Sales order look

  • LED Cinema Display 27 Random Loss of USB

    I have a brand new 27" LED Cinema display connected via Mini Display Port to my 2006 Mac Pro with an ATI Radeon HD 5770 graphics card.  The display's USB cable is connected to a USB port on the back of the Mac Pro.  My keyboard is the newest Apple ex

  • Audio fine, no video for .mov files

    I am trying to view films on disk that a friend has lent me. MPG4 files play just fine, but the .mov files do not play the video, only the audio. A Quicktime message showed up that told me I would need other components, and directed me to the DIVX si

  • All mail, contacts, calendar copies to my applications

    all of my Outlook emails, contacts, calendar entries have been copying to my documents and to my applications.  I don't know if this is from ICloud or what but it is a problem.  My Macbook Pro is VERY slow now and takes forever to do anything is only

  • When is the Creative Zen coming out in America?

    I really want one. 20 gig + small size = awesome