Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSQL_ARRAY_INSERT_DUPREC error

Former Member
0 Kudos

Hello all,

I've come across the above mentioned error while running Standard TX FMX1 in the following function module:

SAPSQL_ARRAY_INSERT_DUPREC   -- runtime error

CX_SY_OPEN_SQL_DB                      -- exception

INCLUDE LFMR3U16.   "FMR3_UPDATE_KBLKPW   --FM

Portion of code where this error occurs:

*************************

   1 function fmr3_update_kblkpw.

   2 *"----------------------------------------------------------------------

   3 *"*"Verbuchungsfunktionsbaustein:

   4 *"

   5 *"*"Lokale Schnittstelle:

   6 *"  IMPORTING

   7 *"     VALUE(INSERT) LIKE  FMDY-XFELD OPTIONAL

   8 *"     VALUE(I_FLG_WAS_PARKED) LIKE  BOOLE-BOOLE DEFAULT SPACE

   9 *"  TABLES

  10 *"      T_KBLK STRUCTURE  KBLK OPTIONAL

  11 *"      T_KBLP STRUCTURE  KBLP OPTIONAL

  12 *"----------------------------------------------------------------------

  13   if insert is initial.

  14

  15 * geparkte Zeilen vorher löschen

  16     if i_flg_was_parked = con_true.

  17       loop at t_kblk.

  18         delete from kblp  where belnr = t_kblk-belnr.

  19       endloop.

  20     endif.

  21

  22 * Update

  23     modify kblk  from table t_kblk.

  24

  25     modify kblp  from table t_kblp.

  26

  27   else.

  28 * Beim Insert doppelte Belegnummernvergabe verhindern

>>>>     insert kblk  from table t_kblk.

  30

  31     insert kblp  from table t_kblp.

  32

  33   endif.

  34

  35 endfunction.

*******************************

I've read in several forums that applying a note could resolve this issue. However, I do not know which specific note to apply.

Any help with this will be greatly appreciated.

Thanks in advance

1 ACCEPTED SOLUTION

juan_suros
Contributor
0 Kudos

There seem to be several notes that might apply to this situation. Here are the numbers with the symptoms text:

1054457 -

You call transaction F871 to enter a request with reference to a funds commitment. The request has at least two items, that refer to the same item in the funds commitment. When you save the request, the program terminates with a short dump.
When you update the KB tables (KBLE, KBLK.), a termination occurs in the INSERT_POS_IN_DB form.

1400545 -

You use the correction report RKMOBREP to correct commitment data for earmarked funds. When you do this, the system generates duplicate commitments.
If you run the payroll now, the update may terminate with the dump SAPSQL_ARRAY_INSERT_DUPREC.

419538 - At production startup, you delete all earmarked funds created in Funds Management with the report RFDLKBLX, in accordance with the IMG documentation. When you do this, the relevant commitments in CO are not deleted.

3 REPLIES 3

former_member206439
Contributor
0 Kudos

the dump clearly says thats

you are try to insert  a duplicate record

try to explore that you can find that value in Short dump details.

former_member192723
Active Participant
0 Kudos

Hello Juan,

Pls try to put the break point at the statement "insert kblk  from table t_kblk." and execute the transaction and see what are the values inserting into the table kblk. I think those values are already exist in table kblk.

Also check with your functional consultant is there any process is done in a wrong way recently.

Shravan

juan_suros
Contributor
0 Kudos

There seem to be several notes that might apply to this situation. Here are the numbers with the symptoms text:

1054457 -

You call transaction F871 to enter a request with reference to a funds commitment. The request has at least two items, that refer to the same item in the funds commitment. When you save the request, the program terminates with a short dump.
When you update the KB tables (KBLE, KBLK.), a termination occurs in the INSERT_POS_IN_DB form.

1400545 -

You use the correction report RKMOBREP to correct commitment data for earmarked funds. When you do this, the system generates duplicate commitments.
If you run the payroll now, the update may terminate with the dump SAPSQL_ARRAY_INSERT_DUPREC.

419538 - At production startup, you delete all earmarked funds created in Funds Management with the report RFDLKBLX, in accordance with the IMG documentation. When you do this, the relevant commitments in CO are not deleted.