2012 Aug 07 7:47 AM
Hi all ,
User has entered duplicate condition record while changing the contract and getting an update termination error in KONM table .
it is entered in to dump plz can any one tell me how to remove this dump .
Runtime Error SAPSQL_ARRAY_INSERT_DUPREC
Exception CX_SY_OPEN_SQL_DB
Occurred on 31.07.2012 at 14:51:23
Transaction......... "ME32K "
Program............. "SAPLV13A"
Screen.............. "RSM13000 3000"
Screen line......... 2
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLV13A" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
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 "KONM_CHANGE"
"(FORM)"
.
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.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.)
How to correct the error
The exception must either be prevented, caught within the procedure
"KONM_CHANGE"
"(FORM)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
Use an ABAP/4 Open SQL array insert only if you are sure that none of
the records passed already exists in the database.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
-----------------------------------------------------------------------
"SAPSQL_ARRAY_INSERT_DUPREC" CX_SY_OPEN_SQL_DBC
"SAPLV13A" or "LV13AU02"
"KONM_CHANGE"
-----------------------------------------------------------------------
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
-
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
* perform database update
case kc_updkz.
when updkz_new.
-----------> insert konm from table konm_tab. here it is entered in to dump where it is trieng to insert record which is duplicate
when updkz_update.
update konm from table konm_tab.
when updkz_delete.
delete konm from table konm_tab.
endcase.
* pass back returncode of database update
kc_subrc = sy-subrc.
endform. "KONM_CHANGE
Information on where terminated
The termination occurred in the ABAP program "SAPLV13A" in "KONM_CHANGE".
The main program was "RSM13000 ".
The termination occurred in line 655 of the source code of the (Include)
program "LV13AU02"
of the source code of program "LV13AU02" (when calling the editor 6550).
The program "SAPLV13A" was started in the update system.
Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
the
procedure "KONM_CHANGE" "(FORM)" but was not handled locally, not declared in
the
RAISING clause of the procedure.
The procedure is in the program "SAPLV13A ". Its source code starts in line 628
of the (Include) program "LV13AU02 ".
2012 Aug 07 8:04 AM
Hi Vanamala ,
I had observed similar dump in some other transaction and the reason for that was some one had changed the number range and system got the next number from the number range , but it already existed in the table , so during execution of insert command program dumped.
May be you can check if this is the case in your system also , in debugging see what is the value it tries to insert and from where is this value obtained.
Hope this helps.
Regards
Arun
2012 Aug 07 8:04 AM
Hi Vanamala ,
I had observed similar dump in some other transaction and the reason for that was some one had changed the number range and system got the next number from the number range , but it already existed in the table , so during execution of insert command program dumped.
May be you can check if this is the case in your system also , in debugging see what is the value it tries to insert and from where is this value obtained.
Hope this helps.
Regards
Arun
2012 Aug 17 6:22 AM