‎2009 Aug 10 2:52 PM
Hi all ,
In the selection screen I have one parameter.
In the parameter we added 4 values as drop down by using VRM_SET_VALUES.
1.Preview
2.Email
3.Save
4.
Now here I want to apply authorization to some users can do only first 3 activities
where as some will be restricted showing the message no authorization .
How to create the authorization for this field created in the parameter,
Which does not have any data element ?
‎2009 Aug 10 2:54 PM
‎2009 Aug 10 2:56 PM
Hi,
One way would be to maintain a Z-TABLE with use-id and the activity to which authorization is there then in your program you can put a select based on the useid and activity and check authorizations.
regards,
Himanshu
‎2009 Aug 10 3:20 PM
>
> Hi,
> One way would be to maintain a Z-TABLE with use-id and the activity to which authorization is there then in your program you can put a select based on the useid and activity and check authorizations.
>
> regards,
> Himanshu
i don't believe this answer?!?
Surya, you follow Gustavo and Raymond and all will be well ...
Edited by: Mylene Euridice Dorias on Aug 10, 2009 4:22 PM
‎2009 Aug 10 3:20 PM
‎2009 Aug 10 3:03 PM
- SE11 - Domain/Data elmnt - Put your values in a domain value, attach this domain to the data element, (and forget FM VRM_SET_VALUES, just use [AS LISTBOX|http://help.sap.com/abapdocu/en/ABAPPARAMETERS_SCREEN.htm#!ABAP_ADDITION_6@6@] and let DDIC works)
- SU20 - [Creating Authorization Fields|http://help.sap.com/saphelp_nw70/helpdata/EN/52/67168c439b11d1896f0000e8322d00/frameset.htm] - create this data element in the authorization fields, values from domain
- SU21 - [Assigning an Authorization Object to an Object Class|http://help.sap.com/saphelp_nw70/helpdata/EN/52/6716a6439b11d1896f0000e8322d00/frameset.htm] - create an authorization object using this field
- SE38 - [AUTHORITY-CHECK |http://help.sap.com/abapdocu/en/ABAPAUTHORITY-CHECK.htm]check this object in your program
Regards,
Raymond
‎2009 Aug 10 4:35 PM
Hi Surya,
Here the authorization was done on parameter p_bukrs (company code), in similar fashion you can use for other parameters, and in Message enter the appro msg as per your requirement.
AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
ID 'BUKRS' FIELD p_bukrs.
IF sy-subrc NE 0.
MESSAGE e000 WITH 'You are not authorised to use company code'(031)
p_bukrs.
ENDIF.
Regards,
Sana.