Skip to Content
author's profile photo Former Member
Former Member

SCEM problem creating info parms

IF not it_ehemfparameters[] is INITIAL.

CALL FUNCTION '/SAPTRX/BAPI_EH_SET_INF_PAR'

TABLES

ehparameters = it_ehemfparameters

return = i_return.

ENDIF.

I am getting a short dump on the above BAPI call. "The sql insert results in duplicate records".

The key of the table is the guid which I pass it and a seqnr that is generated within the BAPI call by SAP. This dumped with over 3000 records in the internal table. I unfortunately cannot see the data at this point. The code was backed out. I assume that the BAPI is trying to use the same seqnr for more than one record with the same guid.

Has anybody had this problem?

thanks, J

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 Jan 08, 2007 at 08:07 PM

    Hi J J

    If you still have the dump you will be able to see the data for variables/tables in use at the time of the dump. If the dump does not exist anymore then force it to happen again so you can look at the results. Look at what is in the variable i_table_name to determine what database table is being inserted. Then you can look in the i_ins_tab to see what records are trying to be inserted and compare back to the table you are passing to '/SAPTRX/BAPI_EH_SET_INF_PAR'. Perhaps you are reusing data for which you have already inserted records? If so then you need to set the processing indicator to update instead of insert.

    Andy

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I think the problem is related to the seqnr which is generated by the BAPI. I think in some cases it must be giving out the same seqnr.

      I know the BAPI handles the case where I pass it the same guid. i.e: It knows whether to insert or update based on the record existing for that guid. I do not pass an indicator of u or i.

      I have not been able to re-create the problem yet and the dump in ST22 does not tell me much. I cannot see the data , its all in hex.

      J

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.