cancel
Showing results for 
Search instead for 
Did you mean: 

invalidation of model and value nodes

Former Member
0 Kudos

Hii,

I have a RFC which fetch values for me after giving some input values.The code for fetching is

ResultNode : model node containing values fetched from RFC execution.

OutputDetailsNode : value node for populating the fetched values to the table in View.

OutputDetailsNode.invalidate();

wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();

if(ResultNode.size()!=0)

{

wdComponentAPI.getMessageManager().reportSuccess(""ResultNode.size() "resultnode's size");

for(int i=0;i<ResultNode.size();i++)

{

ResultElement = ResultNode.getT_ResultElementAt(i);

OutputDetailsElement = OutputDetailsNode.createCtx_vn_OutputDetailsElement();

OutputDetailsElement.setTeam(ResultElement.getTeam());

OutputDetailsElement.setESA(ESA);

OutputDetailsElement.setUtilization(utilization);

OutputDetailsElement.setPercent_Sum(Percent_Sum);

OutputDetailsElement.setPercent_Alloc(percent_alloc);

OutputDetailsNode.addElement(OutputDetailsElement);

}

}

if(BapiNode.size()!=0)

{

for(int i =0;i<BapiNode.size();++i)

{

BapiElement = BapiNode.getBapiReturn_T_MessageElementAt(i);

wdComponentAPI.getMessageManager().reportSuccess(""

BapiElement.getMessage_V1()""+BapiElement.getMessage_V2());

OutputDetailsNode.invalidate();

BapiNode.invalidate();

//ResultNode.invalidate();

}

}

The problem lies : When at cases ResultNode size is 0, that is it does not fetch any values and BapiNode prints the message

"Data does not exist" ....after that when it is expected to fetch values, evrytime the ResultNode size prints to 0 and no

data is displayed.....

invalidating both ResultNode and OutputDetailsNode did not help.

Please do suggest.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i think you are invalidating the node if there is data right?

So try to put the invalidation code in the controller.

Thanks and Regards

shanto aloor

Former Member
0 Kudos

and also check in se37 whether the rfc is giving any result.

Thanks and Regards

shanto aloor

Former Member
0 Kudos

yaa in se37 RFC is executing properly.

invalidating in the controller also did not help out!!!!!!!

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

First The object of the Function module is set to null;

<FUnction module> obj=null;
obj=new <FUnction >;

CHeck wether the input values given by you are correctly set to the function module.

and to clear your dout print the size of the Result node in the method itself nad print the size there itself

wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();

wdComponentAPI.getMessageManager().reportSuccess("The size of the Result node is>"wdContext.nodeResult().size());

Regards

Padma N

Former Member
0 Kudos

No it didnt help...The problem still persists as soon as i get ResultNode.size = 0, after that all ResultNode.size gets set to 0 dat is I dont get any result.

Former Member
0 Kudos

Hi,

u can write like this na,

OutputDetailsNode.invalidate();

wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();

if(ResultNode.size()!=0)

{

wdComponentAPI.getMessageManager().reportSuccess(""ResultNode.size() "resultnode's size");

for(int i=0;i<ResultNode.size();i++)

{

ResultElement = ResultNode.getT_ResultElementAt(i);

OutputDetailsElement = OutputDetailsNode.createCtx_vn_OutputDetailsElement();

OutputDetailsElement.setTeam(ResultElement.getTeam());

OutputDetailsElement.setESA(ESA);

OutputDetailsElement.setUtilization(utilization);

OutputDetailsElement.setPercent_Sum(Percent_Sum);

OutputDetailsElement.setPercent_Alloc(percent_alloc);

OutputDetailsNode.addElement(OutputDetailsElement);

}

}else{

// here give error message.

}

use external debugging to know the rfc returns the value or not ?

why you using the bapinode to check the no data exists ?

Regards,

ramesh

Former Member
0 Kudos

Putting the error message within the else also did not help!!!!

Former Member
0 Kudos

Hi,

wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();

In this method check that your are invalidating the Result node first as soon as you execute the function module ans then check the result

Regrads

Padma N

Former Member
0 Kudos

invalidating the ResultNode just befpre executing the RFC did not help...The same problem persists.

ResultNode.invalidate();

wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();

Any other clue??