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

COR2- Revoke Technical Complition.

0 Likes
2,504

Hi Expert.

Please help me. How can possible to Stop user " Revoke Technical Completion " when Process order on "TECHO" Status.

Requirement : 1. To stop the user when doing 'Revoke Technical Completion' tick when process order on 'TECHO' status. if any enhacement available ? Please share me.

Thanks.

Pradip Patel

Hi Expert.

Please help me. How can possible to Stop user " Revoke Technical Completion " when Process order on "TECHO" Status.

Requirement : 1. To stop the user when doing 'Revoke Technical Completion' tick when process order on 'TECHO' status. if any enhacement available ? Please share me.

Thanks.

Pradip Patel

2 REPLIES 2
Read only

aoyang
Contributor
0 Likes
2,335

If you are doing this by "COR2->Process order->Functions->Restrict processing->Revoke technical completion", implementiing exit in include LCOKOF9K worked for me.

You can test with my code below in the enhancement spot. The OK code for "Revoke technical completion" is stored in RC27S-OK_CODE, and I checked that the value is 'TABR'.

The code first checks the user, then check weather TECO status is present, then check the user action(OK code). If OK code is 'TABR', it displays error message on the bottom status bar.

  IF SY-UNAME = 'The user you want to check'.
READ TABLE SET_STAT[] TRANSPORTING NO FIELDS
WITH KEY STAT = 'I0045'. "I0045 = TECO
IF SY-SUBRC = 0.
IF RC27S-OK_CODE = 'TABR'.
MESSAGE 'You do not have permission to Revoke Technical Completion' TYPE 'E'.
ENDIF.
ENDIF.
ENDIF.
Read only

janbuchmann
Contributor
0 Likes
2,335

No need for any ABAP development. Create a status profile in BS02 and define a user status which is automatically set together with TECO. Define business transaction 'Revoke technical completion' as forbidden for your new user status. Lastly, create an Auth.code (BS52) and assign to your new user status.