cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration of alv table in web dynpro abap

Former Member
0 Kudos

Hi,

I'm using component SALV_WD_TABLE in my component. I have created a configuration for the alv.

I want to hide a column in the alv.

Do you know how to do it using the configuration?

Thanks in advance

Karim

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thomas,

In fact, i think that when user changes the global view and clicks on save button, a copy of the view is created(with the same name) and is then available for all other users. This copy can be delete but not the "standard" global one.

Is this possible?

Now I'm thniking about creating an ehancement for the standard web dynpro component and hide the column using abap code.

Is it a good idea?

Kind regards

Karim

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Thomas,

>

> In fact, i think that when user changes the global view and clicks on save button, a copy of the view is created(with the same name) and is then available for all other users. This copy can be delete but not the "standard" global one.

> Is this possible?

>

> Now I'm thniking about creating an ehancement for the standard web dynpro component and hide the column using abap code.

>

> Is it a good idea?

>

> Kind regards

> Karim

Make sure that your security is setup correctly. End users without administrative rights can not create globa views. When they get the Save View As Dialog, what values do they see for the Assignement field? When I logon without Adminstrative mode, I only see Assignment of User:

http://www.flickr.com/photos/tjung/3406367817/

When I launch the same transaction in Administrative or Configuration mode, the Assignment Option is All and only then do I have the optoin to transport the View:

http://www.flickr.com/photos/tjung/3407176898/

Is it good to modify the standard ALV component? I would say not. First of all the functionality you seek is already in the system. Perhaps you need a support package application if your system has a very old SP level. In genreal changing the ALV component, would be a bad idea because it is very widely used and very generic. It is also quite often changed by SAP.

Former Member
0 Kudos

Thomas,

The security setup is correct only adminitrator has the option : assignment ALL.

The think is that a simple user can change a global view which is reflected to other users.

Anyway, in my previous post I wasn't talking about modifying the standard component alv. I was taking about enhancing the standard component that uses the alv component.

I have created an enhancement method which modify the setting of the alv usage.

I don't see other solution, do you?

Kind regards

Karim

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As reflected in my screen shots and in the online help; users can't effect global views. Here is the line from the online help:

However, these views are only available to the user who created them. Other users cannot see these views. This form of modification of the ALV output is referred to as 'personalization'.

I tested and if the user changes a global view, it saves the changes as a local view. It doesn't change the global view for everyone else. Users without the Administrative mode have no access to create or change global views.

As I said before, perhaps your support package level is very old and you are missing some of the newer functionality.

Former Member
0 Kudos

Hi Thomas,

Thanks for your answer, this helped me. But there is a problem when using the view configuration.

In fact I've created a "Global" view where I have deleted one column of the alv and set the rowCountVisible to 3. The "Global" view appears for different users which is good. The problem is that if a user changes the properties of "Global" view, all other users will see those changes.

Is it normal?

Kind regards

Karim

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Users shouldn't be able to change global views. Global views should only be changable in Administative mode. Otherwise they should only be able to edit their personal views.

Former Member
0 Kudos

Hi Thomas,

I don't want that users configure layout of the alv. I want to do it using the component configuration of component SALV_WD_TABLE.

Is this possible? If yes, how can I hide a column?

Best regards

Karim

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You must use layout configuration. The component is generic and any design time configuration of the ALV component alone would be meaningless. The columns aren't known until runtime.

This is why ALV has a separate layout configuration technique.

The specialized process and options for configuring ALV is all listed in this help document:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/89/9f07ab52734bdbb38ccadf3a014b8c/frameset.htm

Former Member
0 Kudos

Hi Karim,

I hope you are talking about FPM configuration.

Assuming that :

I don't think you can hide any column using the configuration.

As columns depend on the node binded to the ALV.

You will be able to control the number of visible columns only (that to I am not sure).

Please try hiding the column by using the model of the ALV in code.

You can hide the ALV column like this


  DATA lo_cmp_usage            TYPE REF TO if_wd_component_usage.
  DATA lo_interfacecontroller  TYPE REF TO iwci_salv_wd_table .
  DATA lo_nd_rcf_assignments   TYPE REF TO if_wd_context_node.

lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
  IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
  ENDIF.
  lo_interfacecontroller =   wd_this->wd_cpifc_assign_alv( ).
  lo_config_model = lo_interfacecontroller->get_model( ). "get the data model
  lr_column = lo_config_model->if_salv_wd_column_settings~get_column('COLUMN' ).
  lr_column-set_visible(CL_WD_UIELEMENT=>E_VISIBLE-NONE).

I hope it helps.

Request you to put application configuration related queries to FPM forum.

Regards,

Sumit Oberoi

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Configuration of ALV - like reduction of columns is quite possible. You generally do that is at runtime by using the settings dialog and save the results as an ALV View Layout. At the administrative level you can create public layouts and set a particular layout as default.

To Sumit Oberoi - what you posted is quite incorrect. Why would you assume the original poster was talking about FPM? There was no metion of FPM. Not all applicatoin configuration is FPM related nor would it all be related to the FPM Forum. In the future don't suggest to people to post in a different forum unless you understand what you are talking about.

Also the advice that you can't hide columns is totally incorrect as well. You even said that you were sure about the topic. Why post something if you aren't sure?

Former Member
0 Kudos

Hi Thomas,

Apologies for that!

Will take care in future!

Regards,

Sumit Oberoi