cancel
Showing results for 
Search instead for 
Did you mean: 

Disable field in a table dynamically

Former Member
0 Kudos

Hi all,

I need to disable a column in my table depending on the value of another column. I need to do it row by row.

in the following link show how to do it for simple field and i don't know how to apply to a table.

[Simple application to change properties of UI Elements during runtime in Web Dynpro ABAP |http://wiki.sdn.sap.com/wiki/display/WDABAP/SimpleapplicationtochangepropertiesofUIElementsduringruntimeinWebDynpro+ABAP]

Any ideas?

Thanks in advance.

EDIT: I found this other link but can not get me work well:

[Properties of Context Attributes|http://help.sap.com/SAPhelp_nw70/helpdata/en/45/d44e0cdff073b1e10000000a11466f/content.htm]

Edited by: Husalban RM on Sep 9, 2010 6:19 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Husalban,

Let's say you have 3 fields: f1, f2, f3 and f3 is disable based on value of f2.

Now you need to create another field call f3_disable, before binding to the context node,loop the table and update f3_disable based on f2 value.

Whenever the f2 change, you need to repopulate the f3_disable also.

Bind the field f3_disable to the enable property of column editor.

Thanks,

Duy

Former Member
0 Kudos

Thanks for your answer, but this disable the column for all the rows... i need to do it row by row...

Former Member
0 Kudos

Hi Husalban,

If you want it row by row, just bind it to the readonly attribute of the input field inside table column.

Thanks,

Duy

Former Member
0 Kudos

I think before I misunderstood your answer. Your solution is useful for me.

Another question;

Is it necessary to do always a loop to my table? Or somehow I can read the line that is being modified?

I have a checkbox field and I put an action OnEnter event.

when I change that field my event is triggered but I do not know how I can read the line that I modified.

If I make a get_static_attributes this sentence returns to me the selected line not the modified line.

Answers (1)

Answers (1)

Former Member
0 Kudos

I finally made a loop.