Read ABAP Web dynpro table context on action / button click
Once you have added a table to your web dynpro for ABAP application you may need to read this table and get the data as it is presented to the user, especially if this an ALV table which allows the user
to change values or add and delete new rows. Here are the simple steps required to implement this functionality so that you can retrieve this table data.
* create local data variable to access context information
Data: context_node type ref to if_wd_context_node.
Data: it_scarr type STANDARD TABLE OF if_view1=>element_CARRIERS,
wa_scarr like line of it_scarr.
DATA: index type i.
context_node = wd_context->get_child_node( name = 'CARRIERS').
refresh: it_scarr.
* Get data contained within ABAP web dynpro table
context_node->get_static_attributes_table(
importing
table = it_scarr ).
* Get data contained in a Specific row of an ABAP web dynpro table
index = 3. "Get row 3
context_node->GET_STATIC_ATTRIBUTES(
exporting index = index
importing STATIC_ATTRIBUTES = wa_scarr ).
Website Navigation to related information
|
||||||||||