cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with enhancing standard WD ALV

Former Member
0 Kudos

I am enhancing a standard WD Component via Enhancement Implementation.

Standard ALV is bound to a node in the WD Component. I added 2 attributes in that node.

I added 2 new editable columns in the ALV - 1 dropdown and other Checkbox for the new attributes.

I have 2 issues:

1. When I try to set the data to the node, data gets displayed correctly in the ALV. But when I select something in the dropdown, that updated value is not reflected in the node.

2. Also these 2 newly added attributes do not show up in the node in the ALV's controller usage screen for binding.

What should I do here?

Any help is deeply appreciated.

Regards,

Shweta

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Shweta,

Try to map the same in enhancement mode.

Thanks

KH

Former Member
0 Kudos

Hi KH,

Doesn't show an option to enhance controller usage.

Besides the new attributes do not even show up in the node in ALV's controller usage.

Do I have to delete the existing one and define a new one?

And I will have to modify the standard object since enhancing that is not possible?

Regards,

Shweta

ramakrishnappa
Active Contributor
0 Kudos

Hi Shweta,

The context mapping cannot be done using enhancement.Hence you are not able to see the enhanced attributes while context mapping.

Instead, need to set data through program.

Please find my answer in the below thread.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Thanks for your reply.

I tried using this method to set the new node as well.

How the ALV looks before this code:

But this just refreshes all the ALV configurations and the vaue in the new columns are still not updated in the context node.

After:

Could you help me in telling which method should I write this code in?

I am actually trying to enhance a standard WD comp and I needed to add 2 new editable columns in the ALV.

The columns get shown perfectly fine. The problem now is that when I select some value in the dropdown, it is not updated in the context node. So I am unable to read it.

Regards,

Shweta

ramakrishnappa
Active Contributor
0 Kudos

Hi Shwetha,

You need to use SET_DATA method in post-exit of WDDONIT method of  view. Read the node reference and pass it to the method.

To get the updated value into context node, proceed as below

  • Go to methods tab of view and create an event handler method for ON_CELL_ACTION of alv component interface
  • Use the method REFRESH of alv model as below

          wd_this->wd_cpifc_alv_table( )->refresh( ).


Here refresh( ) forces the alv update

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

I did exactly what you said.

Used SET_DATA method in post-exit of WDDONIT method of  view. Read the node reference and passed it to the method.

Also in the event handled ON_CELL_ACTION I used the refresh method.

But it seemed to bring no change in the behaviour.

On selecting a value in the dropdown, it is still not reflected in the context node so I can't read it from there.

But if I try to set a value, it is shown perfectly in that column.

What could be the issue?

Some background of the steps:

The attribute which I used for binding the dropdown column of the ALV is of type domain having fixed values which show correctly in the dropdown.

I need to select one of those values, read it from the node and save it in the DB.

But the value is not reflected in the node.

Any help is deeply appreciated.

Thanks,

Shweta

ramakrishnappa
Active Contributor
0 Kudos

Hi Shweta,

Is the event handler method of on_cell_action getting triggered upon selection of a value from drop down list?

Regards,

Rama