For example with a node called "Details" which is bound to your table. A new line is added at the top of the table.
data: lo_nd_details type ref to if_wd_context_node,
ls_details type wd_this->element_details,
lo_new_element type ref to if_wd_context_element.
lo_nd_details = wd_context->get_child_node( name = wd_this->wdctx_details ).
* append a line to the node
lo_new_element = lo_nd_details->bind_structure( new_item = ls_details
set_initial_elements = abap_false
index = 1 ).
I would strongly suggest that you read/view some of the excellent eLearnings that Thomas Jung has put out - they give a good introduction into basic WDA coding such as the above.
You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
Add a comment