cancel
Showing results for 
Search instead for 
Did you mean: 

Table input field.

Former Member
0 Kudos
67

I have to create a table which will take input from user. I have created the context and binded it to the table. At the time of biniding with table i mentioned that these will be input field. But the problem is as the node has no value the table becomes uneditable.I have to give user 5 rows for editing. Can any one tell me the steps of creating this.

<b>If possible please provide the detail step & Sample code.

Points will be rewarded.</b>

Thanks,

Prosun

Accepted Solutions (1)

Accepted Solutions (1)

former_member182190
Active Participant
0 Kudos

Hi Prosun,

If you want five empty rows in the beginning Insert 5 empty lines in an Internal table and bind it to the context. You can see 5 empty rows in ur table.

Also if u want to add an intial line to ur table when you press add button in the toolbar of ur table.

Provide a Add button linked wit action add

In Action :On action add

DATA: lo_new TYPE REF TO if_wd_context_element,

ls_employee TYPE zemployee,

lo_node type ref to if_wd_context_node.

lo_node = wd_context-get_child_node( 'NODENAME' ).

lo_new ?= lo_node->create_element( ).

lo_new->set_static_attributes( ls_employee ).

do_main_node->bind_element( new_item = lo_new

set_initial_elements = abap_false ).

Regards,

Ismail.

Message was edited by:

Ismail Basha

Answers (1)

Answers (1)

Former Member
0 Kudos

You have to bind empty WA to the context.