Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

create a Button

Former Member
0 Likes
456

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

1 ACCEPTED SOLUTION
Read only

former_member195698
Active Contributor
0 Likes
426

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

3 REPLIES 3
Read only

Former Member
0 Likes
426

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

Read only

0 Likes
426

ok, thx Ashish, I'll follow urs link and post the results here.

Read only

former_member195698
Active Contributor
0 Likes
427

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