sapdev logo background
sapdev logo sapdev logo
Comments

BIND_TABLE method of interface IF_WD_CONTEXT_NODE




The BIND_TABLE method Binds Table to a context element. If using this ensure that your context element has been declared as a table context by assiging the Cardinality to 0..n or 1..n

The abap code below selects entries from the sap database table scarr and assigns them to the 'CARRIES' context element.

Data: it_scarr type standard table of if_MAIN=>element_CARRIERS, "view name = MAIN, context = CARRIERS
      context_node type ref to if_wd_context_node.

* Retrieve new data
select *
  from scarr
  into table it_scarr
 where CARRID = 'AA' .

* bind this data to the context of the table
  if sy-subrc eq 0.
    context_node = wd_context->get_child_node( name = 'CARRIERS').
*                   CARRIERS' is the name of the context node
    context_node->bind_table( it_scarr ).
  endif.

See all Methods of IF_WD_CONTEXT_NODE interface




comments powered by Disqus