Hi Amit,
There are many threads available on SCN similar to your requirement.
To add an empty row initially, you need write logic in WDDOINIT( ) method of VIEW i.e
Sample:
DATA lt_material TYPE wd_this->Elements_material.
DATA lo_nd_material TYPE REF TO if_wd_context_node.
lo_nd_material = wd_context->get_child_node( name = wd_this->wdctx_material ).
append initial line to lt_material.
lo_nd_material->bind_table( new_items = lt_material
set_initial_elements = abap_true ).
Please refer the below document for add row & delete row functionality.
How to make table cells as editable / non-editable dynamically in Web Dynpro ABAP
Hope this helps you.
Regards,
Rama