ABAP Web dynpro populate table on action / button clickOnce you have added a table to your web dynpro for ABAP application you may need to populate or re-populate when a user performs a certain action like clicking a button. Here are the simple steps required to implement this functionality so that the ABAP web dynpro application updates the table at the appropriate time.
Data: it_scarr type standard table of scarr,
context_node type ref to if_wd_context_node.
* Retrieve new data
select *
from scarr
into table it_scarr
where CARRID = 'AA' .
* Re-bind this data to the context of the table and it should be updated with th ene data
if sy-subrc eq 0.
context_node = wd_context->get_child_node( name = 'CARRIERS').
* Note: CARRIERS' is the name you gave you new node in the context
context_node->bind_table( it_scarr ).
endif.
Step 6 - What the ABAP Web dynpro looks like now When you now execute the ABAP web dynpro you are presented with the following screen, same as before but the button details have been changed. Step 6 - Pressing the button When you click on the button within the web dynpro for ABAP application the table is updated as follows, based on the the code you inserted into the ACTION method. |
||||