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: 

RE: Bapi for locking service order.

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

Refer:

0 Kudos

Hi,

I tried that function module its not working. I provided the code also. Please check the code and correct it.

Regars,

sai.

0 Kudos

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.