Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.