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

Authorization

Former Member
0 Likes
786

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 ?

6 REPLIES 6
Read only

Former Member
0 Likes
735

Search the forum for Authority Objects and Authority Check.

Read only

Former Member
0 Likes
735

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

Read only

0 Likes
735

>

> 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

Read only

0 Likes
735

sorry, duplicate

Read only

RaymondGiuseppi
Active Contributor
0 Likes
735

- 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

Read only

Former Member
0 Likes
735

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.