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

Display Fields Userwise (w/o Hardcode)

Former Member
0 Likes
898

Dear Experts,

Is it possible to restrict field display in ALV reports for particular users? I don't want to hard code user name.

Thank you in advance.

Denish Patel.

7 REPLIES 7
Read only

Former Member
0 Likes
853

Hi,

You can go for authorization checks for them...

First cretae the authorization in the transaction 'SU21'.

And then use those authorization object in your program...

Read only

0 Likes
853

u can create ur fcat as per the users....

Read only

Former Member
0 Likes
853

Hi,

I think in at selection-screen output , using sy-uname u can manage the selection screen parameters by loop at screen.

Rgds.,

subash

Read only

SimoneMilesi
Active Contributor
0 Likes
853

Hi Denish,

You can create a SET (or more if you need a major detail) with transaction GS01 that contains all the users with the restriction you need.

In your program, read the set with the FM 'G_SET_FETCH' and if the SY-UNAME is in the table returned by FM, put the field 'NO_OUT' of fieldcat to 'X' for the fields you don't want to display.

So you can easly add/remove users into the SET with transaction GS02.

Read only

Former Member
0 Likes
853

you can achieve it by using authority-check function module..

please go through the link for creating authorization.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a92195a9-0b01-0010-909c-f330ea4a...

Depending on the sy-subrc returned from authority-check fn module.

change the field catalog as you want.

Edited by: Debashree Patnaik on Jun 9, 2009 12:58 PM

Read only

0 Likes
853

just check sy-unam .... and restrict it as what ever way u want (dont pass the field to field catalog or what ever u need)

Read only

Former Member
0 Likes
853

solved