Skip to Content
0
Former Member
Nov 16, 2012 at 07:02 PM

SAPSQL_ARRAY_INSERT_DUPREC error

111 Views

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