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 data

juancarlos_tena
Explorer
0 Kudos
276

Hello,

I need exclude several data in an authorization object. For example in LGORT the user can access to all except 1000 warehouse.

I saw in any object some such thing with the '*, -1000' but this show an error.

Is it possible to do it? How ?

Thanks a lot.

6 REPLIES 6
Read only

Former Member
0 Kudos
235

Hi

It is not possible to do an exclusion in authorization object. You cam only include values . Probably you will have to incldu all values except 1000.

Cheers

Read only

Former Member
0 Kudos
235

hi

AUTHORITY-CHECK OBJECT C_AUTH

ID 'ACTVT' FIELD '03'

ID 'WERKS' FIELD DUMMY.

use DUMMY

cheers,

sasi

Read only

juancarlos_tena
Explorer
0 Kudos
235

but if I write DUMMY, this means that no check is performed for the field concerned. And I need to check to the same user, he can see all warehouse except two.

thanks

Read only

0 Kudos
235

hi,

in this case you must call it twise

AUTHORITY-CHECK OBJECT C_AUTH

ID 'ACTVT' FIELD C_ACTIVITY

ID 'WERKS' FIELD '001'.

AUTHORITY-CHECK OBJECT C_AUTH

ID 'ACTVT' FIELD C_ACTIVITY

ID 'WERKS' FIELD '002'.

if it is many more you call it inside the loop.

cheers,

sasi

Read only

Former Member
0 Kudos
235

Hi

I think

or you fill your authorization with all values except those have to be excluded

so

AUTORITY-CHECK

.....

IF SY_SUBRC <> 0. ERROR. ENDIF.

or you create a your custom authorization where you put all values which have to be excluded:

so

AUTORITY-CHECK

.....

IF SY_SUBRC = 0. ERROR. ENDIF.

Max

Read only

pedro_restrepo
Explorer
0 Kudos
235

Hi Paloma,

I guess it is not possible to EXCLUDE authorization values.

SAP roles are made via ADDITION of field values.

On the other hand, if the authorization object is "user-made", you can design the field in a way that fullfills your needs (using values with "placeholders" or values that defines possible combinations)

Other method could be to design several roles, each one with only the auth values needed (and whithout any STCODE).

I guess you speak spanish

Por lo que conozco, las autorizaciones operan siempre de forma aditiva, no conozco forma de excluir valores.

La alternativa, si el objeto de autorización es diseñado por Usted, es crear un valor que represente combinaciones o tenga caracteres tipo "comodín".

Si los desea, puede escribirme a mi buzón directamente:

pedrores@tutopia.com

Good luck