‎2009 Jun 09 11:49 AM
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.
‎2009 Jun 09 11:51 AM
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...
‎2009 Jun 09 11:52 AM
‎2009 Jun 09 11:52 AM
Hi,
I think in at selection-screen output , using sy-uname u can manage the selection screen parameters by loop at screen.
Rgds.,
subash
‎2009 Jun 09 11:53 AM
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.
‎2009 Jun 09 11:56 AM
you can achieve it by using authority-check function module..
please go through the link for creating authorization.
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
‎2009 Jun 09 12:02 PM
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)
‎2010 Jun 09 6:57 AM