cancel
Showing results for 
Search instead for 
Did you mean: 

DBSQL_DUPLICATE_KEY_ERROR (duplication in /SAPTRX/EH_EVMSG)

Former Member
0 Kudos

Hi all,

Short dumps are observed in the system with error message "DBSQL_DUPLICATE_KEY_ERROR".

Error analysis

    An exception has occurred which is explained in more detail below. The

    exception is assigned to class 'CX_SY_OPEN_SQL_DB' and was not caught in

     procedure

    "UPDATE_DB_TABLE" "(FORM)", nor was it propagated by a RAISING clause.

    Since the caller of the procedure could not have anticipated this

    exception, the current program was terminated.

    The reason for the exception is:

    When an Open SQL array insert is performed, trying to insert a record

    into the database table "/SAPTRX/EH_EVMSG" causes the function to terminate if

     a record with the same key already exists.

    (When an Open SQL individual record insert is performed, this situation

    does not cause the function to terminate. SY-SUBRC is set to 4 instead.)

May I know, if anyone has earlier observed such kind of issue.

N.B : For the table /SAPTRX/EH_EVMSG, primary key is eh_guid and evm_guid and both got generated through the system logic.

We are most probably observing this kind of issue for a specific OTC scenario (sales area) where sales order got created prior to EM activation and dump occurs after activation of EM system when system trying to post any update on such sales orders to EM. Also System contains huge volume of data.

Regards,

Ratnakar

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello Gopi,

The same dump is also observed if there is any mismatch in sequence number that we discussed earlier. In that case, we face duplication in control table due to sequence number (/saptrx/eh_cntrl). I believe.. this case is bit different..as I dont think.. it has anything to do with sequence number.

@Vishnu:

I think.. the scenario explained by you should cause duplication issue in /saptrx/evm_hdr table, but we are getting the dump in /saptrx/eh_evmsg. I believe.. /saptrx/evm_hdr will be populated first during posting of any event message and /saptrx/eh_evmsg will only link the event message with event handler later. Kindly let me know, if there is something wrong with my understanding.

Regards,

Ratnakar

Former Member
0 Kudos

Hi Ratnakar,

The dump which you are getting in table /SAPTRX/EH_EVMSG that provides a link between an event Handler header and its event messages.

Have you implemented custom queue to post in SAP EM?

Check and let me know.  I will check in the system and let you know other possibilities.

Regards


GGOPII

former_member190756
Active Contributor
0 Kudos

Hi Ratnakar,

this dumps can only occur if you send from within your rule set Event Messages. Please check your rule set where this is done.

e.g. you use Activity RESEND or a copy of it.

Best regards,

Steffen

Former Member
0 Kudos

Hi Ratnakar,

There are many discussion on SQL dump when there is a duplicate entry key in tables.

Check these discussions which we provided solution.  It will fall under same thing as it finds inconsistency in DB tables.

DBSQL_DUPLICATE_KEY_ERROR | SCN

Regards


GGOPII

michael_kozlowski
Active Contributor
0 Kudos

Check whether SAP note 2079032 applies for your system 2079032 - Runtime error ITAB_DUPLICATE_KEY when displaying EH data

Former Member
0 Kudos

Hi Ratnakar,

This kind of dumps occur in scenarios like custom parameters with same index value where multiple values  exists, multiple params with same name and index even though values are different and in scenarios where you use RESEND activity with custom logic.

If you are using standard scenarios and cannot resolve it, contact SAP.

Thanks,

Vishnu