on 05-27-2014 9:41 PM
Hi,
Can any one suggest,how to block a particular plant for one user.
He should not allowed to use any material from that plant in VA01 or VA02.
Thanks,
Prabhu.
Hi
I have done with the user exit MV45AFZZ.Thank you for your post.
Thanks,
Prabhu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear prabhu,
As per you scenario,you have to go for custom logic which you have create in MV45AFZZ-USEREXIT_MOVE_FIELD_TO_VBAP, for va01 and va31. The
user id has to maintain in dynamic table as per the below screen shot and you
have to restrict at change level also. For va02 and va33 you have to write the
logic in MV45AFZZ-USEREXIT_READ_DOCUMENT.
Logic –
If SY-TCODE = 'VA01' OR SY-TCODE = 'VA02' OR SY-TCODE = 'VA31' OR SY-TCODE = 'VA32'.
IF VBAP-WERKS <> ' '.
DATA: IT_ZSD_PLANT_AUTH TYPE ZSD_PLANT_AUTH,
WA_DYN_VAL TYPE ZSD_TBL_DYN_VAL.
CLEAR: IT_ZSD_PLANT_AUTH.
SELECT SINGLE * FROM ZSD_PLANT_AUTH CLIENT SPECIFIED INTO IT_ZSD_PLANT_AUTH
WHERE MANDT = SY-MANDT AND
AUSER = SY-UNAME AND
APLANT = VBAP-WERKS AND
ZORDER_C = 'X'.
IF SY-SUBRC <> 0.
MESSAGE E000(8I) WITH 'You are not authorized to create/change/display orders for this plant : ' VBAP-WERKS.
Regards,
C.B Reddy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are no standard authorization object to restrict plant in VA01.
You have 2 following options.
1. Consult with your BASIS consultant, he will create a custom authorization object for plant in VA01.
2. By using the exit MV45AFZZ, consult with your ABAP team for more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhu,
on top of my head, user can be restricted to certain sales org, and plant need to be assigned to sales org and distribution channels.
so based on business background, is it possible to maintain the restriction at sales org level and maintain the sales org-plant assignment accordingly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that's correct Naveen. that's why I was asking Prabhu for the business process background. normally access to products/materials are not granted per plant, but per sales org. let's say in Prabhu's case, if for example, sales person A in sales area 1 should not sell anything from plant b since plant b is handled by another group of person from sales area 2, then authorization to sales area 1 is assigned to A. since plant b is not assigned to sales area 1, he will not be able to process any sales from plant b.
Prabhu, if it is only one user, then you need to think more. what if the user changes his position in the organization and will need the access again? what if another person i.e. a new hire needs to be blocked for certain plants?
most likely you can try create a customized table with sap userid-plant combination. in mv45afzz userexit include a logic checking on the table and issue error messages if found blocking criteria.
Hi
Write below logic
for specific your only IN VA01,VA02
MV45AFZB
USEREXIT_CHECK_VBAP
if sy-uname = 'SDCONS'.
IF vbap-werks NE ''.
IF xvbap-werks NE ''.
IF ( sy-tcode = 'VA01' OR sy-tcode = 'VA02' ).
IF ( vbak-vkorg = '1000' OR vbak-vkorg = '1100' ) .
IF vbap-werks = '1100'.
MESSAGE You not authorized plant 1100' TYPE 'E'.
ENDIF.
ELSE.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
regards
sankar
Hi Prabhu,
Please check the option of implementing a custom logic to determine the plant in the user exit USEREXIT_SOURCE_DETERMINATION in the program MV45AFZB. You can explore it more on this user exit and the available options.
Best Regards,
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in SU01 for that user go to 'Parameters' tab and set up parameter id
WRK with parameter value you do allow for this user.
all others plants will be restricted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
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.