Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC The plant data of the material xx is locked by the user yy

bzakaria
Participant
0 Kudos
397

Hello,

I have a program to process data of an IDOC type. in the program I have a process to declare production via the BAPI function : BAPI_PRODORDCONF_CREATE_TT.

my problem is that I cannot carry out goods movements, even if I have set instructions to remove blockages...etc.

What should I do to avoid this problem?

SM12 before launching IDOC is empty, and the program only includes these function calls + data processing without function calls.

I want to execute only one movement code: 101.

Error message : The plant data of the material xx is locked by the user yy

code :

WAIT UP TO 5 SECONDS.
      CALL FUNCTION 'DEQUEUE_ALL'
EXPORTING
_synchron = 'X'.
      COMMIT WORK AND WAIT.

CALL FUNCTION 'BAPI_PRODORDCONF_GET_TT_PROP'
     EXPORTING
       PROPOSE                  = i_propose
*   IMPORTING
*     RETURN                   =
      TABLES
        TIMETICKETS              = i_timetickets
        GOODSMOVEMENTS           = i_GOODSMOVEMENTS
        LINK_CONF_GOODSMOV       = i_LINK_CONF_GOODSMOV
        DETAIL_RETURN            = i_DETAIL_RETURN.

WAIT UP TO 5 SECONDS.
      CALL FUNCTION 'DEQUEUE_ALL'
EXPORTING
_synchron = 'X'.
      COMMIT WORK AND WAIT.

CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
    EXPORTING
       POST_WRONG_ENTRIES       = '2'
     TESTRUN                  = ''
   IMPORTING
     RETURN                   = v_return
      TABLES
        TIMETICKETS              = i_timetickets
        GOODSMOVEMENTS           = i_GOODSMOVEMENTS
        LINK_CONF_GOODSMOV       = i_LINK_CONF_GOODSMOV
        DETAIL_RETURN            = i_DETAIL_RETURN.


  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      DESTINATION 'NONE'
      EXPORTING
        wait = 'X'.

    CALL FUNCTION 'RFC_CONNECTION_CLOSE'
      EXPORTING
        destination = 'NONE'
      EXCEPTIONS
        OTHERS      = 0.<br>

Thanks.

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos
316

If no specific code is involved (eg. some Enhancement, BAdI or Workflow) did you already look for OSS notes related to lock with this BAPI such as 2054996 or 3212735 that could be relevant to your system?

Also do you execute the BAPI in destination NONE or locally, your code doesn't seem consistent on this point