cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Update error, transaction MFBF

gyanaranjan_rout
Contributor
0 Likes
1,619

Hi Experts,

While performing Assembly backflash in MFBF following express termination error appeared(Finished Good is Batch Managed).

Update was terminated

System ID.... XXP
Client....... 999
User..... XXXXX
Transaction.. MFBF
Update key... B9EF63E4DD9FF19A93F42C44FD82D856
Generated.... 04.11.2014, 12:27:06
Completed.... 04.11.2014, 12:27:06
Error Info... Internal session terminated with runtime error SAPSQL_ARRAY_INSERT_DUPREC (see S


While analysis in ST22, below DUMP is appeared.


Runtime Errors    SAPSQL_ARRAY_INSERT_DUPREC
Exception         CX_SY_OPEN_SQL_DB
Date and Time     04.11.2014 12:27:06

Short text

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

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 c

   in

  procedure "CO_RU_VB_CONFIRMATION_POST" "(FUNCTION)", nor was it propagat

   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.)

How to correct the error

    Use an ABAP/4 Open SQL array insert only if you are sure that none of

    the records passed already exists in the database.

    If the error occures in a non-modified SAP program, you may be able to

    find an interim solution in an SAP Note.

    If you have access to SAP Notes, carry out a search with the following

    keywords:

    "SAPSQL_ARRAY_INSERT_DUPREC" "CX_SY_OPEN_SQL_DB"

    "SAPLCORV" or "LCORVU01"

    "CO_RU_VB_CONFIRMATION_POST"

    If you cannot solve the problem yourself and want to send an error

    notification to SAP, include the following information:

    1. The description of the current problem (short dump)

       To save the description, choose "System->List->Save->Local File

    (Unconverted)".

    2. Corresponding system log

       Display the system log by calling transaction SM21.

       Restrict the time interval to 10 minutes before and five minutes

    after the short dump. Then choose "System->List->Save->Local File

    (Unconverted)".

    3. If the problem occurs in a problem of your own or a modified SAP

    program: The source code of the program

       In the editor, choose "Utilities->More

    Utilities->Upload/Download->Download".

    4. Details about the conditions under which the error occurred or which

    actions and input led to the error.

    The exception must either be prevented, caught within proedure

    "CO_RU_VB_CONFIRMATION_POST" "(FUNCTION)", or its possible occurrence must be

     declared in the

    RAISING clause of the procedure.

    To prevent the exception, note the following:

>>>>INSERT afru FROM TABLE afru_i.
* erfolgreich ?
   IF sy-subrc EQ 4.
     DESCRIBE TABLE afru_i LINES tmp_entries.
     MESSAGE x804 WITH 'AFRU' tmp_entries sy-dbcnt.
   ENDIF.
* falls Transferkennzeichen für CATS zu setzen sind
   IF NOT cats_update IS INITIAL.
     LOOP AT afru_i
       WHERE NOT catsbelnr IS INITIAL.
       CASE afru_i-orind.
         WHEN orind-pm.
*         Prüfen, ob Stornosatz hinzugefügt wurde
           IF afru_i-stzhl IS INITIAL.
             UPDATE catspm SET transfer = yx
               WHERE belnr = afru_i-catsbelnr
                 AND stokz = space.
           ELSE.
             UPDATE catspm SET transfer = yx
               WHERE belnr = afru_i-catsbelnr
                 AND stokz = yx.
           ENDIF.
         WHEN orind-ps.
*         Prüfen, ob Stornosatz hinzugefügt wurde
           IF afru_i-stzhl IS INITIAL.
             UPDATE catsps SET transfer = yx
               WHERE belnr = afru_i-catsbelnr
                 AND stokz = space.
           ELSE.

Please help me to rectify this issue.

Accepted Solutions (0)

Answers (1)

Answers (1)

UmeshMali4994
Active Contributor

Hello Gyan,

While creating batch management in REM process, Check below point

While creating repetitive manufacturing profile you need to maintain Batch Search Procedure in Control Data 2      Tab under Material Requirements. (T-Code: OSP2)

  In REM during confirmation GR also taking place automatically and Batches also created automatically by the     system if the batches are created internally by the system .

  Using MSC1N is used to create batch manually

I hope this information helpful to you

Regards

Umesh Mali

Caetano
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello

Please check if the confirmation counter from table AFVC matches with the confirmation counter on table AFRU and let me know if there is a difference.

BR

Caetano

gyanaranjan_rout
Contributor
0 Likes

Hi Umesh,

Automatic batch determination is maintained.

gyanaranjan_rout
Contributor
0 Likes

Hello Caetano,

Confirmation Counter(RMZHL) in table AFVC doesn't carry any data(Field is blank) but Confirmation counter(RMZHL) in table AFRU contain some values.

Caetano
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello

This is a database inconsistency. Please open an incident to SAP.

BR

Caetano

gyanaranjan_rout
Contributor
0 Likes

Hi Canteno,

Issue has been resolved.

We have debuged  thoroughly MFBF transaction code and found Out the root cause:

Internal table AFRU_I contains one or more records for the confirmation number

and the confirmation counter, which already exist in table AFRU.

we have applied note 335559
- Confirmation: SAPSQL_ARRAY_INSERT_DUPREC table AFRU

Thanks for your co-operation and support.

BR,

Gyan

jorsanco
Participant
0 Likes
Very important!!