cancel
Showing results for 
Search instead for 
Did you mean: 

Disabled checkbox in first row and enabled for remaining rows in a column

Former Member
0 Kudos

Hello Gurus,

I have been frying my brain to make it work but didnot succeed. So thought of seeking help as there is no option for me.

I have used SET_ATTRIBUTE_PROPS_FOR_ELEM, SET_ATTRIBUTE_PROPERTY on the corresponding first row's element reference retreived using GET_ELEMENT( SY_TABIX ) to make it readonly.

I tried SET_ATTRIBUTE_PROPS_FOR_ELEM, SET_ATTRIBUTE_PROPERTY on node reference passing index of the row.

I have kept the above code WDDOMODIFYVIEW but no luck. I still get the checkbox for that row editable. Am i doing anything wrong?

Please guide, Any help is appreciated!!!

Thanks in advance!!!

Pavan.

Edited by: Pavankumar Adiraju on Feb 9, 2012 12:35 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi Pavan,

After changing the column of table to check box, create one attribute in context of type WDY_BOOLEAN, now bind the read only property of the checkbox to the created attribute.

In your WDDOINIT or any action handler in which you want to perform your requirement, read the table data using

get_static_attributes_table method of node,

Now loop your internal table and if index = 1 set the read only to true else false.

loop at lt_tab to ls_tab.

if sy-index = 1.

lo_el_context->set_attribute(

Attribute_name = 'CHECK' " here check is the attribute name created in context of type wdy_boolean

VALUE = 'X' ).

else .

lo_el_context->set_attribute(

Attribute_name = 'CHECK'

VALUE = ' ' ).

endif.

endloop.

Hope this helps u,

Thanks & Regards,

Kiran.

Answers (0)