on 06-14-2008 11:11 PM
Hi Experts,
There is a requirement for making a condition records non-modifiable for some users and modifiable for others using the same SAP system. In other words, we want to see that a user 'sapuser' can only modify K007 discount record and user 'sapuser1' cannot do any modifications.
How to do this?
Thank you
You can achieve your requirement through the user-exit USEREXIT_PRICING_PREPARE_TKOMP.
This user exit can be found in include MV45AFZZ.
You could discuss with your ABAP consultant to achieve this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try this code and check if it works for your requirement.
FORM USEREXIT_PRICING_PREPARE_TKOMP.
DATA: I_T685A TYPE STANDARD TABLE OF T685A WITH HEADER LINE.
IF SY-UNAME = 'SAPUSER '.
LOOP AT XKOMV.
IF XKOMV-KSCHL = ' K007 '.
SELECT * FROM T685A INTO TABLE I_T685A WHERE KSCHL = 'K007'.
READ TABLE I_T685A WITH KEY KSCHL = XKOMV-KSCHL.
I_T685A-KMANU = ' C '. 'Manual entry has priority.
MODIFY I_T685A INDEX SY-TABIX.
MODIFY T685A FROM TABLE I_T685A.
REFRESH I_T685A.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT XKOMV.
IF XKOMV-KSCHL = ' K007 '.
SELECT * FROM T685A INTO TABLE I_T685A WHERE KSCHL = ' K007 '.
READ TABLE I_T685A WITH KEY KSCHL = XKOMV-KSCHL.
I_T685A-KMANU = ' D '. 'Not possible to process manually.
MODIFY I_T685A INDEX SY-TABIX.
MODIFY T685A FROM TABLE I_T685A.
REFRESH I_T685A.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM.
Hi Kamesh,
We have exactly the same problem, but what I don't undertand in your code is, that you are actually modifying the std. SAP config table T685A based on the authorizations of each user with your statement
MODIFY T685A FROM TABLE I_T685A.
What this means is, that if user A has the authorization then you are changing the configuration table for this condition type to C. Then when user B creates or changes another order afterwards and does not have the authorization, then T685A-KMANU will still have the entry for C for user B.
How does this T685A-KMANU value ever get changed back to its original value, so that a user withaut the authorization still sees a 'D' value in T685A-KMANU? How can this table T685A be changed based on a user's authorizations without affecting all the other users, who might have different authorizations and might be running through your logic simultaneously?
Could you please explain?
Thanks,
Peter
HI peter,
u can maintain this by allowing the authorization to particular users .
1. maintain the user menu of VK11/VK12 for specific users.
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
10 | |
9 | |
6 | |
3 | |
3 | |
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.