cancel
Showing results for 
Search instead for 
Did you mean: 

inserting multiple records in to database table using webdynpro abap

Former Member
0 Kudos

Hi all,

I have created a username inputfield,a button and a table

with one coloumn.

If i enter names in the input field then the values should be

displayed in that table.

Even i have got the answer i am not able to insert

the values in to database(ztable) table.

i.e. only one value(1st) was inserted the second value was

not inserted ....

so kindly send me the coding to insert multiple records

into the database table......

by,

ranjith

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Ranjith,

If you want to insert multiple records from the webdynpro view table to database table then try the following code.

DATA lo_nd_tablenode TYPE REF TO if_wd_context_node.

DATA lo_el_tablenode TYPE REF TO if_wd_context_element.

DATA ls_tablenode TYPE wd_this->element_tablenode.

DATA it_tablenode LIKE STANDARD TABLE OF ls_tablenode.

  • navigate from <CONTEXT> to <tablenode> via lead selection

lo_nd_tablenode = wd_context->get_child_node( name = wd_this->wdctx_tablenode ).

  • get element via lead selection

lo_el_tablenode = lo_nd_tablenode->get_element( ).

  • get all declared attributes

lo_nd_tablenode->get_static_attributes_table(

IMPORTING

table = it_tablenode ).

MODIFY databasetablename FROM TABLE it_tablenode.

here it_tablenode is the internal table which holds the value from webdynpro view..

Regards,

Shamila.