sap bi load sapsql_array_insert_duprec

sap bi load sapsql_array_insert_duprec


Error during database insert in table EDIDC reported in transaction SM58
Error during database insert in table EDID4
Error during database insert in table EDIDS
Error E0 371
SAPSQL_ARRAY_INSERT_DUPREC shortdump in ST22 with function module F09_IDOC_INSERT_WITH_NUMBER
SM21 reports Run-time error "SAPSQL_ARRAY_INSERT_DUPREC" occurred

ABAP dump SAPSQL_ARRAY_INSERT_DUPREC has been generated with error message The ABAP/4 Open SQL array insert results in duplicate database records.The current ABAP program "SAPLMLVK" had to be terminated because one of the
statements could not be executed.

Error analysis


An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
caught nor passed along using a RAISING clause, in the procedure
"MS_UPDATE_ACCOUNT_SERVICE" "(FUNCTION)"
.
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.

Also the update termination error is alos appearing in SM13 for the same dump.

Reason and Prerequisites
The BALHDR table belongs to the application log. This is a tool to collect, save and display messages.
In this tool, the messages are grouped to logs where each log gets a unique number (in the respective client).
When the system saves the log, this number is determined from the APPL_LOG number range object in which the number assigned last was saved.
If this last number has an incorrect status, a number that already exists can be assigned, a short dump occurs when you save, as the database already contains an entry of this type.

Solution
Step 1: Determining the last assigned number
===============================================================
In the R/3 System, call transaction SE16.
Table: BALHDR.
Select the 'Table contents' icon (F7)
On the selection screen, enter the value 999999999 in the lowest field (maximum score) and select 'Execute' (F8).
A list is displayed. Scroll to the very bottom of this list. Make a note of the value in the bottom row in the 'LOGNUMBER' column (176508, for example).

Step 2: Correcting the current number level
===============================================================
In the R/3 System, call transaction SLGN.
Choose the Interval -> Change status (Shift F6) menu path.
Here you should see the following:

  No From number          To number        Current number
  01 00000000000000000001  99999999999999999999      16936

The Current number field usually contains a value that is greater than the one you noted before.
However, if the number is less than the number you have noted, enter the noted value ere and add another 1000 to it for good measure.
Save the entry.

Step 3: Buffering the number range object
===============================================================
If the dump still occurs, there are obsolete numbers in the buffer memory of your current server.
In this case, reset the number range buffers of the application servers: to do this, start transaction SM56. In the menu, select Number range buffer -> Reset.  Fill the fields in the dialog box that appears as follows:
    Client          <current client >
    Object          APPL_LOG
    Subobject
    Range
    Year
    Global reset X
You can call the RSSLGK00 report to test that no more dumps are triggered and the list of results shows a protocol number that is greater than or equal to the number you have entered.

If the dump persists, the problem is caused by something else. The problem cannot be corrected with this note.

0 comments:

Post a Comment