cancel
Showing results for 
Search instead for 
Did you mean: 

can we use wddoinit method to initialize two node values

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

).

Former Member
0 Kudos

Hi

u are using same lines again

inode = wd_context->get_child_node( 'ZRADIO' ). "ZRADIO is the node name

inodeinf = node->get_node_info( ). instead of these two line try this

inode = wd_context->get_child_node( 'ZRADIO' ). "ZRADIO is the node name

inodeinf = inode->get_node_info( ).

Thanks,

Kris.

Former Member
0 Kudos

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

Former Member
0 Kudos

HI R.Albers,

thanks for sending the code it is working now really a lot of thanks i am struggling from so much time u have saved my time.

Thanks & Regards,

Naveen

Former Member
0 Kudos

Hi Kissnas,

thanks for sending the code now it is coming.

Thanks & Regards,

Naveen

Answers (2)

Answers (2)

gill367
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi sarbjeet,

thanks it is working now.

Thnaks & Regards,

Naveen

Former Member
0 Kudos

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