cancel
Showing results for 
Search instead for 
Did you mean: 

Table control add row

Former Member
0 Kudos

Hello all,

I have created a table control with two columns both as input fields.

All i want is a simple functionality that while a button "add row" is pressed an empty row is added, which is achieved by the following piece of code:

lo_node_items = wd_context->get_child_node(

name = wd_this->wdctx_descriptions ).

data: itab type standard table of struct_geo,

wa_itab like line of itab.

CALL METHOD LO_NODE_ITEMS->GET_STATIC_ATTRIBUTES_TABLE

IMPORTING

TABLE = itab.

wa_itab-language_iso = space.

wa_itab-description = space.

append wa_itab to itab.

CALL METHOD LO_NODE_ITEMS->BIND_TABLE

EXPORTING

NEW_ITEMS = itab.

So this creates an empty row but now the entire table is locked and is displayed as read only. How do I see these empty rows in an editable mode ???

P.S : i have checked the displayemptyrow and enabled property as TRUE.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi abhishek.....

try creating an empty record when the new row is added.

(ie) whenever a row is added pass empty values to that row so that it becomes editable.

---regards,

alex b justin

Former Member
0 Kudos

Hi,

you can add an attribute to your node, eq read_only and bind the attribute to

the read_only parameter of each inputfield in the table.

in your coding, you should do the get_static_attrbutes_table thing,

loop over it and set that value on abap_true,

append the new line with read_only as abap_false and bind the entire thing again

this way only your new line will be editable, the others read only

grtz,

Koen