cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in selection of layout fields by usersettings when new column added to table

Former Member
0 Kudos

Hello All

I have created and displayed a table (not alv) by webdynpro.

when i right click on the table i have an option user settings-> more, i can see all the fields binded  to the table. From here I can choose required fields to display.. Till this every thing is ok.

But if a add a new column to the same table, and again repeat the same steps (user settings-> more) only newly added column is getting displayed,But as per my understanding all columns should have to appear. so that the user will choose the required fields.How to get all fields? please find the screen shots below for clear understanding.

Accepted Solutions (0)

Answers (2)

Answers (2)

chengalarayulu
Active Contributor
0 Kudos

Hi,

Please delete your Table UI element and then create again..

It may resolve your problem..

amy_king
Active Contributor
0 Kudos

Hi Ramanuja,

How are you adding the new column to the list of available columns? I suspect you are using method if_wd_context_node->bind_table but are leaving parameter set_initial_elements as true. If this is the case, pass set_initial_elements = abap_false.

   node->bind_table(
     new_items            = lt_new_columns
     set_initial_elements = abap_false ).

Cheers,

Amy

Former Member
0 Kudos

Hello Amy,

Thanks for your Help,

Yes I am using method if_wd_context_node->bind_table.

if I say set_initial_elements = abap_false, then also it doesn't work, do we have any other option?

And one more point to note is I am using method if_wd_context_node->bind_table in the button action ONACTIONDISPLAY, But I face this problem even without clicking on this button.

amy_king
Active Contributor
0 Kudos

Hi Ramanuja,

My guess is the standard "user settings" dialog is somehow getting re-initialized when you add the column to the table. I'm not sure how that standard feature behaves under the hood, but what if you tried a different approach instead... Instead of creating a new column in the table at run-time, what if you created all columns at design-time and just set their visibility to "visible" or "none" depending on whether you wanted the column to be shown. Maybe then the "user settings" dialog would detect all columns?

If this approach won't work, I would try debugging the "user settings" dialog to see how it determines the list of table columns.

Cheers,

Amy

Former Member
0 Kudos

Hi Amy,

I am not creating/adding new column at run time.

once I create a table ( say with 3 columns ), then to add new column i will right click on the table and say Insert Table column, see the screen shot below.

Please also let me know where you are trying to debug, so that i will also try debugging.

amy_king
Active Contributor
0 Kudos

Hi Ramanuja,

I understand now-- you're adding the new column at design time. I can't say I've seen this issue before and I wasn't able to get my own tables to show this behavior.

One thing that I might try as an experiment... I notice that the "Long Text" column doesn't appear to be bound to a context attribute (I don't see the text "MAIN.MAKT.xxx" repeated in the table column like I see for the other columns). Maybe that is somehow affecting the User Settings when the new column is added to the table? Perhaps delete or bind that column to see if you get different behavior.

Otherwise, I would consider creating a customer message with SAP. I took a quick look through the SAP notes but didn't see a similar issue reported.

Cheers,

Amy

Former Member
0 Kudos

Hello Amy,

"Long Text" column doesn't appear to be bound to a context attribute (I don't see the text "MAIN.MAKT.xxx" repeated in the table column like I see for the other columns). -> This is because i have created some cell variant inside the column,

I have even tried by deleting this column, But the result is same.

I am not able to get, where the User Settings were getting effected.