Skip to Content
author's profile photo
Former Member

ME_UPDATE_DOCUMENT insert table ekki error

Hi experts,

I'm facing the following problem:

I'm trying to use the FM ME_UPDATE_DOCUMENT to change a data in a Purchase Order,

but when i execute this function the error "The ABAP/4 Open SQL array insert results in

duplicate database records." happens.

Below there is the code where the error ocurred.

DESCRIBE TABLE xekki LINES sy-tfill.
IF sy-tfill GT 0.
  INSERT ekki FROM TABLE xekki.  --> the error is happening here
  IF sy-subrc NE 0.
  REFRESH xekki.

During the debug i saw the values that the program was trying to insert.

Looking in the table EKKI the values were really there.

I calling the FM in this way:

select *
    into corresponding fields of table it_xkomv
    from konv
   where knumv = wa_oekko-knumv.

      NEKKO  = wa_nekko
      OEKKO  = wa_oekko
      XEKET  = it_xeket
      XEKKN  = it_xekkn
      XEKPO  = it_xekpo
      XKOMV  = it_xkomv
      YEKET  = it_yeket
      YEKKN  = it_yekkn
      YEKPO  = it_yekpo
      YKOMVI = it_ykomv
      XEKBES = it_xekbe.

Do i need to pass diferent parameters for this function?

I don't know how to solve this problem, can anyone help me?



Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on May 06, 2011 at 09:21 AM

    Hi Fabio,

    Put a break point at the INSERT statement and check, if there are any duplicate entries in the internal table.

    The issue here is that either the internal table XEKKI contains duplicate entries or the entries that are being inserted are already existing in EKKI.

    If XEKKI contains duplicate entries, then debug "ME_UPDATE_DOCUMENT" to see how it is building XEKKI.

    Note: All the fields in EKKI are primary keys.



    Add comment
    10|10000 characters needed characters exceeded