05-05-2009 11:42 AM
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.
05-05-2009 8:10 PM
05-06-2009 4:57 AM
Hi,
I tried that function module its not working. I provided the code also. Please check the code and correct it.
Regars,
sai.
05-06-2009 2:44 PM
Hi,
The function module 'VPKPMSM_LOCK_SERVICE_ORDER' locks the service order only while the run time. I need the function module which locks the service order permanantly.
Regards,
Sai.