cancel
Showing results for 
Search instead for 
Did you mean: 

Set values in attributes of sub nodes(table type) in Component Contoller.

Former Member
0 Kudos

Hi,

I have requirement like this,

I have node in component controller . In that node there r two more nodes and one attribute field.

These two sub nodes are table type in BAPI.

I can able to set a value to that attribute by following code,

String names = wdContext.currentContextElement().getLoggedInUser(); //LoggedInUser is the attribute in the view

I have also mapped LoggedInUser from view to Component Controller attribute which has same name LoggedInUser

Swn_Uwl_Get_Worklist_Input input = new Swn_Uwl_Get_Worklist_Input();

wdContext.nodeBapi_Swn_Uml_Get_Worklist_Inpu().bind(input);

input.setUser(names); //User is the attribute under the node.

Now i can able to set the "user".

But there r attributes under the sub-nodes.

How can I able to set the values for that attributes in the sub nodes.

when I tryed with following code,

String status = wdContext.currentContextElement().getWork_Status;

input.setIm_Status_Filter(status); //Im_Status_Filter is a sub-node and Wi_status is the attribute

I am receiving an error argument is not matched.

Im_Status_Filter (AbstractList list)

Please guide me to set a values in the attributes of sub nodes in component controller.

Thanks,

Anitha

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks for every inputs

Former Member
0 Kudos

Hi,

In a similar way you created the element of the parent node, you have to create elment of child node and then set the values

Im_Status_Filter element = wdcontext.ParentNode.ChildNode.createChildNodeelemnt();

element.setChildAttribute("");

wdcontext.ParentNode.ChildNode.addelemnt();

Former Member
0 Kudos

Hi,

Thanks for your reply.

I have try to create element for child node. But I am receiveing an error has " Im_Status_Filter cannot be resolved or is not a type".

could you please guide me with some other inputs.

Regards,

Anitha.

Former Member
0 Kudos

Hi,

Make an instance of Swr_Status like this:

Swr_Status status =  new Swr_Status();

Organize your imports.

Then set the values of the status.

status.set.Wi_Stat("XXX"); // just an example

Finally add the structure instance to your input..

input.addIm_Status_Filter(status);

That should work.

Cheers

JV