Application Development and Automation 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: 
Read only

RE: Bapi for locking service order.

Former Member
0 Likes
847

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.

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
Read only

Former Member
0 Likes
675

Refer:

Read only

0 Likes
675

Hi,

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

Regars,

sai.

Read only

0 Likes
675

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.