on 09-02-2015 11:34 AM
Hi Experts
Would just like to request your assistance on this. We have a new requirement wherein our Plant Maintenance work centers/users should be restricted in changing the value of the field ITOB-KOSTL (Cost Center) in the Transaction Code IE02 (Change Equipment). The main goal is to have specific users be restricted in changing this field. If you access transaction code IE02, under "Organization" tab, you can see that the Cost Center field may be changed/edit by the user. What we want to achieve is that for certain users, when they access IE02, this field will be grayed out. Will this be possible?
Appreciate your help.
Thank you and best regards
Natz
Hello Nathaniel,
In case you are unable to do this through other methods the following is a hassle-free method of doing it through the user-exit IEQM0003. I have just tested your requirement and got this error when unauthorized user changed the KOSTL field and tried to Save the Equipment.
The code (to be put in the include ZXEQMU02 of the user-exit IEQM0003):
DATA: lv_kostl TYPE iloa-kostl,
lv_uname TYPE sy-uname.
CLEAR: lv_kostl, lv_uname.
SELECT SINGLE uname FROM ztable into lv_uname WHERE uname = sy-uname.
IF lv_uname <> sy-uname.
SELECT SINGLE kostl FROM v_equi INTO lv_kostl WHERE equnr = data_equi-equnr.
IF data_iloa-kostl <> lv_kostl.
MESSAGE: 'You are not authorized to change the Cost Center'TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.
ENDIF.
So question is how the system identifies the user is authorized or not ? The naswer is you need to maintain a Ztable for authorized users. It can be a single field z table (having only UserId) or two field table having userID and name. The same ztable I referred as ztable in the above code. The code first checks whether the current user is listed in the Ztable or not (line 4). If not (line5) then it retrieves the previous value of KOSTL (line6) and compares this with current value of KOSTL (data_iloa-kostl). If these 2 values are different, then it throws the error pop-up. If the user is listed in the ztabe (at line4) , then the code does not enter the next lines and the changes take place.
Though I have tested this, you can fine tune the code if so needed by your ABAPer.
Good luck
KJogeswaraRao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes,
- A project with name like ZPMEQUI to be created in 210 server with tcode CMOD and then IEQM0003 to be assigned to it in the Enhancements button. Activate it. Test it and Transport it. Then the user-exit would start functioning.
I did not touch upon this because, this is a pre-requisite for any user-exit implementation, ABAPers know normally.
Hi,
Check Authorization object I_KOSTL and Field name KOSTL, assign this to required users for authority.
Regards
Vivek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Please check with SAP Security team and find authorization object (such as I_KOSTL)
assign this object to user id
Br
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nathaniel,
1. Check Transaction Variant SHD0 for specific users, there you can assign users with this variant.
2. Check any Save Exit for Equipment, you can check with your Abaper how to fix it.
Regards
Terence
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maria
Thank you for your suggestion. In my understanding, by using SHD0, we are to create a new transaction code for the customization that we would like to apply. This is the case we want to avoid. Is there a way to assign specific users that will restrict them in changing ITOB-KOSTL field in the standard transaction IE02?
Thank you and best regards
Natz
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.