2011 Sep 28 6:30 AM
Hi
Below is my code.
I have created autorization object and created a role N assigned to a User. But the sy-subrc is zero.
AUTHORITY-CHECK OBJECT 'ZORGEH' FOR USER sy-uname
ID 'ZORGEH' FIELD gv_org
ID 'ACTVT' FIELD '03'.
IF sy-subrc NE 0.
MESSAGE 'No Authorization.' TYPE 'E'.
STOP.
ENDIF.
plz help.
Regards
Nazi
2011 Sep 28 6:45 AM
2011 Sep 28 6:47 AM
Your OBJECT NAME AND ID Name Is same Pls. Try it With Different Name........
2011 Sep 28 9:35 AM
You were exactly right. solved the issue. ihave given object and field in different name. Thanks a loot.
Regards,
nazi
2011 Sep 28 8:12 AM
Hi,
In
AUTHORITY-CHECK OBJECT 'ZORGEH' FOR USER sy-uname
ID 'ZORGEH' FIELD gv_org
ID 'ACTVT' FIELD '03'.
IF sy-subrc NE 0.
MESSAGE 'No Authorization.' TYPE 'E'.
STOP.
ENDIF.
Check 03 for ACTVT field as it usually for display purposer and discplay authorization used to be given to any user ID.
So may be you need to check role assigned to user where for this authorization object values not allowed is 03 or not as possiblility is 01 and 02 may not be allowed but 03 may be allowed.