cancel
Showing results for 
Search instead for 
Did you mean: 

Check Node

Former Member
0 Kudos

Is there any method to check if the Node exists already.... My requirement is to create node dynamically, I want to make sure before creating node 'XYZ'...it does not exist....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

wd_context->get_child_node( name = ''XYZ' ).

you can check if initial or not

Former Member
0 Kudos

Gives me a short dump if the node does not exist...

ChrisPaine
Active Contributor
0 Kudos

you can use:

data: lt_node_map type WDR_CONTEXT_CHILD_MAP.

lt_node_map = lo_element->get_child_nodes( ).

read table lt_node_map transporting no-fields
  with key name = 'XYZ'.

if sy-subrc = 0.

* node already exists

else.

* node does not exist - think about dynamic creation.

endif.

Answers (0)