cancel
Showing results for 
Search instead for 
Did you mean: 

How to find if a Purchase order is in change mode

Former Member
0 Kudos

Hi Experts,

I am struck with a problem in my pr po approval web dynpro application.

Using this application users can approve a po, but if the same po is being editing by some one at the same time, we should display an error message.

i came to know that, if a po is being edited then the lock object for purchasing document will get locked.

i am trying to call a function .. CALL FUNCTION 'ENQUEUE_EMEKKOE' providing the PO number .. but not successful.

Thanks in Advance for your support.

Sateesh J

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Thank you for your valuable time and support.

I have resolved by myself.

when a user approves the PO, we are calling BAPI_PO_RELEASE Funtion module, in which we have the

parameter return of type bapireturn (in tables).

I am reading the return table which contains all the error messages ... includes the message when the same PO is being edited by some one else. And displaying the standard error message to the user.

Kind Regards

Sateesh J

saravanan_narayanan
Active Contributor
0 Kudos

Hello Sateesh,

Once you are in edit mode of the Purchase order, check in SM12, whether the PO is acutally locked (lock entries should be avialable for the PO). There might be case where the lock for the PO will be acquired only during the SAVE and not during actual editing.

BR, Saravanan

Former Member
0 Kudos

Hi Saraa_n,

I think that lock is obtained when you enter in EDIT mode.

If you have noticed any in Tx when in Edit mode, then SAP will not allow other users to enter into EDIT mode.

Former Member
0 Kudos

As far as I understand ENQUEUE_EMEKKOE is used to lock object.

http://wiki.sdn.sap.com/wiki/display/ABAP/lockandunlock+PO

you want to find out whether object is locked or not before locking the object.

I am not a programmer but understand a bit of coding. Well I think that ENQUEUE_EMEKKOE itself should give a message of object is locked.

If not try out table with is used to display active locks in the system (TCODE: sm12). T-code sm12 enables u to view and manage entries in the lock. find out which entry means what.

http://benstudycenter.blogspot.com/2008/01/sm12-table-lock-concept.html