on 02-07-2011 12:55 PM
Hi all,
i created one node named zradio
and another node name zradio1
in wddoinit method i have written the code and following radiobuttons are displayed.
now i have another 4 attributes which need to be displayed.
now again i created a radiobuttongroupbykey and binded the attribute to selected key attribute.
when i am executing the application in wdoinint method for second node it is showing the error that attribute of second node was not found.
the code what i have written is
data nodeinf type ref to if_wd_context_node_info.
data node type ref to if_wd_context_node.
node = wd_context->get_child_node( 'RADIO' ). "RADIO is the node name
nodeinf = node->get_node_info( ).
data lt_vs type table of WDR_CONTEXT_ATTR_VALUE.
data ls_vs type WDR_CONTEXT_ATTR_VALUE.
ls_vs-text = 'Copy'.
ls_vs-value = '1'.
append ls_vs to lt_vs.
ls_vs-text = 'Mass Upload'.
ls_vs-value = '2'.
append ls_vs to lt_vs.
ls_vs-text = 'Automated Rate Processing'.
ls_vs-value = '3'.
append ls_vs to lt_vs.
nodeinf->set_attribute_value_Set(
name = 'KEY' "KEY is the attribute name
value_set = lt_vs
).
data inodeinf type ref to if_wd_context_node_info.
data inode type ref to if_wd_context_node.
inode = wd_context->get_child_node( 'ZRADIO' ). "RADIO1 is the node name
inodeinf = node->get_node_info( ).
data Wt_vs type table of WDR_CONTEXT_ATTR_VALUE.
data Ws_vs type WDR_CONTEXT_ATTR_VALUE.
Ws_vs-text = 'Professional Rates'.
Ws_vs-value = '1'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Default Rates'.
Ws_vs-value = '2'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Claims & Litigation Rates'.
Ws_vs-value = '3'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Account'.
Ws_vs-value = '4'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Rate Chart'.
Ws_vs-value = '5'.
append Ws_vs to Wt_vs.
Inodeinf->set_attribute_value_Set(
name = 'ZRAD' "ZRAD is the attribute name
value_set = Wt_vs
).
CAN U CORRECT WHERE I WAS WRONG
Hi Naveen,
I see 2 errors:
You should change this:
node = wd_context->get_child_node( 'RADIO' ). "RADIO is the node name
nodeinf = node->get_node_info( ).
Into:
node = wd_context->get_child_node( 'ZRADIO' ). "RADIO is the node name
nodeinf = node->get_node_info( ).
and
inode = wd_context->get_child_node( 'ZRADIO' ). "RADIO1 is the node name
inodeinf = node->get_node_info( ).
It should be:
inode = wd_context->get_child_node( 'ZRADIO1' ). "RADIO1 is the node name
inodeinf = inode->get_node_info( ).
You are using the wrong node reference.
Regards,
Roelof
Edited by: R. Albers on Feb 7, 2011 2:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi albers,
can u check the code now
i am getting the same error even if i checked. now
data nodeinf type ref to if_wd_context_node_info.
data node type ref to if_wd_context_node.
node = wd_context->get_child_node( 'RADIO' ). "RADIO is the node name
nodeinf = node->get_node_info( ).
data lt_vs type table of WDR_CONTEXT_ATTR_VALUE.
data ls_vs type WDR_CONTEXT_ATTR_VALUE.
ls_vs-text = 'Copy'.
ls_vs-value = '1'.
append ls_vs to lt_vs.
ls_vs-text = 'Mass Upload'.
ls_vs-value = '2'.
append ls_vs to lt_vs.
ls_vs-text = 'Automated Rate Processing'.
ls_vs-value = '3'.
append ls_vs to lt_vs.
nodeinf->set_attribute_value_Set(
name = 'KEY' "KEY is the attribute name
value_set = lt_vs
).
data inodeinf type ref to if_wd_context_node_info.
data inode type ref to if_wd_context_node.
inode = wd_context->get_child_node( 'ZRADIO' ). "ZRADIO is the node name
inodeinf = node->get_node_info( ).
data Wt_vs type table of WDR_CONTEXT_ATTR_VALUE.
data Ws_vs type WDR_CONTEXT_ATTR_VALUE.
Ws_vs-text = 'Professional Rates'.
Ws_vs-value = '1'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Default Rates'.
Ws_vs-value = '2'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Claims & Litigation Rates'.
Ws_vs-value = '3'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Account'.
Ws_vs-value = '4'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Rate Chart'.
Ws_vs-value = '5'.
append Ws_vs to Wt_vs.
Inodeinf->set_attribute_value_Set(
name = 'ZRAD' "zrad is the attribute name
value_set = Wt_vs
).
Hi Naveen,
What are the names of your nodes?
I assume (from your first post) that the names are ZRADIO and ZRADIO1. Try this:
data nodeinf type ref to if_wd_context_node_info.
data node type ref to if_wd_context_node.
node = wd_context->get_child_node( 'ZRADIO' ). "ZRADIO is the node name
nodeinf = node->get_node_info( ).
data lt_vs type table of WDR_CONTEXT_ATTR_VALUE.
data ls_vs type WDR_CONTEXT_ATTR_VALUE.
ls_vs-text = 'Copy'.
ls_vs-value = '1'.
append ls_vs to lt_vs.
ls_vs-text = 'Mass Upload'.
ls_vs-value = '2'.
append ls_vs to lt_vs.
ls_vs-text = 'Automated Rate Processing'.
ls_vs-value = '3'.
append ls_vs to lt_vs.
nodeinf->set_attribute_value_Set(
name = 'KEY' "KEY is the attribute name
value_set = lt_vs
).
data inodeinf type ref to if_wd_context_node_info.
data inode type ref to if_wd_context_node.
inode = wd_context->get_child_node( 'ZRADIO1' ). "ZRADIO1 is the node name
inodeinf = inode->get_node_info( ).
data Wt_vs type table of WDR_CONTEXT_ATTR_VALUE.
data Ws_vs type WDR_CONTEXT_ATTR_VALUE.
Ws_vs-text = 'Professional Rates'.
Ws_vs-value = '1'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Default Rates'.
Ws_vs-value = '2'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Claims & Litigation Rates'.
Ws_vs-value = '3'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Account'.
Ws_vs-value = '4'.
append Ws_vs to Wt_vs.
Ws_vs-text = 'Rate Chart'.
Ws_vs-value = '5'.
append Ws_vs to Wt_vs.
Inodeinf->set_attribute_value_Set(
name = 'ZRAD' "zrad is the attribute name
value_set = Wt_vs
).
Cheers,
Roelof
wt is the node name and the attribute name under those nodes.
You should give those names there.
node = wd_context->get_child_node( 'RADIO' ). "RADIO is the node name
in this line replace the string RADIO with your node name
and then
here
you should give the attribute name in
nodeinf->set_attribute_value_Set(
name = 'ZRAD' "ZRAD is the attribute name
value_set = Wt_vs
).
nodeinfo is linked to node and the attribute which this node has should be given there.
thanks
sarbjeet isingh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naveen,
In second node you are using this,
inode = wd_context->get_child_node( 'ZRADIO' ). "RADIO1 is the node name instead of this use
inode = wd_context->get_child_node( 'ZRADIO' ).
nodeinf = inode->get_node_info( ). use same node reference, and node name is different.
or
u can create one more node reference say
data node1 type ref to if_wd_context_node. and change that line as
node1 = wd_context->get_child_node( 'ZRADIO' ).
nodeinf = node1->get_node_info( ).
Thanks,
Kris.
Edited by: kissnas on Feb 7, 2011 2:10 PM
Edited by: kissnas on Feb 7, 2011 2:13 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.