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

Adding security to a single tab

Former Member
0 Likes
1,227

Hello! I've been tasked with adding security to a single tab (Payment Transactions) in XD02. Basically, we're creating a new authorization and if the user does not have a high enough level of this authorization, the information on the tab should be display only while the other tabs in XD02 stay in edit mode. It was also asked if the user did not have any authorization that the tab should be hidden. Any ideas on how to make a single tab display only while the program is running?

Thanks!

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
1,184

Hi Rod.. find a suitable user exit / screen exit and try to use the authorization check as per my previous posts.. based on the authorization try if you can call that subscreen or loop at screen and hide the screen fields..

9 REPLIES 9
Read only

former_member156446
Active Contributor
0 Likes
1,184

Hi there..to check the authorization follow this link

Read only

0 Likes
1,184

Sorry J@Y, but that is a "cheap shot".

I am disappointed that you gave those folks ponits for copy & pasting from SAP Help and SFLIGHT, but more so because your link here has little to do with the most obvious solution to this specific requirement.

Please read the questions carefully, as this helps improve the quality in the forums and not sending people off on a wild goose chase after some generic information.

Cheers,

Julius

Read only

0 Likes
1,184

I am disappointed that you gave those folks ponits for copy & pasting from SAP Help and SFLIGHT

when you have emergency or the dead line is hitting on your head.... all you need is one helpfull answer, for that awarding points is the one thing, I did to extract max from the highly skilled members of SCN else was in a fear of over head hours on my task which I didn't want to happen. It was a very old post though...

Read only

0 Likes
1,184

Hi J@Y,

> ... when you have emergency or the dead line is hitting on your head....

But Rod did not say that he was in a hurry, nor that he did not know how a vanilla authority-check works...

I think the answer to this is in transaction OB23 and some other transactions related to it. At least that would be the most obvious answer - but it would apply to all users of the related FD / XD transactions.

But that is only from memory, so perhaps taking a closer look to post a really meaningfull and usefull answer is the better option for me as well.

Lets see... (I will check my box of tricks and the coding).

Of course, it would also be usefull to know which release this relates to, as there might be new (standard) features...

Cheers,

Julius

Read only

former_member156446
Active Contributor
0 Likes
1,185

Hi Rod.. find a suitable user exit / screen exit and try to use the authorization check as per my previous posts.. based on the authorization try if you can call that subscreen or loop at screen and hide the screen fields..

Read only

0 Likes
1,184

I appreciate the assistance with the authorization checking but more specifically I would like to know how to make one tab appear in display-only mode while keeping the other tabs in edit mode and also how to hide tabs. I would need to do this programmatically based on the user's authorization.

Thanks!

Read only

0 Likes
1,184

Hi,

if you can able to find an exit may be you can code like the following

if you can able to find any business addins of userexit in PBO of the screen (in which you want to disable the fields) you can code in the following way.


    authority-check object 'YAUTH'
             id c_ppfcode field ppfcode
             id c_actvt field '02'.
    if sy-subrc ne 0.
      loop at screen.
        if screen-name1 = 'XVBAK-XKLTM'.
          screen-input = c_off.
          modify screen.
        endif.
      endloop.
    endif.
  endif.

But my suggestion will be find any exit before SAVE and get validated there with OLD & NEW values

of the fields in the tab . If users don't have authorisation and values of fields in tab (OLD & NEW)

values are different then give an error message

a®

Read only

0 Likes
1,184

Hi the above code formulated my idea into code and showed you.. code by aRs should work, as far as I know..

or

lets see what Julius found in his Box.. waiting for some thing more exciting..

Read only

0 Likes
1,184

>

> I appreciate the assistance with the authorization checking but more specifically I would like to know how to make one tab appear in display-only mode while keeping the other tabs in edit mode and also how to hide tabs. I would need to do this programmatically based on the user's authorization.

>

> Thanks!

Okay... then you need more granular authority than that which the IMG has to offer globally it seems.

So authority-check will play a role in it, but I assume that you know how to code that already.

We still don't know which ERP release you are on, but I also assume that you have done a trace to see your options are (do not use a SAP_ALL user ID for the trace, because you might not reach all the checks....).

Please try that and then lets take a look.

Cheers,

Julius