cancel
Showing results for 
Search instead for 
Did you mean: 

Restrinct ALV column movement

Former Member
0 Kudos

Hello,

The ALV allows the user to change the order of the columns in the ALV component. I would like to restrict this feature, and set a predetermined order for columns which can't be altered by the user. How can I do this?

Regards,

smih

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

To be more explicit about the question: I would like to disable the ALV's column drag and drop feature that changes the columns order. Any ideas?

Lukas_Weigelt
Active Contributor
0 Kudos

Take a look at class CL_SALV_WD_CONFIG_TABLE. You can change and restrict pretty much everything there. Take a look whether disabling drag and drop is possible too.

Cheers, Lukas

Former Member
0 Kudos

There is no function to disable drag and drop in CL_SALV_WD_CONFIG_TABLE.

Edited by: smih on Sep 26, 2011 7:52 AM

ChandraMahajan
Active Contributor
0 Kudos

Hi,

I guess ALV column drag and drop is enabled in Ehp4 with the light speed rendering concepts etc..I think if you maintain

parameter WDLIGHTSPEED = SPACE at application level then user cannot able to drag and drop the ALV columns. Try doing like this. this is not the proper way but you can restrict the feature at application level.

Thanks,

Chandra

Former Member
0 Kudos

Hi Chandra,

Thank you for the idea. I tried it and it works. The column movement is restricted, however this is done at the entire application level, so my other ALV's are also restricted, and I would like to apply this only to a single ALV. Then the ALV's with the old rendering technology look a bit different that those with light speed enabled. I will award two forum points because it gives me something to show to my customers, however I don't expect them to be happy with this solution. Thank you, Chandra!

The excerpt from[ here|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/7b/fb57412df8091de10000000a155106/content.htm] is:

WDLIGHTSPEED

Activates the new rendering technologie (activated by default in EhP1).

The new rendering technology can be activated and deactivated per client, per application or in the URL. A distinction is made between the parameter being there with an empty value (classical rendering is used) and the parameter not being there (the default value is used).

Name of the URL parameter sap-wd-lightspeed

Is there a way I can restrict the column movement for a single ALV inside the application?

Thank you again Chandra!

KR,

Mihai

matt
Active Contributor
0 Kudos

I see your client as having three choices -

1) Use slightspeed

2) Pay you to write a bespoke component that gives the functionality desired

3) Decide that this absolute business requirement isn't actually so critical

A fourth possibility would be to see if you can enhance the relevant classes in such a way that column reordering is not possible.

matt

Edited by: Matt on Sep 27, 2011 8:19 AM - fixed typo

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Hi,

>

> I guess ALV column drag and drop is enabled in Ehp4 with the light speed rendering concepts etc..I think if you maintain

> parameter WDLIGHTSPEED = SPACE at application level then user cannot able to drag and drop the ALV columns. Try doing like this. this is not the proper way but you can restrict the feature at application level.

>

> Thanks,

> Chandra

You really shouldn't disable Lightspeed rendering. This has a tremendous impact on rendering performance as well as turning off many new features and UI elements. The option to deactivate Lightspeed is really only there for debugging purposes, but should never be used long term as a solution for such a situation.

ChandraMahajan
Active Contributor
0 Kudos

Hi Thomas,

I totally agree with you. light speed rendering is one of the best feature and users should not disable it. hence I also mentioned in my reply that it is not the proper way but just the workaround.

Thanks,

Chandra

Former Member
0 Kudos

Hi Matt,

What do you mean by bespoke component?

Mihai

matt
Active Contributor
0 Kudos

I was thinking that perhaps the column switching functionality was build into the ALV component. You could then have created your own ALV component and removed that functionlity. But the functionality is built in to the table element.

Now, elements are of course implemented using classes, so maybe you could create your own table element that has the required restricted functionality. Alternatively, you could create an Adobe flex component that implements your desired functionality, that you embed in an island.

matt

ChandraMahajan
Active Contributor
0 Kudos

Hi,

can u check Note 1598849 - WDA: Width of table columns.

Not sue if this will help but there is some mention of Web Dynpro ALV with the property 'fixedTableLayout' = true.

Thanks,

Chandra