cancel
Showing results for 
Search instead for 
Did you mean: 

Lock Entry - Program /SAPAPO/RTSCOPY

Former Member
0 Kudos

Hi Experts,

Here is my requirement..

We need to run the program /SAPAPO/RTSCOPY ( TCODE:
/n/sapapo/tscopy) for copying transactional data from Source Planning Area to
Target Planning Area. However there could be Planners in “Change Mode” in the
Target Planing Area and when this is the case, the program fails to upload data
in the Target Planning Area and throws an error message- “Could not update
because of Lock Entries”

As we know this is standard SAP check for  the lock entry to prevent in-consistent

database update . We have our business requiremnt to update read only key figures.

Is there anyway to bi-pass/release the lock already put by the standard locking

mechanism during the run of this program /SAPAPO/RTSCOPY.

Thanks very much in Advace...

Sanoj A

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sanoj,

I can really not recommend to bi-pass the lock check.

But if you want to do so, the easiest way is to copy /SAPAPO/RTSCOPY to ZRTSCOPY and get rid of the following rows:

Version sperren

  CALL FUNCTION '/SAPAPO/TS_DM_LOCK_UNLOCK'

    EXPORTING

      iv_pareaid   = p_area

      iv_vrsioid   = p_versfr

      iv_lock      = true

    CHANGING

      ct_selection = lt_selection_lock

    EXCEPTIONS

      error        = 1

      OTHERS       = 2.

  IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  ENDIF.

Be careful 😉

Uli

Former Member
0 Kudos

Hi,

You cannot do that, you should lock the PA and then run RTS Copy. Since the same CVC which you are updating is used by the planners, it throws the error.

Regards