cancel
Showing results for 
Search instead for 
Did you mean: 

Disable one colum of a table in webdynpro

mahesh_jagnani
Participant
0 Kudos

Hi Expert,

I have a requirement like this:-

Currently :-

One table has two column and it is displaying on screen.There is a ADD Button above that table. and the table has 2 rows with data.

Need:-

The first column should be disable with the 2 records only.As the user click on ADD Button the third is inserting but for this third row the first column should be enable.

How can i do that , because we can set disable property at column level and not on the number of record level.

please help.

Thanks

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI mahesh ,

make attribute with type wdy_boolean and bind it to the read only attribute of the field.

Now loop to itab into is .

readonly true or false as per ur req

endloop.

This will enable you to bind only the specific rows that you want.

It worked for me.

Regards

Kuldeep

Answers (3)

Answers (3)

mahesh_jagnani
Participant
0 Kudos

THANKS

Former Member
0 Kudos

Hi,

Create table with first two records as read only.. use WDY_BOOLEAN attribute and bind it to read only of table coumns.

for example ENABLE type WDY_BOOLEAN.

When click on add button you want to add one row with enable fields right???

check this code to insert a row..

lo_nd_segment1->get_Static_attributes( importing static_attributes = ls_segment1 ).

*clear lo_el_test.

lo_el_segment1 = lo_nd_segment1->create_element( ).

lo_nd_segment1->bind_element( new_item = lo_el_segment1

set_initial_elements = abap_false ).

and set_attribute( value ENABLE = ABAP_TRUE ).

Cheers,

Kris.

former_member389677
Active Participant
0 Kudos

Hi,

Create One more attribute in the table context with type WDY_BOOLEAN. bind this new attribute to the corresponding enabled property.

Regards

Shaira