cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict revoking of TECO in IW32 for some users

Former Member
0 Kudos

I would like to restrict revoking of TECO status in IW32 but only for some users.

I found out some threads explaining this should be possible using BS02 and OPJH. I tried tu use these transactions but without success.

Does anybody know how to do that using these transactions or maybe another way to do it ?

Thank you in advance for your help

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Janaka Vitharana

There is way. It is user-exit IWO10009.

First create a Ztable (say ZTABLE) having the list of authorized users in field say UNAME. Have all the authorized userIds in this table in field UNAME.

Now put the code below in the include ZXWOCU07 of the above exit.

IF caufvd_imp-iphas = '2'.
  DATA: v_stat TYPE char1,
        v_name TYPE uname.
  SELECT SINGLE iphas INTO v_stat FROM afih WHERE aufnr = caufvd_imp-aufnr.
  IF v_stat = '3'.
    SELECT SINGLE uname INTO v_name FROM ztable WHERE uname = sy-uname.
    IF v_name IS INITIAL.
      MESSAGE: 'You are not authorized to revoke TECO status.' TYPE 'E'.
    ENDIF.
  ENDIF.
ENDIF.

After this, when a user not listed in the Ztable tries to 'Cancel the Technical Completion' of an Order, he will not be allowed by receiving this error message in the status bar.

I have tested the code and found working well. You too test it thoroughly before adopting.

Good luck.

Answers (1)

Answers (1)

peter_atkin
Active Contributor
0 Kudos

You can do this with user statuses.

Create a user status profile for PM/PP orders (BS02/OIBS), then create a new user-status and ensure business transaction Revoke technical completion is forbidden.

PeteA

Former Member
0 Kudos

Dear Peter,

Thanks Mr Pete,But there are no PM Oder type.There are showing only PM Oder type.Please help me