cancel
Showing results for 
Search instead for 
Did you mean: 

Roles with dates authorization object

former_member384574
Active Participant
0 Kudos
528

Hi experts,

I have created an authorization role which has this configuration

Field1 = ABCD

Field2 = IPAN

Field3 = 01.01.1981 - 31.12.1983

When a user has this role, this information needs to be checked, including the birth date. So in this way, is there any posibility to do a between check in an authority check?

authority-check object 'ZHR_BIRTH'
id 'ZFIELD1' field ls_user-field1
id 'ZFIELD2' field ls_user-fild2
id 'ZBIRTH_DATE' field ls_user-birth --> Is there here any between or any comprobation for a range?


Thanks in advance!


Regards,


Rebeca


Accepted Solutions (1)

Accepted Solutions (1)

former_member384574
Active Participant
0 Kudos

Finally what I have done is to check the information of the role and compare it. The function I've used is EFG_USER_AUTH_FOR_OBJ_GET

Answers (1)

Answers (1)

Sandra_Rossi
Active Contributor
0 Kudos

ABAP authorization concept allows intervals in fields.

Each field of an Authorization record in a profile/role can contain:

  • either an exact value, (NB: use '' or ' ' to indicate a blank value)
  • or all values starting with given characters (A* means any value starting with A),
  • or an interval (A to C means any value starting with A and B, plus the exact value C),
  • or an interval of values with a wildcard at the end (A* to C* means anything starting with A, B or C),
  • or a list of values (whatever it's exact values, values with wildcard at the end),
  • or all values (*).

Be careful, A*B is forbidden/impossible, the star can be at the end only (e.g. A*).

An authorization check can only be done using an exact value or none value (either not mentioning "ID 'fieldname' FIELD 'value'", or mentioning "ID 'fieldname' DUMMY) for each field.

In your case, you may indicate dates in YYYYMMDD format

Field3 = interval from 19810101 to 19831231<br>