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

How to restrict few users - Work order priority

Former Member
0 Likes
640

Hi experts,

i have an requirement in WO (IW31), i have implemented a logic that user cannot change the WO priority once it is already released .

if sy-tcode = 'IW31' or sy-tcode = 'IW32' or sy-tcode = 'IW38' or sy-tcode =  'IW21' or sy-tcode = 'IW22'.

     if caufvd_imp-auart = 'PM01' or caufvd_imp-auart = 'ZWNT' or caufvd_imp-auart = 'PM02'.

       if lv_order_rel = 'X'.

         clear :  lw_jest.

         select single * from jest into lw_jest where

                                                  objnr = caufvd_imp-objnr

                                            and   stat  = 'I0001'

                                            and   inact <> 'X'.

         if sy-subrc ne '0'.

           message e032(zmm_dev).

         endif.

       endif.

Now i need to add workaround that the logic should bypass for few user and change the propriety, i assume i need to created specific role for them and impliment the logic.

Please let me know your ideas on how can i achieve the required restriction .

Regards

Niru

Hi experts,

i have an requirement in WO (IW31), i have implemented a logic that user cannot change the WO priority once it is already released .

if sy-tcode = 'IW31' or sy-tcode = 'IW32' or sy-tcode = 'IW38' or sy-tcode =  'IW21' or sy-tcode = 'IW22'.

     if caufvd_imp-auart = 'PM01' or caufvd_imp-auart = 'ZWNT' or caufvd_imp-auart = 'PM02'.

       if lv_order_rel = 'X'.

         clear :  lw_jest.

         select single * from jest into lw_jest where

                                                  objnr = caufvd_imp-objnr

                                            and   stat  = 'I0001'

                                            and   inact <> 'X'.

         if sy-subrc ne '0'.

           message e032(zmm_dev).

         endif.

       endif.

Now i need to add workaround that the logic should bypass for few user and change the propriety, i assume i need to created specific role for them and impliment the logic.

Please let me know your ideas on how can i achieve the required restriction .

Regards

Niru

2 REPLIES 2
Read only

sebastian_lenartowicz
Active Contributor
0 Likes
552

Greetings Niru,

I guess you need to identify the role that should have this bypass by the authorization object and value and do an AUTHORITY-CHECK ? Maybe that thread will help

Read only

prakashjasti
Contributor
0 Likes
552


Hi Niru,

We can maitain the users in a custom table and read the internal table for it

before giving an error message and check if the user is eligible for changing the order

or not.

Regards,

Prakash.

Prakash J