on 10-17-2023 9:38 PM
Hello Team,
I am implementing custom Authorization object for particular field on table in ABAP on cloud service. I did all the below steps but still getting sy-subrc = 12 after executing the Authority_Check statement.
Example table name is ZUNIT
Field Name UNIT_CODE .
a. Created the Authorization object ZOBJ_UNIT and authorization Field ZFIELD_UNT along with ACTVT field.
b. Created Restriction type based on the authorization object and Restriction field based on Authorization field.
c. Created new Business catalog and assign the authorization object in the Restriction Type column.
Nothing is maintained in Apps TAB.
d. Created the business Role template based on the catalog.
e. Created new Business role and assign the unrestricted value to business role.
f. Assigned the Business role to Developer user.
Created new test class.
METHOD if_oo_adt_classrun~main.
select * from T001 into table data(lt_table) .
loop at lt_table assigning <fs_table>.
AUTHORITY-CHECK OBJECT 'ZOBJ_UNIT'
ID 'ZFIELD_UNT' FIELD <fs_unit>-unit_code
ID 'ACTVT' FIELD '03'.
after executing this statement sy-subrc value is 12.
endif.
Endmethod.
I have executed the trace also in the Authorization application. It shows the same Business Role
which is already assigned to my user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.