2022 Jan 25 6:25 AM
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
2022 Jan 25 1:47 PM
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.
2022 Jan 25 2:09 PM
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.