‎2010 Jan 06 12:44 PM
Hello Friends ,
I have an requirement to check the authorization for FILENAME for activities 33 and 34. and some other field like bsart for 03 and 08..for this i have created auth object with these fields...and supllying these activities like
ID 'FILENAME' FIELD '33'
ID 'FILENAME' FIELD '34'
ID 'BSART' FIELD '03'
ID 'BSART' FIELD '08'
is it correct? and how it works can you please explain...
‎2010 Jan 06 12:54 PM
hI
The first problem is to understand hiw your object is, I don0t believe u have placed the sames fields twice.
After creating the object, u need to assign it to profile and inseret the values valid for that profile.
So in your program u should have:
AUTHORITY-CHECK OBJECT '<object>'
ID '<field1>' FIELD '......'
ID '<field2>' FIELD '.....'.After checking the authorization u need to check SY-SUBRC: if it's not equal to zero, it means the user is not authorized
Max
‎2010 Jan 06 12:54 PM
hI
The first problem is to understand hiw your object is, I don0t believe u have placed the sames fields twice.
After creating the object, u need to assign it to profile and inseret the values valid for that profile.
So in your program u should have:
AUTHORITY-CHECK OBJECT '<object>'
ID '<field1>' FIELD '......'
ID '<field2>' FIELD '.....'.After checking the authorization u need to check SY-SUBRC: if it's not equal to zero, it means the user is not authorized
Max
‎2010 Jan 06 1:10 PM
Yes max,
if for the same field i have to check 2 values then how i should do ?thats y i repeated the same field to check for those 2 values..if it is not correct then how i should do...?
‎2010 Jan 06 1:19 PM
hI
After creating an object, it can assign more tham 1 value to a field of the object in the profile, if a user is authorized to all values an asteric is assigned instead of the values.
That means it doesn't need to repeat the same field in the objrct.
Anyway u should explain what u need to do? what's your object for?
Max
‎2010 Jan 06 1:24 PM
Hi,
If the combination of values for FILENAME and BSART is not important you will need to preform four checks;
AUTHORITY-CHECK OBJECT <your_object>
ID 'FILENAME' FIELD '33'.
IF SY-SUBRC = 0.
AUTHORITY-CHECK OBJECT <your_object>
ID 'FILENAME' FIELD '33'.
IF SY-SUBRC = 0.
AUTHORITY-CHECK OBJECT <your_object>
ID 'FILENAME' FIELD '33'.
IF SY-SUBRC = 0.
AUTHORITY-CHECK OBJECT <your_object>
ID 'BSART' FIELD '03'
etc.....
If the combinations of FILENAME and BSART are important then you will need to check each required combination.
Regards,
Nick
‎2010 Jan 06 1:06 PM