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:

/wp-content/uploads/2014/02/pic2_391246.png

pic3.JPG

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

/wp-content/uploads/2014/02/pic4_391249.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.

CALL FUNCTION ‘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.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply