cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table in create_nodeinfo_from_struct

joerg_arndt
Participant
0 Kudos

Hi Friends,

in the methode create_nodeinfo_from_struct is a parameter structer_name.

This parameter is asking for a structure or table.

When I give a table name like spfli or a structure name maintained in SE11, no problem.

But when I create a structure like this.

TYPES: BEGIN OF str_class,

class TYPE class,

atnam TYPE atnam,

END OF str_class.

data t_class TYPE TABLE OF str_class.

data h_class TYPE class.

cl_wd_dynamic_tool=>create_nodeinfo_from_struct( parent_info = rootnode_info

node_name = a_grnam

structure_name = t_class (or h_class)

is_multiple = abap_true ) .

I get the error - invalid value for parameter structure_name "t_class".

Is there a way to use the TYPE above.

Thanks in advance.

Rg. Jimbob

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

As stated this method is only for creating a node from a DDic Structure or Table. If you want a local type, then you have to generate an RTTI object for type. You can then use the RTTI as the source of the node generation using The Node Info Object (if_wd_context_node_info) and the add_new_child_node method.

joerg_arndt
Participant
0 Kudos

Thanks Thomas.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jimbob,

you should use datadictionary structures/tables,

no local types.

Kind regards,

Koen

joerg_arndt
Participant
0 Kudos

Thanks Koen.