Code: Alles auswählen.
DATA: tab TYPE REF TO if_wd_context_node,
tab_info TYPE REF TO if_wd_context_node_info,
new_attr_info TYPE wdr_context_attribute_info,
" Tabellenknoten holen
tab = wd_context->get_child_node( wd_this->wdctx_tab_dat ).
" Node Info zu diesem Knoten holen
tab_info = tab->get_node_info( ).
" Neues Attribut braucht einen Namen nach bestimmter Konvention
new_attr_info-name = 'NEWCOL'.
" Neues Attribut erzeugen
CALL METHOD tab_info->add_attribute
EXPORTING
attribute_info = new_attr_info.
TYPES: BEGIN OF ntab_struc,
COL1 TYPE String,
COL2 TYPE String,
NEWCOL TYPE String,
END OF ntab_struc.
DATA: ntab TYPE TABLE OF ntab_struc,
ntab_line TYPE ntab_struc.
ntab_line-COL1 = 'ad'.
ntab_line-COL2 = 'adasd'.
ntab_line-NEWCOL = 'daswq'.
APPEND ntab_line TO ntab.
tab->bind_table( ntab ).
Code: Alles auswählen.
DATA: table TYPE REF TO if_wd_context_node,
tab_info TYPE REF TO if_wd_context_node_info,
new_attr_info TYPE wdr_context_attribute_info,
" Tabellenknoten holen
table = wd_context->get_child_node( wd_this->wdctx_tab_dat ).
" Node Info zu diesem Knoten holen
tab_info = tab->get_node_info( ).