‎2007 Oct 16 2:27 PM
Hi All,
I need to create a button in a Report,
but this appears only to registered users in a table "ZAUTHORITY";
any ideias?
I try with Authority Check, but I received only "sy-subrc = 0";
I have created the Class "ZAC"(su21) with Object "ZOAUTCHECK"(su21), the Object has the field "ZAUTCHECK"(su20), I put "ZAUTHORITY" at Check Table in this field;
***
Sorry, I forgot to mention: the name of the field in the table "ZAUTHORITY" is "USUARIO" with a Data Element and Domain(type Char 25).
***
Regards
Allan Cristian
Message was edited by:
Allan Cristian
‎2007 Oct 16 2:49 PM
Hi,
The check table will not work in restricting authorization. Check table is just to restrict the allowed values for the field.
If the requirement is to just display the button based on users present in the table ZAUTHORITY, then there is no need of creating the authority object. You can check if for the user entry in present in the table then display the button to him...
If you want to use the Authority object for Controlling the authorization, then there is no need of having the table. Just Create a new authority object and the field, then assign some value ('X') to that field in the authorization profile to the user for which the authorization is required.
In the program you use authority-check on the field with some fixed value say 'X'.
if the check passes (which will happen only for the user having the required authorization, you display the field)
for the others just disable the field.
Regards,
Abhishek
‎2007 Oct 16 2:36 PM
The Z table you have mentioned is present in only your system. We will not have any idea what it is used for.
Also the Authority Check you have mentioned shows that you are authorized for the respective task.
Now to create a button, if it is in Selection screen, follow this link.
If it is in report output, follow link -
Hope this helps.
ashish
‎2007 Oct 16 2:37 PM
ok, thx Ashish, I'll follow urs link and post the results here.
‎2007 Oct 16 2:49 PM
Hi,
The check table will not work in restricting authorization. Check table is just to restrict the allowed values for the field.
If the requirement is to just display the button based on users present in the table ZAUTHORITY, then there is no need of creating the authority object. You can check if for the user entry in present in the table then display the button to him...
If you want to use the Authority object for Controlling the authorization, then there is no need of having the table. Just Create a new authority object and the field, then assign some value ('X') to that field in the authorization profile to the user for which the authorization is required.
In the program you use authority-check on the field with some fixed value say 'X'.
if the check passes (which will happen only for the user having the required authorization, you display the field)
for the others just disable the field.
Regards,
Abhishek