DATA: lr_root_info TYPE REF TO if_wd_context_node_info ,
lr_structdescr TYPE REF TO cl_abap_structdescr,
lt_components TYPE cl_abap_structdescr=>component_table,
ls_component TYPE cl_abap_structdescr=>component,
lr_type TYPE REF TO cl_abap_datadescr,
" construct lt_components as your need follow below code
lr_type ?= cl_abap_typedescr=>describe_by_name( p_name = 'S_CARR_ID' ).
ls_component-name = 'CARRID'.
ls_component-type = lr_type .
APPEND ls_component TO lt_components.
CALL METHOD cl_abap_structdescr=>create
EXPORTING
p_components = lt_components
RECEIVING
p_result = lr_structdescr.
" if DATA is existent, remove it
TRY.
dyn_node = wd_context->get_child_node( name = 'ND_DATA' ).
IF sy-subrc = 0.
CALL METHOD lr_root_info->remove_child_node
EXPORTING
name = 'ND_DATA'.
ENDIF.
CATCH cx_root.
ENDTRY.
* generate new node with the dynamic structure
CALL METHOD lr_root_info->add_new_child_node
EXPORTING
name = 'ND_DATA'
is_initialize_lead_selection = abap_false
static_element_rtti = lr_structdescr
is_static = abap_false
RECEIVING
child_node_info = lr_node_info.
dyn_node = wd_context->get_child_node( name = 'ND_DATA' ).