Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

RE: Bapi for locking service order.

Hi Experts,

Suggest me the bapi or function module to lock a service order.

I tried the function module VPKPMSM_LOCK_SERVICE_ORDER .

I have passed the service order number .

Please check the below code.

CALL FUNCTION 'VPKPMSM_LOCK_SERVICE_ORDER'

EXPORTING

i_aufnr = '000004000286'

EXCEPTIONS

INPUT_ERROR = 1

LOCKING_FAILED = 2

OTHERS = 3

.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

Else.

commit work.

if sy-subrc eq 0.

write: 'locked'.

endif.

endif.

Former Member
Not what you were looking for? View more on this topic or Ask a question