on 02-26-2009 5:15 AM
hi experts,
i am creating node dynamically , i have declared variable contextnode_info like
data : contextnode_info TYPE REF TO if_wd_context_node_info.
and when i write this code to get the node info in the varuable.
contextnode_info = wd_context->get_node_info().
i am getting this the sytax error as
" Names like "NAME+" or "NAME()" , as in wd_ontext->get_node_info()" , are identical to "NAME.These are no longer allowed in release 4.0. "
Please suggest a way to resolve this.
Thank You.
Hi Vishvadeep
Try this code. For this u hv to take a node says - INPUT and within this a ttribute says tablename.
*Node Info
rootnode_info type ref to if_wd_context_node_info,
*Context Nodes
dyn_node type ref to if_wd_context_node,
tabname_node type ref to if_wd_context_node,
*String (for table name)
tablename type string.
*get node info of context root node
rootnode_info = wd_context->get_node_info( ).
*get the name of the table to be created.
tabname_node = wd_context->get_child_node( name = 'INPUT' ).
tabname_node->get_attribute( Exporting name = 'TABLENAME'
Importing value = tablename ).
translate tablename to upper case.
*create sub node named TEST1 of structure (tablename)
cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
parent_info = rootnode_info
node_name = tablename
structure_name = tablename
is_multiple = abap_true ).
DATA: stru_tab type ref to data.
field-symbols: <tab> type table.
*Create Internal Table
create data stru_tab type table of (tablename).
assign stru_tab->* to <tab>.
*Get table content
select * from (tablename) into corresponding fields of table <tab>.
*get instance of new node
dyn_node = wd_context->get_child_node( name = tablename ).
*Bind Internal table to context node.
dyn_node->bind_table( <tab> ).
Regard
Manoj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
just a give a space between the brackets.
It will work fine.
contextnode_info = wd_context->get_node_info( ).
Thanx.
Edited by: saurav mago on Feb 26, 2009 6:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishavdeep,
Try giving space between the bracket
contextnode_info = wd_context->get_node_info( ).
I hope it helps.
Regards
Arjub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.