Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Overcome Update Termination while using OIJ_NOM_MAINTAIN_MULTIPLE FM

$
0
0

When we try to update the Nomination using the Function Module OIJ_NOM_MAINTAIN_MULTIPLE, we get an Error Message ‘Update was terminated for xyz user’.

Pic1.png

 

 

The following screenshots are from SM13 Transaction Code:

 

 

pic2.png

pic3.JPG

After debugging the standard Function Module, we found out it is due to insertion of repeated records.

pic4.png

 

In the above piece of code (SAP standard Function Module), the Internal Table is not sorted and in READ statement, BINARY SEARCH is used. This is causing the problem.

Hence, we sorted the Internal Table by NOMTK , NOMIT and then passed to the Function Module OIJ_NOM_MAINTAIN_MULTIPLE which resolved the issue.

SORT l_t_nomi BY nomtk nomit.

CALLFUNCTION'OIJ_NOM_MAINTAIN_MULTIPLE'
    EXPORTING
      it_nom_header       = p_l_t_headerdata
      it_nom_item         = p_l_t_nomi
      iv_update_worklist  = c_on
      iv_update_stockproj = c_on
      iv_add_to_log       = c_on
      iv_internal         = c_on
      iv_lock             = c_off
      iv_application      =
'NOMINATION'
    IMPORTING
      et_return           = l_t_return
   
EXCEPTIONS
      nomination_locked   = 1
      error_phase_01      = 2
      error_phase_02      = 3
      OTHERS              = 4.


Viewing all articles
Browse latest Browse all 935

Trending Articles