cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic creation and mapping of context node n Attributes.

senthil_kumar29
Participant
0 Kudos

Hi,

Is it possible - Dynamic creation and mapping of context node n Attributes in WebDynpro-ABAP.

If it is, Could U please provide some sample code.

Cheers,

Sam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

have a look at this, will explain a lot: <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/af/cb744176cb127de10000000a155106/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/af/cb744176cb127de10000000a155106/frameset.htm</a>

grtz

Koen

Answers (3)

Answers (3)

senthil_kumar29
Participant
0 Kudos

Thanx friends.

Cheers,

Sam

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Sam,

data rootnode_info TYPE REF TO if_wd_context_node_info.

rootnode_info = wd_context->get_node_info( ).

cl_wd_dynamic_tool=>create_nodeinfo_from_struct(

parent_info = rootnode_info

node_name = '<nodename>'

structure_name = '<structure name>'

is_multiple = abap_true ).

Regards

Abhimanyu L

Former Member
0 Kudos

Hi Sam.

Yes it is possible via the node info. Use the node info

from root context if you want to create the new node

directly under the root. Just pass the name of the node

and the name of the structure the node should have. Then

use the class cl_wd_dynamic_tool to create the new node.


lr_rootnode_info = wd_context->get_node_info( ).

    lr_resultnode = cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = lr_rootnode_info
      node_name = lv_nodename
      structure_name = lv_nodename
      is_multiple = abap_true ).

   

Hope thsi helps.

Cheers,

Sascha

Message was edited by:

Sascha Dingeldey