Application Development 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: 

Restrict authorization for ztcode

former_member508696
Participant
0 Kudos

Hi All,

can we provide authorization for subscreens in ztcode ??

i have 4 subscreens of diff departments in my ztcode ..

Any idea would be great ....

Regards..

Venki

8 REPLIES 8

jurjen_heeck
Active Contributor
0 Kudos

We're not psyichics in this forums so we have no idea what your ztcode is or does. Better talk to your developers to find out if an which authority-check statements have been implemented. If there are none, use "SHD0" as a search term in the forum and in SAPhelp.

0 Kudos

Hi Venkat ,

Are you talking customized transcations ...(ZTcodes) ?

Please let me know?

Regards

Vikas rana

former_member508696
Participant
0 Kudos

thanks for your quick responses yes customized transactions i developed it ...but i need to restrict some users according to subcreens ...here i have a tab strip control with four tabs on it.

First tell is this possible for standard transactions so that i can use the same logic and create a auth object and do further steps ....

regards...

venki

0 Kudos

Have a look at ABAP statement AUTHORITY-CHECK. That sould give you an idea. Search for those in SAP programs to see their use.

0 Kudos

Hi Venkat,

Yes , This is possible for standard trancations as well as custmoized transcations to restrict some users according to subcreens .

Now , Question arises how to restrict , You need to create View in database level .Once View created, you can associate view with field (here means subscreen)

& hence you can restirct there which user are able to Dispaly / Edit particular field or subscreen.

Here remember Subscreen means Field in Database level ,So i used Field word in place of subscreen.

Hope it answers

Thank you

Vikas rana

Former Member
0 Kudos

Have a look at the following webpage http://www.erpgenie.com/sap-technical/abap/creating-a-subscreen-in-your-abap-program

You could f.ex. insert an authority check based on your own authorization object here as described below:

AT SELECTION-SCREEN.

CASE sy-dynnr.

WHEN 100.

IF sscrfields-ucomm = 'FC01'.

--> AUTHORITY-CHECK OBJECT auth_obj

--> ID id1

--> ID id2.

--> if sy-subrc eq 0.

sub-dynnr = 300.

--> endif.

ELSEIF sscrfields-ucomm = 'FC02'.

sub-dynnr = 200.

ENDIF.

WHEN 200.

IF sscrfields-ucomm = 'FC01'.

sub-dynnr = 100.

ELSEIF sscrfields-ucomm = 'FC02'.

sub-dynnr = 300.

ENDIF.

WHEN 300.

IF sscrfields-ucomm = 'FC01'.

sub-dynnr = 200.

ELSEIF sscrfields-ucomm = 'FC02'.

sub-dynnr = 100.

ENDIF.

ENDCASE.

Best regards,

Anders

former_member508696
Participant
0 Kudos

Please provide me any documents so that it would be helpful ..., Thanks

Regards,

Venki

0 Kudos

Hi Venkat,

Please contact Basis team ,they wil help you for providing documents for this.

Regards

Vikas rana