cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding ALV configuration issues

Former Member
0 Kudos

Hi All,

Programmatically, i have some columns hidden.

For some users its working fine...for others its not.

This is a config issue. How can I resolve them so that the configuration happens as per my code.

I havenot given any options for these settings to the user.

I have 20 columns out of which 5columns visbility is set based on some conditions.

Earlier this was all working fine, Now we are moving into production and encountering these issues now.

If I have the USERSETTINGS option also, it doesnot act as per my coding..How to rectify these issues.

I want my application to be run as per my coding....not using these settings.

My system details -

EHP 4 for SAP ERP 6.0 /7.0

SAPK-70001INWEBCUIF

Thomas: Please let me know what needs to be done.

Appreciate your earliest replies.

Regards,

Lekha.

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Users have the ability to customize the ALV layout and change what the visible columns are. I'm not sure I understand exactly what you want to do. Do you want to disable their ability to create layouts? Are there just certain columns you don't want in the ALV at all - if so you should use a Data Dictionary structure for your context node that doesn't include these columns. Pheraps you need to provide more details.

Former Member
0 Kudos

Hi Thomas,

Based on some condition, I'm hiding the columns of the ALV. Now for some of the columns, my coding is getting bypassed and the columns are shown to the user. for some others, it is not shown.

There is no issue with the code but I wanted to display these columns as per my coding.

User is not allowed to chnage these column settings. I have disabled these features of the ALV also the

USERSETTINGS(Context Menu) is disabled.

Even there is a problem with the layout. I have 5 static columns anf 5 scrollable ones.

Now for some users, this static columns are getting disppalyed as part of scrollable ones.

The layout is also changed here

What should I do.

Regards,

Lekha.

Former Member
0 Kudos

Hi,

Please let me know how to go about it.

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>User is not allowed to chnage these column settings. I have disabled these features of the ALV also the

USERSETTINGS(Context Menu) is disabled.

You are saying that you have disabled all the options for customizing the layout, then I guess I'm not sure how the users are then getting different layouts. I don't think there is enough information here to say how they are doing this.

Former Member
0 Kudos

Hi Thomas,

If I keep the layout issue aside, how to overcome the column settings.

I mean how can I rectify these column settings. why my code is getting bypassed . I want this code to be applicable to all users.

Hence I disabled all possible user settings options. But for some users, the columns that I have disabled through coding are getting

displayed. I guess this is config issue. I tried to have the USERSETTINGS and included those columns. But these are the solutions

for temporary basis. I want some solution......for these configuration issues....

I tested the WD_GLOBAL_SETTINGS component for usersettings and but only for that Instance I can have those settings.

If my inputs are changed these have no effect.

Do you want my code to be pasted here....

What do I need to do. If you require more information please let me know.

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

> I want this code to be applicable to all users.

Hence I disabled all possible user settings options. But for some users, the columns that I have disabled through coding are getting

displayed. I guess this is config issue.

I guess I'm not sure what to tell you. Configuration is supposed to override your coding. That is the point of configuration. You say you have locked down all options for configuration, yet it appears that some users can still perform configuration.

Is it possible that there were old layouts out there from before you removed the option to create layouts?

Former Member
0 Kudos

Hi Thomas,

Earlier I have enabled USERSETTING then later developements I have disabled that.

I have not given any option for these settings to the user.

Everything is done through coding.

I'm not able to find the reason for these issues. Because using the code i have hidden the columns based on conditions

and fixed some columns as static.These should be applicable for all users right.

I have no component configuration.

If you can see my code--- for column settings ....I pasted only a part of code --

WHEN wd_assist->gc_sno.
          CALL METHOD wd_this->gref_column->set_position
            EXPORTING
              value = 1.
          CALL METHOD wd_this->gref_column->set_fixed_position
            EXPORTING
              value = cl_wd_abstr_table_column=>e_fixed_position-left.
          CALL METHOD wd_this->gref_column->set_width
            EXPORTING
              value = '15'.    
        WHEN wd_assist->gc_app_tm_efforts.
          CALL METHOD wd_this->gref_column->set_width
            EXPORTING
              value = '20'.
          CALL METHOD wd_this->gref_column->get_header
            RECEIVING
              value = wd_this->gref_alv_colheader.
          wd_this->gref_alv_colheader->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_medium ).
          wd_this->gref_alv_colheader->set_header_text_wrapping( abap_true ).
          wd_this->gref_column->set_resizable( abap_true ).

IF wd_this->gv_manager EQ wd_assist->gc_tm_val
               AND wd_this->gv_view_type EQ wd_assist->gc_cn.

            CREATE OBJECT lr_input
              EXPORTING
                value_fieldname = lv_id.

            CALL METHOD wd_this->gref_column->set_cell_editor
              EXPORTING
                value = lr_input.

            CALL METHOD lr_input->set_state
              EXPORTING
                value = cl_wd_abstract_input_field=>e_state-required.
          ELSEIF wd_this->gv_manager EQ wd_assist->gc_pm_val AND
                ( wd_this->gv_status EQ '01' OR wd_this->gv_status EQ space ).
            CALL METHOD wd_this->gref_column->set_visible
              EXPORTING
                value = cl_wd_uielement=>e_visible-none.
          ENDIF.                         "If wd_this->gv_manager EQ wd_assist->GC_TM_val.

Youcan see that some columns are fixed, some are shown based on some condition.

I checked in debugging, the code is fine...But these issues are coming up that needs to be resolved before we move tp production.

Thanks Much for your support.

Regards,

Lekha.

Regards,

Lekha.

Edited by: Lekha on Oct 7, 2009 5:49 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Because using the code i have hidden the columns based on conditions and fixed some columns as static.These should be applicable for all users right.

Unless they have configuration that overrides your coding. If you used to allow user settings, these users may have created new default layouts or created personalized settings for your table. The personalization overrides your coding.

Former Member
0 Kudos

Hi Thomas,

For a given user, how can we check personlization settings are made. If they are so, then how to handle/delete them.

Is this the same with the columns also.

Thanks Much.

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Use the Web Dynpro ABAP Application wd_analyze_config_user. In addition to being able to view the personalizations, you can also delete them from this tool.

Former Member
0 Kudos

Hi,

We have to login into SAP through that user and test this application. Is that So.

Yes, I ran that application, If I delete the configuration Id then will there be any other effects.

Once deleted Can I restore it back...

Edited by: Lekha on Oct 7, 2009 7:30 PM

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>If I delete the configuration Id then will there be any other effects.

All of the users configuration for this component will be lost - meaning hidden fields or default values as well.

>Once deleted Can I restore it back...

No.

Former Member
0 Kudos

Hi Thomas,

I deleted the configurations as per the above application, but there is no effect.

There is no change is the layout and some columns are still visible.which should not happen as per coding.

Thanks Much.

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Did you delete the personalaiztion for your your component or for SALV_WD_TABLE. They are stored separately.

Former Member
0 Kudos

Hi,

When I ran the above application, I deleted the configuration for that user. and I tested my application.

The layout is same as earlier. There is no effect on the column settings.

What could be the issue.

How can we find the personalization settings for ALV only.....

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>How can we find the personalization settings for ALV only.....

Put in the user id only in the search criteria of wd_analyze_config_user. Don't supply a component or configuration name in the search. You will then see all their personalization.

If all personalization is gone and there is no admin/application/component configuration, then your code should be the only thing effecting the layout.

Former Member
0 Kudos

Hi Thomas,

I will test it as per your suggestions and revert back if any issues.

Thanks Much for your support.

Regards,

Lekha.

Former Member
0 Kudos

Hi Thomas,

I tested the application by deleteing all the personalizations as per the above WD Appl.(config analyzer).

But the layout remained same.

One question -

When I enabled the USER SETTINGS there is no option to change the scrollable columns to static ones. Cannot we change the scrollable columns to fixed ones.

Another question, In the ALV, out of 10 columns 5 are fixed others are non-scrollable ones.

Is it mandatory to set the position of the columns As per the coding i have hidden some columns right but the positions are not

set. Does this column hiding through coding will affect the column poisiton. Is this causing any problem.

Let me explain my results after clearing the config analyzer.

In the DEV system, for some users my code is working fine. I have not made any changes to code.

But in PROD system, there is a problem. For some users(2 users) the layout is changed.

I have working days, PM, TM effiorts columns out of 10 columns. These columns viisibility is set

as per some conditions. I checked in debugigng everything is working fine but on display this coding effect is not there.

Now the wokring days column is not shown at all. the other 2 columns are shown but theier radonly property is set(actually onout of these 2 (PM/TM) only one thing needs to be shown based on the user login.

But in DEV, this is working fine to some extent.

These config issues are piling up day by day....earlier these issues were not there.

What needs to be done Thomas.

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

If all the configuration/personalization is deleted, then it doesn't make sense why you would have different experience for different users.

>In the DEV system, for some users my code is working fine

Some, but not all?

>Is it mandatory to set the position of the columns As per the coding i have hidden some columns right but the positions are not

set. Does this column hiding through coding will affect the column poisiton. Is this causing any problem.

I don't really see why it would.

>When I enabled the USER SETTINGS there is no option to change the scrollable columns to static ones. Cannot we change the scrollable columns to fixed ones.

Yes there is no runtime option for tihs. The locked columns show up in a different color in the Column Selection of the Settings, but this option is not configurable there. Fixed columns also can not have their order changed within Settings.

Former Member
0 Kudos

Hi,

10 i have 5 as fixed right

When I fixed these columns through coding, then why for 2 endusers these 5 columns are not as fixed. only 3 are shown as fixed.

One more doubt....

In my earlier developments there were only 3 columns as fixed. later user requested for 5 columns. We moved the request to quality also. But the issue is these 2 users are getting different layout.

Now, the worst testcases are coming up. Now, for some users some columns are hidden or others they are shown.

i didnot make any code changes.

Shal I copy the component and test it again....What shal I do...

What do you suggest.

Thanks for the support.

Regards,

Lekha.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Copying the component might be a very good idea. If there are any admin/personal configurations left out there, copying the component would break any tie to them. At least that will eliminate one factor.

Former Member
0 Kudos

Ok..Thomas.....I will give it a try.....

Former Member
0 Kudos

Hi Thomas,

I have just created one more application for that component and all the issues are resolved.

Thanks for your support.

Former Member
0 Kudos

How do you disable the USER SETTINGS option so that end-users cannot hide columns for instance?

Former Member
0 Kudos

There is an option in WD application parameters WDUSERPERSONLIZATION as X...then you can disable that USERSETTING option...