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: 

How to Block ALV Layout 'Default' from change

Former Member
0 Kudos

We have standard SAP ALV report. When users execute this report and try to save their layout sometimes they save as default. This changes default layout for other users causing support issues. Is there a way I can lock the Default layout settings so no body can change it?

Thanks in advance.

Jitendra

6 REPLIES 6

Former Member
0 Kudos

what are you allowing for display variants? 'U'-only user-defined variants can be saved? Wouldn't 'default' switch just apply to the user in this case? Check your i_default parameter (for method set_table_for_first_display) also....that determines whether or not users can set a default.

Former Member
0 Kudos

Hi ,

I hope this helps u.

You can use the I_DEFAULT parameter of instance method set_table_for_first_display of cl_gui_alv_grid to solve your problem.

IF u set the value of I_DEFAULT = SPACE. then no user will be allowed to save his/her layout as the default.

It will kind off lock the default layout.

rohit.

Former Member
0 Kudos

Which is the standard report your running. Pls share the same or what can do is check in the config portion and allow the report to save varriants which are user specific so that when other users run the report they are not seeing the report in a particular format but in the default manner as it should be in.

DavidLY
Advisor
Advisor
0 Kudos

Hello,

The ability to save default layouts are limited by the parameter

i_default at the interface to the ALV.

This auhtorization can only be activated or inactivated.

For your requirements, it seems to be useful to maintain authorization

object S_ALV_LAYO as described in the SAP note 551178, item 4.

Users for whom this authorization object is maintained will be able to

save standard default layouts whereas other users can only save user

specific default layouts.

In some ALV lists, you can only save user-specific layouts. In these

cases, the indicator "user-specific" is active , on a grey background

and unable to be changed. This is related to the parameter I_SAVE. This

controls which options you have to save the layout.

To be able to define default layouts, the parameter I_DEFAULT must have

the value 'X'.

SAP Notes 409190 and 601803 also provide further information on

authorizations.

Hope this helps.

Regards,

David

Former Member
0 Kudos

I have the same situation, I tried removing the Activity 23 for S_ALV_LAYO auth object, but it disabled/ grayed out the user specific check box and not the default check box. Do you know what is being missed here?

Former Member
0 Kudos

Hello,

please have a look at OSS Note 1667238 - Introduction of authorization
object S_ALV_LAYR
:

Auth Object: S_ALV_LAYR

Permitted Activities:  23 (Maintain)

Package: SLIS

Documentation:

             

Definition

You use this authorization object to protect global default layouts of the ABAP List Viewer (ALV) report-specifically.

Regards,

Antonio