cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting Empty Row into Web Dynpro Table

Former Member
0 Kudos

How do insert a empty row into your Web Dynpro Table?

Moderator Message: Before posting a question in the forum please do a search as this subjet has been covered many times in the past. Thread locked.

Edited by: Neil Gardiner on Oct 8, 2010 12:28 PM

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

by adding an empty element to to context that is bound to the table.

Former Member
0 Kudos

Can you send me the code to make this happen? I want to add empty rows to a table that already has existing records.

Thanks

ChrisPaine
Active Contributor
0 Kudos

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.

Answers (0)