cancel
Showing results for 
Search instead for 
Did you mean: 

How to get values from RFC return

Former Member
0 Kudos

hi folks,

IWDTable is getting filled by an RFC call. I need to get the values as the row is being selected. I tried current<Data>Element().getValue(), but it arises NullPointerException.

How can I get the value from the UI element ?

or still any alternative is there ?

thanks in advance

mandeep

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1. Are you getting values in your output node binded to the table.

You can check that using :

wdComponentAPI.getMessageManager().reportSuccess(wdContext.node<nodename>().size()+"");

2. If the size is 0 then you would get null pointer exception else you can access the currently selected row as:

wdContext.node<nodename>().current<nodename>Element().get<attribute>();

Regards,

Murtuza

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Your thing should work any way you can try with this alternate method.

First get the lead selection value of the selected row in the table.

based on the lead selection value you can retrive the corresponding values from the table.

Example :

int leadSelect = wdContext.node<NodeName>().getLeadSelection();
String s1 = wdContext.node<NaodeName>().get<Node Name>ElementAt(leadSelect).get<Attribute Name>();

Regards

Chandran S

Former Member
0 Kudos

thanks all.

I created another node with cardinality 1..n and assigned using Collection

Former Member
0 Kudos

Hi mandeep,

You can use the wdContext.current<CheckTab>Element().get<FldName>;

This will work

Regards

-Vinod

*

Former Member
0 Kudos

Hi,

use as follows



// Replace the nodeOrders with the node bound to the table

 for( int x=0; x<wdContext.nodeOrders().size(); x++)
	  {
// Replace the Orderelement with yours

		  IOrdersElement ordersElement = wdContext.nodeOrders().getOrdersElementAt(x);
// Replace the OrdereType attribute with yours

		  ordersElement.getOrderType();
	  }

Regards

Ayyapparaj