‎2008 Apr 04 9:59 AM
hi all
can anybody help me to get details regarding the exception
SAPSQL_ARRAY_INSERT_DUPREC exception
CX_SY_OPEN_SQL_DB.
the termination occured in abap program.............
hw i can rectify it????
rewards will be given for useful answers
‎2008 Apr 04 10:07 AM
You are trying to insert data into a database table for an entry that already exists. Before insert, make sure record is not yet in database table. If already existant, do an update of the record.
‎2008 Apr 04 10:07 AM
You are trying to insert data into a database table for an entry that already exists. Before insert, make sure record is not yet in database table. If already existant, do an update of the record.
‎2008 Apr 04 12:14 PM
it is a standard sap program.i cant change it,
is there any solution?
‎2008 Apr 04 12:20 PM
Hi there,
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
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,
I request you to take it on high priority basis as this is an daily load and because of the red request next request will not be activated.
I think this is due to duplicate entry but i have checked the data their is no duplicacy. In that request we have only 7 request and all are in Active table.
Do reward if helpful or get back if need further assistance.
‎2008 Apr 04 2:07 PM
Hi,
This is due to primary key violation....U r trying to insert records which are already available in DB table..so best practice is to use MODIFY statement instead of INSERT.
MODIFY will insert records if not present in table and it will modify the record if present already
Regards,
Hari