cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional table row enabling and disabling

Former Member
0 Kudos

Dear experts,

I am working on a requirement where in I need to enable or disable ( or set to read only or edit ) the table rows ( Items ) based on conditions.

For eg: If there are are two items of the 4 items if the table which satisfy the condition then set the 2 records only to enable dynamically.

Please provide your valuable inputs.

Thanks & regards,

Murthy.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Murthy,

1) Create a context node with required fields in it and also create on more attriute under the same node of type WDY_BOOLEAN.

2) Make sure the Cardinality of the node is 0..N, Selection is 0..1.

3) While creating Binding for table UI Element with the node and it's attributes, select the cell editor as inputfield for all the fields.

4) Then go to each cell editor and bind the "readOnly" property to the attribute(type WDY_BOOLEAN) which was created in the

first step.

5)And regarding which particular rows should enable and disable, it depends on your condition. In wddoinit() method check your condition and if it satifies then set the value 'X' to readOnly attribute.

6) Update your internal table and finally bind to the table node. like lo_node->bind_table( new_items = ITAB ).

Like this you can enable and disable rows in a table..

Regards,

Ravi.D

Former Member
0 Kudos

Hi Ravi,

Thank you for your reply, My requirement is in a standard WDA component, not a custom component.

Regards,

Murthy

Former Member
0 Kudos

hi,

u can use the Enhancement Framework for the standard WD ABAP components.

regards,

amit

Former Member
0 Kudos

Hello all,

Thank you for your inputs.

We cannot assign the created nodes or attributes to the UI elements of the standard WDA component . It can only be done only at runtime programatically. Which includes creation of attributes and binding it to the existing UI elements.

The solution posted in the below thread was also of great help for me meet my requirement.

Thanks & Regards,

Murthy.

Answers (0)