You are on page 1of 4

Runtime Errors

SAPSQL_ARRAY_INSERT_DUPREC
Exception
CX_SY_OPEN_SQL_DB
Occurred on
15.12.2005 at 11:35:27
----------------------------------------------------------------------------------------The ABAP/4 Open SQL array insert results in duplicate database records.
-------------What happened?
-------------Error in ABAP application program.
The current ABAP program "SAPLARFC" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
---------------What can you do?
---------------Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
-------------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
"ARFC_END_TRANSACTION" "(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.
(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
"ARFC_END_TRANSACTION"
"(FUNCTION)", 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
"SAPLARFC" or "LARFCU03"
"ARFC_END_TRANSACTION"
-----------------------------------------------------------------------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.
-----------------System environment
-----------------SAP Release.............. "620"
Application server.......
Network address..........
Operating system.........
Release..................
Hardware type............
Character length.........
Pointer length...........
Work process number......
Short dump setting.......

"bgo005ilp"
"136.158.9.10"
"AIX"
"5.3"
"00CFAACE4C00"
8 Bits
64 Bits
17
"full"

Database
Database
Database
Database

"bgo005ilp"
"ORACLE"
"P0B"
"SAPR3"

server..........
type............
name............
owner...........

Character set............ "en_US.ISO8859-1"


SAP kernel...............
Created on...............
Created in...............
Database version.........

"640"
"Nov 1 2004 20:42:31"
"AIX 1 5 00538A4A4C00"
"OCI_920 "

Patch level.............. "43"


Patch text............... " "
Supported environment....
Database................. "ORACLE 8.1.7.*.*, ORACLE 9.2.0.*.*, ORACLE
10.1.0.*.*"
SAP database version..... "640"
Operating system......... "AIX 1 5, AIX 2 5, AIX 3 5"
-------------------User, transaction...
-------------------Client..............
User................
Language key........
Transaction.........
Program.............
Screen..............
Screen line.........

100
594124
"E"
" "
"SAPLARFC"
"RSM13000 3000"
2

----------------------------------------Information on where termination occurred


----------------------------------------The termination occurred in the ABAP program "SAPLARFC" in
"ARFC_END_TRANSACTION".
The main program was "RSM13000 ".
The termination occurred in line 368 of the source code of the (Include)
program "LARFCU03"
of the source code of program "LARFCU03" (when calling the editor 3680).
The program "SAPLARFC" was started in the update system.
Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
the
procedure "ARFC_END_TRANSACTION" "(FUNCTION)" but was not handled locally, not
declared in the
RAISING clause of the procedure.
The procedure is in the program "SAPLARFC ". Its source code starts in line 5
of the (Include) program "LARFC$03 ".
------------------Source code extract
------------------003380
003390
003400
003410
003420
003430
003440
003450
003460
003470
003480
003490
003500
003510

sort qins_state by arfcipid arfcpid


arfctime arfctidcnt arfcluwcnt.
call function 'TRFC_INSERT_LOCAL_SAVED_QIN'
tables
name_queue = qins_qname
qstate
= qins_state
qdata
= qins_data.
refresh: qins_state, qins_data, qins_qname.
endif.
* Evtl. gibt es ja nichts mehr zu tun.
if sendstate[] is initial.
perform database_commit.

003520
003530
003540
003550
003560
003570
003580
003590
003600
003610
003620
003630
003640
003650
003660
003670
----->
003690
003700
003710
003720
003730
003740
003750
003760
003770
003780
003790
003800
003810
003820
003830
003840
003850
003860
003870

perform trfc_dequeue_all.
if write_qin <> space.
read table qin_qname index 1.
if qin_qname-qstate <> qs_noexec.
call function 'QIWK_SCHEDULER_ACTIVATE_GROUP'
tables
name_queue = qin_qname.
endif.
write_qin = space.
refresh qin_qname.
endif.
else.
* Wenn doch, zunchst tRFC/qRFC-Daten in DB schreiben
insert arfcsdata from table senddata.
if sy-dbcnt = 0.
message a502(sy).
endif.
insert arfcsstate from table sendstate.
if sy-dbcnt = 0.
message a502(sy).
endif.
* Anwendungstrace schreiben
spi_agent = 'SPI_AGENT_TRFC_END_TRANSACTION'.
call function 'FUNCTION_EXISTS'
exporting
funcname
= spi_agent
exceptions
function_not_exist = 1
others
= 2.
if sy-subrc = 0.

------------------------Contents of system fields


------------------------SY field
-------SY-SUBRC
SY-TABIX
SY-FDPOS
SY-PAGNO
SY-COLNO
SY-UCOMM
SY-MSGTY
SY-MSGNO
SY-MSGV2
SY-MSGV4

contents.....................
----------------------------0
0
3
0
1
S
015

SY field
-------SY-INDEX
SY-DBCNT
SY-LSIND
SY-LINNO
SY-PFKEY
SY-TITLE
SY-MSGID
SY-MSGV1
SY-MSGV3

contents.....................
----------------------------0
0
0
1
Update control
B!
00005012

You might also like