cancel
Showing results for 
Search instead for 
Did you mean: 

Last row not editable

Former Member
0 Kudos

Hi all,

I need to make not editable (READ-ONLY) the last row of my table. Instead, precedents rows are editable.

How can I do?

Tks in advance...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

1. Make an Attribute of type wdy_boolean in the node binded to table.

2. bind it with the all the column' cell editor' enabled property.

3. Now before bindting the table with the contents , get the last row's position.

4. Set the attribute to abap_true.

Sample code :

data lv type I.

DESCRIBE TABLE itab LINES lv.

READ TABLE itab into wa INDEX lv.

wa-ca_read = ' '.

modify itab from wa INDEX lv.

Now bind the internal table itab with the node using :

lo_node->bind_table( itab ) . here lo_node is reference to the node binded to Table.

Edited by: Saurav Mago on Oct 15, 2009 10:45 AM

prasenjit_sharma
Active Contributor
0 Kudos

Hi

You'd need to create an attribute read_only in the context node and bind it to the read-only property of the fields.Then at run time, set the read-only property for the last row and for others keep it blank.

Regards

Prasenjit