Skip to Content
0
Former Member
Oct 26, 2005 at 10:42 AM

Authority-Check on a quantity field

31 Views

Hello,

I am trying to implement an authorisation check in a bespoke program. The check will effectively mean that only certain users can perform an activity if the a certain quantity limit is involved.

I have created an authorisation field and I have referenced the data element erfmg, as this is the type of the field in the abap program which contains the quantity I wish to check on.

I have created an authorisation object, and in one role I have given the users the values 0 - 9999, and in another role 0 - 9999999.

However when I perform my authority-check in the abap it tells me that I can only use a char field as the comparison. Therefore the authorisation check takes place according to character comparisons and not the numeric quantity. My logic is:-

AUTHORITY-CHECK OBJECT 'ZABCD'

ID 'ZXYZ' FIELD quantity.

If field quantity is defined as type erfmg (i.e. the same as the authorisation field ) then I get a syntax failure because it is not a character field, however when I change it to a char field the authority check is not correct.

Please can you advise, I realise that I may have defined my authorisation field incorrectly.

Thanks in advance.