‎2015 May 18 3:36 PM
Hi All,
I am getting this Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC
Exception CX_SY_OPEN_SQL_DB
The current ABAP program "SAPLV60U" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
"SAPSQL_ARRAY_INSERT_DUPREC" "CX_SY_OPEN_SQL_DB"
"SAPLV60U" or "LV60UF0V"
"VBUK_BEARBEITEN"
Source Code Extract
Line
SourceCde
475
stru LIKE vbuk,
476
END OF da_xvbuki.
477
DATA: BEGIN OF da_xvbuku OCCURS 20,
478
stru LIKE vbuk,
479
END OF da_xvbuku.
480
* Positionen anlegen oder ändern
481
LOOP AT xvbuk.
482
vbuk = xvbuk.
483
CASE xvbuk-updkz.
484
WHEN updkz_new.
485
beleg = vbuk-vbeln.
486
* CHECK: BELEG-NR NE 0.
487
IF beleg-id = '$'.
488
CHECK: beleg-nr NE 0.
489
PERFORM vbrk_belegnummer_ermitteln.
490
vbuk-vbeln = xvbrk-vbeln.
491
xvbuk-vbeln = xvbrk-vbeln.
492
MODIFY xvbuk.
493
ENDIF.
494
da_xvbuki = xvbuk.
495
APPEND da_xvbuki.
496
WHEN updkz_update.
497
da_xvbuku = xvbuk.
498
APPEND da_xvbuku.
499
ENDCASE.
500
ENDLOOP.
501
UPDATE vbuk FROM TABLE da_xvbuku.
502
IF sy-subrc > 0.
503
MESSAGE a101 WITH 'VBUK' sy-subrc da_xvbuku-stru-vbeln.
504
ENDIF.
>>>>>
INSERT vbuk FROM TABLE da_xvbuki.
506
IF sy-subrc > 0.
507
MESSAGE a100 WITH 'VBUK' sy-subrc da_xvbuki-stru-vbeln.
508
ENDIF.
509
510
ENDFORM. "VBUK_BEARBEITEN
511
*eject
512
513
*---------------------------------------------------------------------*
514
* FORM VBUP_BEARBEITEN *
515
*---------------------------------------------------------------------*
516
* Die Tabelle VBUP wird geaendert *
517
*---------------------------------------------------------------------*
518
FORM vbup_bearbeiten.
519
520
xvbrk_tabix = 0.
521
DATA: BEGIN OF da_xvbupi OCCURS 1,
522
stru LIKE vbup,
523
END OF da_xvbupi.
524
DATA: BEGIN OF da_xvbupu OCCURS 100,
Please help me guys out of it...........
‎2015 May 18 4:00 PM
Hi,
Please check the SAP notes.
I think this is the only solution.
Regards
Raj
‎2015 May 20 10:04 AM
‎2015 May 18 4:45 PM
Hi Das,
A simple way is 'INSERT vbuk FROM TABLE da_xvbuki ACCEPTING DUPLICATE KEYS.'
or you could manually catch that exception void program dump.
regards,
Archer
‎2015 May 18 5:54 PM
If the error is occurring in a SAP supplied program, he can't edit it.
‎2015 May 20 10:12 AM
Hi,
There is duplicate value in VBUK, check that number from vbuk and check the it is valid or not.
check the number range and increase that number.
regards,
Chandu