获取子节点
DATA: lr_node TYPE REF TO if_wd_context_node,
lr_subnode TYPE REF TO if_wd_context_node.
DATA: lv_street TYPE string,
lv_number TYPE y_char,
lv_city TYPE string.
lr_subnode = lr_node->get_child_node( 'ADDRESS' ).
lr_subnode->get_attribute( EXPORTING name = 'STREET'
IMPORTING value = lv_street ).
lr_subnode->get_attribute( EXPORTING name = 'NUMBER'
IMPORTING value = lv_number ).
lr_subnode->get_attribute( EXPORTING name = 'CITY'
IMPORTING value = lv_city ).
绑定子节点
DATA: lr_node TYPE REF TO if_wd_context_node,
lr_subnode TYPE REF TO if_wd_context_node,
ls_subnode TYPE if_view_name=>element_address.
lr_node = wd_context->get_child_node( 'FACULTY' ).
lr_subnode = lr_node->get_child_node( 'ADDRESS' ).
ls_subnode-street = 'Pforzheimer'.
ls_subnode-number = '106A'.
ls_subnode-city = 'Pforzheim'.
lr_subnode->set_static_attributes( ls_subnode ).