Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAPSQL_ARRAY_INSERT_DUPREC - ABAP runtime error SAPLSDD0 DD_DTEL_SET_PUT

I have done a system copy of Production Systems (APO, BW) onto new Hardware and converted from Oracle Db to DB2, and connected to an ECC (Oracle) system which already existed but was a copy of Live some months ago. I have gone through ALE Model, BDLS etc to reset everything. Most is working OK but I am having an issue with a specific Process Chains.

This process chain has 10 "sets" of IP and DTP from the ECC system, and is set to work in 2 Banks of 5...i.e. when starts it sets off 5 concurrent "sets" if IP and DTP, and then when each of these 5 finishes it sets of one of the next set of 5. (Note each DTP is set to 3 Parallel processes)

Some of these sets complete, but some of them are failing on DTP.

Runtime Errors         SAPSQL_ARRAY_INSERT_DUPREC

Exception              CX_SY_OPEN_SQL_DB

Short text
    The ABAP/4 Open SQL array insert results in duplicate database records.

What happened?
    Error in the ABAP Application Program

    The current ABAP program "SAPLSDDO" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.

Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
     in
    procedure "DD_DTEL_SET_PUT" "(FUNCTION)", nor was it propagated by a RAISING
     clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.

    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)

Information on where terminated
    Termination occurred in the ABAP program "SAPLSDDO" - in "DD_DTEL_SET_PUT".
    The main program was "RSPROCESS ".

    In the source code you have the termination point in line 54
    of the (Include) program "LSDDOU08".
    The program "SAPLSDDO" was started as a background job.
    Job Name....... "BI_PROCESS_DTP_LOAD"
    Job Initiator.. "P01COMSC"
    Job Number..... 11060701
    The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
    procedure "DD_DTEL_SET_PUT" "(FUNCTION)", but it was neither handled locally
     nor declared
    in the RAISING clause of its signature.

    The procedure is in program "SAPLSDDO "; its source code begins in line
    1 of the (Include program "LSDDOU08 ".

Line  SourceCde

   24   SCREEN> PRID -1 DO_CLOSE.
   25 * Test the preconditions: ----------------------------------------------
   26   IF PUT_STATE CN GET_STATI.
   27 *   D0 002: Akt. Parameter &=& unzulässig !
   28     SMI3> PRID 'E' 'D0002' 'DD_DTEL_SET_PUT' 'PUT_STATE' PUT_STATE.
   29     MESSAGE ID 'D0' TYPE 'E' NUMBER '002'
   30        WITH    'DD_DTEL_SET_PUT' 'PUT_STATE' PUT_STATE
   31        RAISING ILLEGAL_VALUE.
   32   ENDIF.
   33 * End of testing the preconditions. ------------------------------------
   34
   35 * Prepare the DTEL headers for database writing:
   36   LOOP AT DD04L_TAB.
   37     IF DD04L_TAB <> SPACE.
   38       CLEAR: PUT_04L_TAB.
   39       CREATE_HEADER: PUT_04L_TAB DD04L_TAB PUT_STATE GET_A GET_L.
   40       APPEND PUT_04L_TAB. L_NO = L_NO + 1.
   41     ENDIF.
   42   ENDLOOP.
   43
   44   IF L_NO > 0.                         " if there are some DTEL headers
   45     PERFORM DD04T_TAB_CREATE TABLES DD04T_TAB PUT_04T_TAB
   46                              USING  PRID PUT_STATE REPLACE.
   47     DESCRIBE TABLE PUT_04T_TAB LINES T_NO.
   48     IF T_NO > 0.
   49 *     Delete old DTEL texts:
   50       PERFORM DD04T_DEL TABLES PUT_04T_TAB USING PRID PUT_STATE RC.
   51       IF RC <> 0. EXIT. ENDIF.
   52 *     Insert the new db tupels:
   53       DUP_KEY_CARE: PUT_04T_TAB DDTEXT PRID 'DD_DTEL_SET_PUT' <F> RC.
>>>>>       IF RC = 0. INSERT DD04T FROM TABLE PUT_04T_TAB. ENDIF.
   55     ENDIF.
   56 *   Delete old DTEL headers:
   57     PERFORM DD04L_DEL TABLES PUT_04L_TAB USING PRID PUT_STATE RC.
   58     IF RC <> 0. EXIT. ENDIF.
   59 *   Insert the new db tupels:
   60     DUP_KEY_CARE: PUT_04L_TAB DOMNAME PRID 'DD_DTEL_SET_PUT' <F> RC.
   61     IF RC = 0. INSERT DD04L FROM TABLE PUT_04L_TAB. ENDIF.
   62   ENDIF.
   63
   64 * Update DDTYPES
   65   ASSIGN: DD04L_TAB-ROLLNAME TO <F>,
   66           PUT_04L_TAB-ROLLNAME TO <G>.
   67   PERFORM UPDATE_DDTYPES(SAPLSTYP)
   68           TABLES DD04L_TAB PUT_04L_TAB
   69           USING <F> <G> 'DTEL' PUT_STATE PRID

Along side this, some of the sets fail with:

Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
Exception              CX_SY_REF_IS_INITIAL
Date and Time          18.12.2012 11:11:34

Short text
     Access via 'NULL' object reference not possible.

What happened?
     Error in the ABAP Application Program

     The current ABAP program "CL_RSBK_CMD_DP_LOOP===========CP" had to be
      terminated because it has
     come across a statement that unfortunately cannot be executed.

Error analysis

    An exception occurred that is explained in detail below.

    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not

     caught in

    procedure "SET_DP_IN_PROCESS" "(METHOD)", nor was it propagated by a RAISING

     clause.

    Since the caller of the procedure could not have anticipated that the

    exception would occur, the current program is terminated.

    The reason for the exception is:

    You attempted to use a 'NULL' object reference (points to 'nothing')

    access a component (variable: "ME->P_R_LOG").

    An object reference must point to an object (an instance of a class)

    before it can be used to access components.

    Either the reference was never set or it was set to 'NULL' using the

    CLEAR statement.

Information on where terminated
    Termination occurred in the ABAP program "CL_RSBK_CMD_DP_LOOP===========CP" -
     in "SET_DP_IN_PROCESS".
    The main program was "RSBATCH_EXECUTE_PROZESS ".

    In the source code you have the termination point in line 38
    of the (Include) program "CL_RSBK_CMD_DP_LOOP===========CM00J".
    The program "CL_RSBK_CMD_DP_LOOP===========CP" was started as a background job.
    Job Name....... "BIDTPR_400213_1"
    Job Initiator.. "P01COMSC"
    Job Number..... 11112700
    The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
    procedure "SET_DP_IN_PROCESS" "(METHOD)", but it was neither handled locally
     nor declared
    in the RAISING clause of its signature.

    The procedure is in program "CL_RSBK_CMD_DP_LOOP===========CP "; its source
     code begins in line
    1 of the (Include program "CL_RSBK_CMD_DP_LOOP===========CM00J ".

Line  SourceCde

    8                                  i_batch_id = i_r_process->n_batch_id ).
    9 * ------ update process --------------------
   10       i_r_process->set_datapackage( l_r_dp ).
   11 * ----- get selections from datapackage
   12 *       exit if list is empty ------------
   13       data: l_th_range type rsbk_th_range,
   14             l_s_range type rsbk_s_range.
   15       l_th_range = l_r_dp->if_rsbk_dp~get_selections( ).
   16       check not l_th_range is initial.
   17 * ----- update extraction command -----------
   18       data: l_r_cmd_x type ref to if_rsbk_cmd_x.
   19       l_r_cmd_x = i_r_process->n_r_request->get_obj_ref_cmd_x( ).
   20       data: l_th_range_x type rsbk_th_range.
   21       l_th_range_x = l_r_cmd_x->get_th_range( ).
   22 * --- none of the fields in the datapackage selection may occur in the fixed list! ---
   23       loop at l_th_range into l_s_range.
   24         at new fieldnm.
   25           data l_s_range_x type rsbk_s_range.
   26           loop at l_th_range_x into l_s_range_x.
   27             check l_s_range_x-fieldnm = l_s_range-fieldnm.
   28             delete table l_th_range_x from l_s_range_x.
   29           endloop.
   30         endat.
   31       endloop.
   32       loop at l_th_range into l_s_range.
   33         insert l_s_range into table l_th_range_x.
   34       endloop.
   35       l_r_cmd_x->set_th_range( l_th_range_x ).
   36       data l_r_root type ref to cx_root.
   37     catch cx_root into l_r_root.
>>>>>       p_r_log->add_exception( l_r_root ).
   39       message x299.
   40   endtry.
   41 endmethod.

Can anyone explain what is happenning? At first I thought there were not enough BGD processes available in new BI system (there are only 12 available (compared to 24 on live) but I ran the process and monitored in sm50, and hardly any processes were used before the first error was received so it must be something else?

Cheers

Simon

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question